conf: Export disk source formatter and parser

This code will be reused in the snapshot disk definition parser.
This commit is contained in:
Peter Krempa 2013-11-12 11:32:30 +01:00
parent 30f7ca67d9
commit 5f86d11e4a
2 changed files with 22 additions and 2 deletions

View File

@ -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,
} }
} }
static int int
virDomainDiskSourceDefFormatInternal(virBufferPtr buf, virDomainDiskSourceDefFormatInternal(virBufferPtr buf,
int type, int type,
const char *src, const char *src,

View File

@ -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
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);