[libvirt] [PATCH] conf: Remove 'vmdef' from virDomainHostdevDefParseXML
Laine Stump
laine at laine.org
Wed Aug 12 21:16:40 UTC 2015
On 08/12/2015 04:35 PM, John Ferlan wrote:
> Since it's not used, let's remove it to avoid any future usage.
I came in prepared to say "let's save it for the sake of consistency
with other similar functions". But then I looked at all the device
parsing functions called by virDomainDeviceDefParse(), and saw that they
are already about as different as could possibly be, so ACK.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/conf/domain_conf.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index b743bdd..f66fccd 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -12054,8 +12054,7 @@ virDomainVideoDefParseXML(xmlNodePtr node,
> }
>
> static virDomainHostdevDefPtr
> -virDomainHostdevDefParseXML(const virDomainDef *vmdef ATTRIBUTE_UNUSED,
> - xmlNodePtr node,
> +virDomainHostdevDefParseXML(xmlNodePtr node,
> xmlXPathContextPtr ctxt,
> virHashTablePtr bootHash,
> unsigned int flags)
> @@ -12122,7 +12121,6 @@ virDomainHostdevDefParseXML(const virDomainDef *vmdef ATTRIBUTE_UNUSED,
> "address type"));
> goto error;
> }
> -
> if (virXPathBoolean("boolean(./readonly)", ctxt))
> def->readonly = true;
> if (virXPathBoolean("boolean(./shareable)", ctxt))
> @@ -12626,7 +12624,7 @@ virDomainDeviceDefParse(const char *xmlStr,
> goto error;
> break;
> case VIR_DOMAIN_DEVICE_HOSTDEV:
> - if (!(dev->data.hostdev = virDomainHostdevDefParseXML(def, node, ctxt,
> + if (!(dev->data.hostdev = virDomainHostdevDefParseXML(node, ctxt,
> NULL, flags)))
> goto error;
> break;
> @@ -16152,8 +16150,7 @@ virDomainDefParseXML(xmlDocPtr xml,
> for (i = 0; i < n; i++) {
> virDomainHostdevDefPtr hostdev;
>
> - hostdev = virDomainHostdevDefParseXML(def, nodes[i], ctxt,
> - bootHash, flags);
> + hostdev = virDomainHostdevDefParseXML(nodes[i], ctxt, bootHash, flags);
> if (!hostdev)
> goto error;
>
More information about the libvir-list
mailing list