Patchwork [RFC,41/48] Revert "qdev: Use QError for 'device not found' error"

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 24, 2010, 5:55 p.m.
Message ID <1267034160-3517-42-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/46187/
State New
Headers show

Comments

Markus Armbruster - Feb. 24, 2010, 5:55 p.m.
This reverts commit 3ced9f7a36189aed94d8bf86f3f5087a53012455.

The next commit will convert all of qdev_device_add() to QError, and
it'll be clearer with this partial conversion reverted.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/qdev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/qdev.c b/hw/qdev.c
index 1887dde..4e348fd 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -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) {
-        qemu_error_new(QERR_DEVICE_NOT_FOUND, driver);
+        qemu_error("Device \"%s\" not found.  Try -device '?' for a list.",
+                   driver);
         return NULL;
     }