提交 3801cf8a 编写于 作者: M Markus Armbruster

Revert "qdev: Use QError for 'device not found' error"

This reverts commit 3ced9f7a.

The next commit will convert all of qdev_device_add() to QError, and
it'll be clearer with this partial conversion reverted.
上级 fab5767f
......@@ -29,7 +29,6 @@
#include "qdev.h"
#include "sysemu.h"
#include "monitor.h"
#include "qerror.h"
static int qdev_hotplug = 0;
......@@ -208,7 +207,8 @@ DeviceState *qdev_device_add(QemuOpts *opts)
/* find driver */
info = qdev_find_info(NULL, driver);
if (!info || info->no_user) {
qerror_report(QERR_DEVICE_NOT_FOUND, driver);
error_report("Device \"%s\" not found. Try -device '?' for a list.",
driver);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册