diff options
author | 2011-11-25 13:23:03 +0100 | |
---|---|---|
committer | 2011-11-28 15:12:37 +0100 | |
commit | a6916977bb4d3b1d765ceccd614f6514b0ce355a (patch) | |
tree | 209e87260815e3be1eb50f22db9f38898a752ac5 /src/conf/node_device_conf.c | |
parent | Refactor initial LXC mem tune / device ACL code (diff) | |
download | libvirt-a6916977bb4d3b1d765ceccd614f6514b0ce355a.tar.gz libvirt-a6916977bb4d3b1d765ceccd614f6514b0ce355a.tar.bz2 libvirt-a6916977bb4d3b1d765ceccd614f6514b0ce355a.zip |
conf: Improve incorrect root element error messages
When user pass wrong root element, it is not 'internal error' and
we can give him hint what we are expecting.
Diffstat (limited to 'src/conf/node_device_conf.c')
-rw-r--r-- | src/conf/node_device_conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index fc284e01e..084121f26 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1204,8 +1204,10 @@ virNodeDeviceDefParseNode(xmlDocPtr xml, virNodeDeviceDefPtr def = NULL; if (!xmlStrEqual(root->name, BAD_CAST "device")) { - virNodeDeviceReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("incorrect root element")); + virNodeDeviceReportError(VIR_ERR_XML_ERROR, + _("unexpected root element <%s> " + "expecting <device>"), + root->name); return NULL; } |