From patchwork Tue Oct 13 16:57:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 35879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9C9ACB7BA4 for ; Wed, 14 Oct 2009 04:09:33 +1100 (EST) Received: from localhost ([127.0.0.1]:40219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxksN-0001cf-0I for incoming@patchwork.ozlabs.org; Tue, 13 Oct 2009 13:09:31 -0400 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 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9DGvhF3015845; Tue, 13 Oct 2009 12:57:43 -0400 Received: from localhost (vpn-13-167.rdu.redhat.com [10.11.13.167]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9DGvgDi023452; Tue, 13 Oct 2009 12:57:42 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCH 7/9] qdev: Use QError for not found error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {