提交 5f86d11e 编写于 作者: P Peter Krempa

conf: Export disk source formatter and parser

This code will be reused in the snapshot disk definition parser.
上级 30f7ca67
...@@ -4737,7 +4737,7 @@ cleanup: ...@@ -4737,7 +4737,7 @@ cleanup:
} }
static int int
virDomainDiskSourceDefParse(xmlNodePtr node, virDomainDiskSourceDefParse(xmlNodePtr node,
int type, int type,
char **source, char **source,
...@@ -14378,7 +14378,7 @@ virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf, ...@@ -14378,7 +14378,7 @@ virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf,
} }
} }
static int int
virDomainDiskSourceDefFormatInternal(virBufferPtr buf, virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
int type, int type,
const char *src, const char *src,
......
...@@ -2344,6 +2344,18 @@ int virDomainDefFormatInternal(virDomainDefPtr def, ...@@ -2344,6 +2344,18 @@ int virDomainDefFormatInternal(virDomainDefPtr def,
unsigned int flags, unsigned int flags,
virBufferPtr buf); 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, int virDomainDefCompatibleDevice(virDomainDefPtr def,
virDomainDeviceDefPtr dev); virDomainDeviceDefPtr dev);
...@@ -2378,6 +2390,14 @@ virDomainDiskDefPtr ...@@ -2378,6 +2390,14 @@ virDomainDiskDefPtr
virDomainDiskRemove(virDomainDefPtr def, size_t i); virDomainDiskRemove(virDomainDefPtr def, size_t i);
virDomainDiskDefPtr virDomainDiskDefPtr
virDomainDiskRemoveByName(virDomainDefPtr def, const char *name); 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); bool virDomainHasDiskMirror(virDomainObjPtr vm);
int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net); int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册