aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-10-06 14:31:39 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-27 11:48:46 -0200
commit755f196898e75bf453957609d1dbe02f73e5b12a (patch)
tree139a14ffa6d5dd9a4ef136be6afddeb5f6bd9d9b /hmp.c
parent99b7796f601cd275b16b3e7122874953ed1a0b1f (diff)
qapi: Convert the cpu command
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 619b8ba70e..35b0ca0bea 100644
--- a/hmp.c
+++ b/hmp.c
@@ -165,3 +165,15 @@ void hmp_system_powerdown(Monitor *mon, const QDict *qdict)
{
qmp_system_powerdown(NULL);
}
+
+void hmp_cpu(Monitor *mon, const QDict *qdict)
+{
+ int64_t cpu_index;
+
+ /* XXX: drop the monitor_set_cpu() usage when all HMP commands that
+ use it are converted to the QAPI */
+ cpu_index = qdict_get_int(qdict, "index");
+ if (monitor_set_cpu(cpu_index) < 0) {
+ monitor_printf(mon, "invalid CPU index\n");
+ }
+}