diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-06 14:31:39 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-27 11:48:46 -0200 |
commit | 755f196898e75bf453957609d1dbe02f73e5b12a (patch) | |
tree | 139a14ffa6d5dd9a4ef136be6afddeb5f6bd9d9b /hmp.c | |
parent | 99b7796f601cd275b16b3e7122874953ed1a0b1f (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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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"); + } +} |