conf: nwfilterbinding: Provide only virNWFilterBindingDefParse

Remove the virNWFilterBindingDefParseString/File thin wrappers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-09-22 15:56:32 +02:00
parent 3eb151ddfd
commit 0dceac9b8e
5 changed files with 7 additions and 25 deletions

View File

@ -154,7 +154,7 @@ virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt)
} }
static virNWFilterBindingDef * virNWFilterBindingDef *
virNWFilterBindingDefParse(const char *xmlStr, virNWFilterBindingDefParse(const char *xmlStr,
const char *filename, const char *filename,
unsigned int flags) unsigned int flags)
@ -171,21 +171,6 @@ virNWFilterBindingDefParse(const char *xmlStr,
} }
virNWFilterBindingDef *
virNWFilterBindingDefParseString(const char *xmlStr,
unsigned int flags)
{
return virNWFilterBindingDefParse(xmlStr, NULL, flags);
}
virNWFilterBindingDef *
virNWFilterBindingDefParseFile(const char *filename)
{
return virNWFilterBindingDefParse(NULL, filename, 0);
}
char * char *
virNWFilterBindingDefFormat(const virNWFilterBindingDef *def) virNWFilterBindingDefFormat(const virNWFilterBindingDef *def)
{ {

View File

@ -50,11 +50,9 @@ virNWFilterBindingDef *
virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt); virNWFilterBindingDefParseXML(xmlXPathContextPtr ctxt);
virNWFilterBindingDef * virNWFilterBindingDef *
virNWFilterBindingDefParseString(const char *xml, virNWFilterBindingDefParse(const char *xmlStr,
unsigned int flags); const char *filename,
unsigned int flags);
virNWFilterBindingDef *
virNWFilterBindingDefParseFile(const char *filename);
char * char *
virNWFilterBindingDefFormat(const virNWFilterBindingDef *def); virNWFilterBindingDefFormat(const virNWFilterBindingDef *def);

View File

@ -1364,8 +1364,7 @@ virNWFilterBindingDefCopy;
virNWFilterBindingDefFormat; virNWFilterBindingDefFormat;
virNWFilterBindingDefFormatBuf; virNWFilterBindingDefFormatBuf;
virNWFilterBindingDefFree; virNWFilterBindingDefFree;
virNWFilterBindingDefParseFile; virNWFilterBindingDefParse;
virNWFilterBindingDefParseString;
virNWFilterBindingDefParseXML; virNWFilterBindingDefParseXML;

View File

@ -739,7 +739,7 @@ nwfilterBindingCreateXML(virConnectPtr conn,
return NULL; return NULL;
} }
def = virNWFilterBindingDefParseString(xml, flags); def = virNWFilterBindingDefParse(xml, NULL, flags);
if (!def) if (!def)
return NULL; return NULL;

View File

@ -41,7 +41,7 @@ testCompareXMLToXMLFiles(const char *xml)
virResetLastError(); virResetLastError();
if (!(dev = virNWFilterBindingDefParseFile(xml))) if (!(dev = virNWFilterBindingDefParse(NULL, xml, 0)))
goto fail; goto fail;
if (!(actual = virNWFilterBindingDefFormat(dev))) if (!(actual = virNWFilterBindingDefFormat(dev)))