提交 cdbba1c4 编写于 作者: H Hu Tao 提交者: Eric Blake

qemu: Report more accurate error on failure to attach device.

When attaching device from a xml file and the device is mis-configured,
virsh gives mis-leading message "out of memory". This patch fixes this.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 f15cad29
......@@ -1496,6 +1496,9 @@ qemuBuildControllerDevStr(virDomainControllerDefPtr def)
/* We always get an IDE controller, whether we want it or not. */
case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
default:
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown controller type: %s"),
virDomainControllerTypeToString(def->type));
goto error;
}
......
......@@ -260,7 +260,6 @@ int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
goto cleanup;
if (!(devstr = qemuBuildControllerDevStr(controller))) {
virReportOOMError();
goto cleanup;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册