[libvirt] [PATCH] Fix a bogus warning when parsing <hostdev>

When parsing hostdev, the following message would be emitted: 10:17:19.052: error : virDomainHostdevDefParseXML:3748 : internal error unknown node alias However, alias is appropriately parsed in virDomainDeviceInfoParseXML anyway. Disable the error message in the initial XML parsing loop. Signed-off-by: Chris Lalancette <clalance@redhat.com> --- src/conf/domain_conf.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8721dd1..04c417e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3723,6 +3723,9 @@ virDomainHostdevDefParseXML(const xmlNodePtr node, goto error; } } else if (xmlStrEqual(cur->name, BAD_CAST "address")) { + /* address is parsed as part of virDomainDeviceInfoParseXML */ + } else if (xmlStrEqual(cur->name, BAD_CAST "alias")) { + /* alias is parsed as part of virDomainDeviceInfoParseXML */ } else { virDomainReportError(VIR_ERR_INTERNAL_ERROR, _("unknown node %s"), cur->name); -- 1.7.2

On 07/30/2010 11:37 AM, Chris Lalancette wrote:
When parsing hostdev, the following message would be emitted:
10:17:19.052: error : virDomainHostdevDefParseXML:3748 : internal error unknown node alias
However, alias is appropriately parsed in virDomainDeviceInfoParseXML anyway. Disable the error message in the initial XML parsing loop.
ACK, and thanks for the comments in the code. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 07/30/10 - 11:54:03AM, Eric Blake wrote:
On 07/30/2010 11:37 AM, Chris Lalancette wrote:
When parsing hostdev, the following message would be emitted:
10:17:19.052: error : virDomainHostdevDefParseXML:3748 : internal error unknown node alias
However, alias is appropriately parsed in virDomainDeviceInfoParseXML anyway. Disable the error message in the initial XML parsing loop.
ACK, and thanks for the comments in the code.
Thanks, pushed. -- Chris Lalancette
participants (2)
-
Chris Lalancette
-
Eric Blake