[PATCH 16/22] conf: Export disk source formatter and parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This code will be reused in the snapshot disk definition parser.
---
 src/conf/domain_conf.c |  4 ++--
 src/conf/domain_conf.h | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d000f97..09ea51f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4737,7 +4737,7 @@ cleanup:
 }


-static int
+int
 virDomainDiskSourceDefParse(xmlNodePtr node,
                             int type,
                             char **source,
@@ -14377,7 +14377,7 @@ virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf,
     }
 }

-static int
+int
 virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
                                      int type,
                                      const char *src,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index a5ef2ca..e9800a5 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2345,6 +2345,18 @@ int virDomainDefFormatInternal(virDomainDefPtr def,
                                unsigned int flags,
                                virBufferPtr buf);

+int virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
+                                         int type,
+                                         const char *src,
+                                         int policy,
+                                         int protocol,
+                                         size_t nhosts,
+                                         virDomainDiskHostDefPtr hosts,
+                                         size_t nseclabels,
+                                         virSecurityDeviceLabelDefPtr *seclabels,
+                                         virDomainDiskSourcePoolDefPtr srcpool,
+                                         unsigned int flags);
+
 int virDomainDefCompatibleDevice(virDomainDefPtr def,
                                  virDomainDeviceDefPtr dev);

@@ -2379,6 +2391,14 @@ virDomainDiskDefPtr
 virDomainDiskRemove(virDomainDefPtr def, size_t i);
 virDomainDiskDefPtr
 virDomainDiskRemoveByName(virDomainDefPtr def, const char *name);
+int virDomainDiskSourceDefParse(xmlNodePtr node,
+                                int type,
+                                char **source,
+                                int *proto,
+                                size_t *nhosts,
+                                virDomainDiskHostDefPtr *hosts,
+                                virDomainDiskSourcePoolDefPtr *srcpool);
+
 bool virDomainHasDiskMirror(virDomainObjPtr vm);

 int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net);
-- 
1.8.4.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]