Patchwork [1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX

login
register
mail settings
Submitter Markus Armbruster
Date Jan. 29, 2010, 9:34 a.m.
Message ID <1264757641-29471-2-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/43907/
State New
Headers show

Comments

Markus Armbruster - Jan. 29, 2010, 9:34 a.m.
This changes the error message from "Invalid CPU index" to "Invalid
parameter index" in the human monitor.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Anthony Liguori - Feb. 3, 2010, 6:50 p.m.
On 01/29/2010 03:34 AM, Markus Armbruster wrote:
> This changes the error message from "Invalid CPU index" to "Invalid
> parameter index" in the human monitor.
>
> Signed-off-by: Markus Armbruster<armbru@redhat.com>
>    

Applied both.  Thanks.

Regards,

Anthony Liguori

> ---
>   monitor.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index fb7c572..69ebac5 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -897,7 +897,7 @@ static void do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
>   {
>       int index = qdict_get_int(qdict, "index");
>       if (mon_set_cpu(index)<  0)
> -        qemu_error_new(QERR_INVALID_CPU_INDEX);
> +        qemu_error_new(QERR_INVALID_PARAMETER, "index");
>   }
>
>   static void do_info_jit(Monitor *mon)
>

Patch

diff --git a/monitor.c b/monitor.c
index fb7c572..69ebac5 100644
--- a/monitor.c
+++ b/monitor.c
@@ -897,7 +897,7 @@  static void do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     int index = qdict_get_int(qdict, "index");
     if (mon_set_cpu(index) < 0)
-        qemu_error_new(QERR_INVALID_CPU_INDEX);
+        qemu_error_new(QERR_INVALID_PARAMETER, "index");
 }
 
 static void do_info_jit(Monitor *mon)