From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsIf9-00004t-Mc for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:36 -0400 Received: from [199.232.76.173] (port=40357 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsIf7-0008Ta-BF for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:33 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsIf0-0005Mx-7B for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:33 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:56563) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NsIey-0005MU-HO for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:24 -0400 Received: from blackfin.pond.sub.org (pD9E3ACC8.dip.t-dialin.net [217.227.172.200]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 29D5D2DD35D for ; Thu, 18 Mar 2010 17:33:22 +0100 (CET) From: Markus Armbruster Date: Thu, 18 Mar 2010 17:33:14 +0100 Message-Id: <1268929996-28763-8-git-send-email-armbru@redhat.com> In-Reply-To: <1268929996-28763-1-git-send-email-armbru@redhat.com> References: <1268929996-28763-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 07/11] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com 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 35460eb..c3a00d2 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; } -- 1.6.6.1