[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]