From patchwork Thu Mar 25 16:22:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 48539 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 F3ADFB7CF3 for ; Fri, 26 Mar 2010 03:45:48 +1100 (EST) Received: from localhost ([127.0.0.1]:58031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuqBm-0007O8-C0 for incoming@patchwork.ozlabs.org; Thu, 25 Mar 2010 12:45:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuppk-0005jk-RA for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:23:01 -0400 Received: from [140.186.70.92] (port=35978 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuppZ-0005YQ-O7 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuppU-0001Fg-QF for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:48 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:52314) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuppU-0001F0-FG for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:44 -0400 Received: from blackfin.pond.sub.org (pD9E38AC7.dip.t-dialin.net [217.227.138.199]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 09BC2276DB7 for ; Thu, 25 Mar 2010 17:22:42 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id 195DE108; Thu, 25 Mar 2010 17:22:40 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 25 Mar 2010 17:22:36 +0100 Message-Id: <1269534160-4550-8-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1269534160-4550-1-git-send-email-armbru@redhat.com> References: <1269534160-4550-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH v3 07/11] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER 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: Markus Armbruster --- hw/qdev.c | 2 +- monitor.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 17a46a7..f45ed0f 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -207,7 +207,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) /* find driver */ info = qdev_find_info(NULL, driver); if (!info || info->no_user) { - qerror_report(QERR_INVALID_PARAMETER, "driver"); + qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "a driver name"); error_printf_unless_qmp("Try with argument '?' for a list.\n"); return NULL; } diff --git a/monitor.c b/monitor.c index 822dc27..35cbce7 100644 --- a/monitor.c +++ b/monitor.c @@ -970,7 +970,8 @@ static int do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data) { int index = qdict_get_int(qdict, "index"); if (mon_set_cpu(index) < 0) { - qerror_report(QERR_INVALID_PARAMETER, "index"); + qerror_report(QERR_INVALID_PARAMETER_VALUE, "index", + "a CPU number"); return -1; } return 0; @@ -2489,7 +2490,8 @@ static int do_getfd(Monitor *mon, const QDict *qdict, QObject **ret_data) } if (qemu_isdigit(fdname[0])) { - qerror_report(QERR_INVALID_PARAMETER, "fdname"); + qerror_report(QERR_INVALID_PARAMETER_VALUE, "fdname", + "a name not starting with a digit"); return -1; }