diff options
-rw-r--r-- | monitor.c | 4 | ||||
-rw-r--r-- | qemu-monitor.hx | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -807,11 +807,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 1aa78186ba..415734a464 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 |