mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 21:25:25 +00:00
conf: storage: Provide only virStorageVolDefParse
Remove the virStorageVolDefParseFile/String shim functions. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3c56186031
commit
2a166e6c12
@ -1401,7 +1401,7 @@ virStorageVolDefParseXML(virStoragePoolDef *pool,
|
||||
}
|
||||
|
||||
|
||||
static virStorageVolDef *
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParse(virStoragePoolDef *pool,
|
||||
const char *xmlStr,
|
||||
const char *filename,
|
||||
@ -1418,24 +1418,6 @@ virStorageVolDefParse(virStoragePoolDef *pool,
|
||||
}
|
||||
|
||||
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParseString(virStoragePoolDef *pool,
|
||||
const char *xmlStr,
|
||||
unsigned int flags)
|
||||
{
|
||||
return virStorageVolDefParse(pool, xmlStr, NULL, flags);
|
||||
}
|
||||
|
||||
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParseFile(virStoragePoolDef *pool,
|
||||
const char *filename,
|
||||
unsigned int flags)
|
||||
{
|
||||
return virStorageVolDefParse(pool, NULL, filename, flags);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
virStorageVolTimestampFormat(virBuffer *buf, const char *name,
|
||||
struct timespec *ts)
|
||||
|
@ -287,14 +287,10 @@ typedef enum {
|
||||
} virStorageVolDefParseFlags;
|
||||
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParseString(virStoragePoolDef *pool,
|
||||
const char *xml,
|
||||
unsigned int flags);
|
||||
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParseFile(virStoragePoolDef *pool,
|
||||
const char *filename,
|
||||
unsigned int flags);
|
||||
virStorageVolDefParse(virStoragePoolDef *pool,
|
||||
const char *xmlStr,
|
||||
const char *filename,
|
||||
unsigned int flags);
|
||||
|
||||
virStorageVolDef *
|
||||
virStorageVolDefParseXML(virStoragePoolDef *pool,
|
||||
|
@ -861,7 +861,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
|
||||
}
|
||||
|
||||
/* Parse config */
|
||||
def = virStorageVolDefParseString(&poolDef, xmldesc, 0);
|
||||
def = virStorageVolDefParse(&poolDef, xmldesc, NULL, 0);
|
||||
|
||||
if (!def)
|
||||
goto cleanup;
|
||||
@ -1063,7 +1063,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
|
||||
sourceVolume->name);
|
||||
|
||||
/* Parse config */
|
||||
def = virStorageVolDefParseString(&poolDef, xmldesc, 0);
|
||||
def = virStorageVolDefParse(&poolDef, xmldesc, NULL, 0);
|
||||
|
||||
if (!def)
|
||||
goto cleanup;
|
||||
|
@ -1078,8 +1078,7 @@ virStorageVolDefFindByName;
|
||||
virStorageVolDefFindByPath;
|
||||
virStorageVolDefFormat;
|
||||
virStorageVolDefFree;
|
||||
virStorageVolDefParseFile;
|
||||
virStorageVolDefParseString;
|
||||
virStorageVolDefParse;
|
||||
virStorageVolDefParseXML;
|
||||
virStorageVolDefRefreshAllocationTypeFromString;
|
||||
virStorageVolDefRefreshAllocationTypeToString;
|
||||
|
@ -1893,8 +1893,7 @@ storageVolCreateXML(virStoragePoolPtr pool,
|
||||
if ((backend = virStorageBackendForType(def->type)) == NULL)
|
||||
goto cleanup;
|
||||
|
||||
voldef = virStorageVolDefParseString(def, xmldesc,
|
||||
VIR_VOL_XML_PARSE_OPT_CAPACITY);
|
||||
voldef = virStorageVolDefParse(def, xmldesc, NULL, VIR_VOL_XML_PARSE_OPT_CAPACITY);
|
||||
if (voldef == NULL)
|
||||
goto cleanup;
|
||||
|
||||
@ -2067,8 +2066,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr pool,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
voldef = virStorageVolDefParseString(def, xmldesc,
|
||||
VIR_VOL_XML_PARSE_NO_CAPACITY);
|
||||
voldef = virStorageVolDefParse(def, xmldesc, NULL, VIR_VOL_XML_PARSE_NO_CAPACITY);
|
||||
if (voldef == NULL)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -7198,7 +7198,7 @@ testStorageVolCreateXML(virStoragePoolPtr pool,
|
||||
return NULL;
|
||||
def = virStoragePoolObjGetDef(obj);
|
||||
|
||||
privvol = virStorageVolDefParseString(def, xmldesc, 0);
|
||||
privvol = virStorageVolDefParse(def, xmldesc, NULL, 0);
|
||||
if (privvol == NULL)
|
||||
goto cleanup;
|
||||
|
||||
@ -7257,7 +7257,7 @@ testStorageVolCreateXMLFrom(virStoragePoolPtr pool,
|
||||
return NULL;
|
||||
def = virStoragePoolObjGetDef(obj);
|
||||
|
||||
privvol = virStorageVolDefParseString(def, xmldesc, 0);
|
||||
privvol = virStorageVolDefParse(def, xmldesc, NULL, 0);
|
||||
if (privvol == NULL)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -423,7 +423,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
|
||||
memset(&poolDef, 0, sizeof(poolDef));
|
||||
poolDef.type = VIR_STORAGE_POOL_DIR;
|
||||
|
||||
if ((def = virStorageVolDefParseString(&poolDef, xml, 0)) == NULL)
|
||||
if ((def = virStorageVolDefParse(&poolDef, xml, NULL, 0)) == NULL)
|
||||
goto cleanup;
|
||||
|
||||
if (!def->name ||
|
||||
|
@ -65,11 +65,11 @@ testCompareXMLToArgvFiles(bool shouldFail,
|
||||
if (inputvolxml)
|
||||
parse_flags |= VIR_VOL_XML_PARSE_NO_CAPACITY;
|
||||
|
||||
if (!(vol = virStorageVolDefParseFile(def, volxml, parse_flags)))
|
||||
if (!(vol = virStorageVolDefParse(def, NULL, volxml, parse_flags)))
|
||||
goto cleanup;
|
||||
|
||||
if (inputvolxml &&
|
||||
!(inputvol = virStorageVolDefParseFile(inputpool, inputvolxml, 0)))
|
||||
!(inputvol = virStorageVolDefParse(inputpool, NULL, inputvolxml, 0)))
|
||||
goto cleanup;
|
||||
|
||||
testSetVolumeType(vol, def);
|
||||
|
@ -22,7 +22,7 @@ testCompareXMLToXMLFiles(const char *poolxml, const char *inxml,
|
||||
if (!(pool = virStoragePoolDefParse(NULL, poolxml, 0)))
|
||||
return -1;
|
||||
|
||||
if (!(dev = virStorageVolDefParseFile(pool, inxml, flags)))
|
||||
if (!(dev = virStorageVolDefParse(pool, NULL, inxml, flags)))
|
||||
return -1;
|
||||
|
||||
if (!(actual = virStorageVolDefFormat(pool, dev)))
|
||||
|
Loading…
Reference in New Issue
Block a user