From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mxkh3-0004Hg-Ol for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mxkgz-0004B0-43 for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:49 -0400 Received: from [199.232.76.173] (port=51969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxkgy-0004Aw-VZ for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63882) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mxkgy-00025K-FD for qemu-devel@nongnu.org; Tue, 13 Oct 2009 12:57:44 -0400 From: Luiz Capitulino Date: Tue, 13 Oct 2009 13:57:04 -0300 Message-Id: <1255453026-18637-8-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> References: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, kraxel@redhat.com Signed-off-by: Luiz Capitulino --- hw/qdev.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 906e897..3ce48f7 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -28,6 +28,7 @@ #include "net.h" #include "qdev.h" #include "sysemu.h" +#include "qerror.h" #include "monitor.h" static int qdev_hotplug = 0; @@ -176,8 +177,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) /* find driver */ info = qdev_find_info(NULL, driver); if (!info) { - qemu_error("Device \"%s\" not found. Try -device '?' for a list.\n", - driver); + qemu_error_structed(QERR_QDEV_NFOUND, "{ s: s }", "name", driver); return NULL; } if (info->no_user) { -- 1.6.5.rc3.8.g8ba5e