[libvirt] [libvirt-go PATCH 1/3] Introduce DomainSnapshotXMLFlags constant

Erik Skultety eskultet at redhat.com
Fri Feb 22 15:32:28 UTC 2019


Signed-off-by: Erik Skultety <eskultet at redhat.com>
---
 domain_compat.h           | 4 ++++
 domain_snapshot.go        | 6 ++++++
 domain_snapshot_wrapper.h | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/domain_compat.h b/domain_compat.h
index 9a30e8f..d5a3f78 100644
--- a/domain_compat.h
+++ b/domain_compat.h
@@ -948,4 +948,8 @@ struct _virDomainInterface {
 #define VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY (1 << 0)
 #endif
 
+#ifndef VIR_DOMAIN_SNAPSHOT_XML_SECURE
+#define VIR_DOMAIN_SNAPSHOT_XML_SECURE (1 << 0)
+#endif
+
 #endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */
diff --git a/domain_snapshot.go b/domain_snapshot.go
index 65fbbb5..86c7c51 100644
--- a/domain_snapshot.go
+++ b/domain_snapshot.go
@@ -84,6 +84,12 @@ const (
 	DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY = DomainSnapshotDeleteFlags(C.VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY)
 )
 
+type DomainSnapshotXMLFlags int
+
+const (
+	DOMAIN_SNAPSHOT_XML_SECURE      = DomainSnapshotXMLFlags(C.VIR_DOMAIN_SNAPSHOT_XML_SECURE)
+)
+
 type DomainSnapshot struct {
 	ptr C.virDomainSnapshotPtr
 }
diff --git a/domain_snapshot_wrapper.h b/domain_snapshot_wrapper.h
index fcf8036..b2e5cc5 100644
--- a/domain_snapshot_wrapper.h
+++ b/domain_snapshot_wrapper.h
@@ -28,7 +28,7 @@
 
 #include <libvirt/libvirt.h>
 #include <libvirt/virterror.h>
-
+#include "domain_compat.h"
 
 int
 virDomainRevertToSnapshotWrapper(virDomainSnapshotPtr snapshot,
-- 
2.20.1




More information about the libvir-list mailing list