xen: Fix bogus error when attaching a device

The xm internal xen driver only supports disk and network devices to be
added to a guest. On an attempt to attach any other device the xm driver
used VIR_ERR_XML_ERROR which resulted in a completely bogus error
message:

error: Failed to attach device from pci.xml
error: XML description for unknown device is not well formed or invalid
This commit is contained in:
Jiri Denemark 2010-10-05 13:39:37 +02:00
parent 577ad920d7
commit ad4cb9056a

View File

@ -2975,8 +2975,8 @@ xenXMDomainAttachDeviceFlags(virDomainPtr domain, const char *xml,
}
default:
xenXMError(VIR_ERR_XML_ERROR,
"%s", _("unknown device"));
xenXMError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Xm driver only supports adding disk or network devices"));
goto cleanup;
}