From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 6/6] monitor: convert do_cpu_set() to QObject, QError
Date: Fri, 15 Jan 2010 17:25:29 +0100 [thread overview]
Message-ID: <1263572729-14813-7-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1263572729-14813-1-git-send-email-armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
monitor.c | 4 ++--
qemu-monitor.hx | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/monitor.c b/monitor.c
index 6664a04..5f0a54c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -797,11 +797,11 @@ static void do_info_cpus(Monitor *mon, QObject **ret_data)
*ret_data = QOBJECT(cpu_list);
}
-static void do_cpu_set(Monitor *mon, const QDict *qdict)
+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)
- monitor_printf(mon, "Invalid CPU index\n");
+ qemu_error_new(QERR_INVALID_CPU_INDEX);
}
static void do_info_jit(Monitor *mon)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 1aa7818..415734a 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -573,7 +573,8 @@ ETEXI
.args_type = "index:i",
.params = "index",
.help = "set the default CPU",
- .mhandler.cmd = do_cpu_set,
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = do_cpu_set,
},
STEXI
--
1.6.5.2
prev parent reply other threads:[~2010-01-15 16:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 16:25 [Qemu-devel] [PATCH 0/6] Convert memsave, pmemsave, cpu to QObject+QError Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 1/6] monitor: Don't check for mon_get_cpu() failure Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 2/6] QError: New QERR_FOPEN_FAILED Markus Armbruster
2010-01-18 14:23 ` Luiz Capitulino
2010-01-18 14:38 ` Luiz Capitulino
2010-01-18 14:52 ` Markus Armbruster
2010-01-18 16:49 ` Luiz Capitulino
2010-01-15 16:25 ` [Qemu-devel] [PATCH 3/6] monitor: convert do_memory_save() to QError Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 4/6] monitor: convert do_physical_memory_save() " Markus Armbruster
2010-01-15 16:25 ` [Qemu-devel] [PATCH 5/6] QError: New QERR_INVALID_CPU_INDEX Markus Armbruster
2010-01-15 16:25 ` Markus Armbruster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263572729-14813-7-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).