[PATCH v4 01/11] virDomainSnapshotDiskDefFree: Export and register as autoptr func

Peter Krempa pkrempa at redhat.com
Thu Sep 24 11:43:48 UTC 2020


Allow using the function for creating temporary snapshot disk
definitions for creating <transient/> disk overlays.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/conf/snapshot_conf.h      | 5 +++++
 src/conf/snapshot_conf_priv.h | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
index fbc9b17c54..0f3987fc80 100644
--- a/src/conf/snapshot_conf.h
+++ b/src/conf/snapshot_conf.h
@@ -70,6 +70,11 @@ struct _virDomainSnapshotDiskDef {
     virStorageSourcePtr src;
 };

+void
+virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSnapshotDiskDef, virDomainSnapshotDiskDefFree);
+
 /* Stores the complete snapshot metadata */
 struct _virDomainSnapshotDef {
     virDomainMomentDef parent;
diff --git a/src/conf/snapshot_conf_priv.h b/src/conf/snapshot_conf_priv.h
index b721a57c4b..369a023881 100644
--- a/src/conf/snapshot_conf_priv.h
+++ b/src/conf/snapshot_conf_priv.h
@@ -30,6 +30,3 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
                                  virDomainSnapshotDiskDefPtr def,
                                  unsigned int flags,
                                  virDomainXMLOptionPtr xmlopt);
-
-void
-virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);
-- 
2.26.2




More information about the libvir-list mailing list