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