diff options
author | Kevin Wolf | 2020-10-05 17:58:43 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-10-09 07:08:19 +0200 |
commit | 87e6f4a4d6885006931b371771e2933c40700427 (patch) | |
tree | 72eb29a53ab5f36ecd323fce6cf1f1622ad3baf3 /monitor/hmp-cmds.c | |
parent | monitor: Add Monitor parameter to monitor_set_cpu() (diff) | |
download | qemu-87e6f4a4d6885006931b371771e2933c40700427.tar.gz qemu-87e6f4a4d6885006931b371771e2933c40700427.tar.xz qemu-87e6f4a4d6885006931b371771e2933c40700427.zip |
monitor: Add Monitor parameter to monitor_get_cpu_index()
Most callers actually don't have to rely on cur_mon, but already know
for which monitor they call monitor_get_cpu_index().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201005155855.256490-3-kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'monitor/hmp-cmds.c')
-rw-r--r-- | monitor/hmp-cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 0c0a03f824..9789f4277f 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1009,7 +1009,7 @@ void hmp_memsave(Monitor *mon, const QDict *qdict) const char *filename = qdict_get_str(qdict, "filename"); uint64_t addr = qdict_get_int(qdict, "val"); Error *err = NULL; - int cpu_index = monitor_get_cpu_index(); + int cpu_index = monitor_get_cpu_index(mon); if (cpu_index < 0) { monitor_printf(mon, "No CPU available\n"); |