On Fri, Jul 13, 2007 at 12:29:40PM +0100, Richard W.M. Jones wrote:
Masayuki Sunou wrote:
>+ } else {
>+ goto error;
It'd be better to add a call to virXMLError in there, but other than
that the patch is fine.
I needed to check first who called that routine, but it is only
used by xenDaemonAttachDevice(), so it's only used for devices
attach and detach, so it should be safe.
I'm commiting the following so we have a reasonable error message:
--- xml.c 13 Jul 2007 08:26:58 -0000 1.82
+++ xml.c 13 Jul 2007 12:23:35 -0000
@@ -1351,6 +1351,9 @@ virParseXMLDevice(virConnectPtr conn, ch
else if (xmlStrEqual(node->name, BAD_CAST "interface")) {
if (virDomainParseXMLIfDesc(conn, node, &buf, hvm, xendConfigVersion) != 0)
goto error;
+ } else {
+ virXMLError(conn, VIR_ERR_XML_ERROR, (const char *) node->name, 0);
+ goto error;
}
cleanup:
if (xml != NULL)
thanks !
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/