hmp: Pass monitor to mon_get_cpu()

mon_get_cpu() is indirectly called monitor_parse_arguments() where
the current monitor isn't set yet. Instead of using monitor_cur(),
explicitly pass the Monitor pointer to the function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201113114326.97663-2-kwolf@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Kevin Wolf 2020-11-13 12:43:24 +01:00 committed by Dr. David Alan Gilbert
parent be2df2ac6f
commit 2fc5d01bb4
5 changed files with 13 additions and 13 deletions

View file

@ -656,7 +656,7 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
int id = qdict_get_try_int(qdict, "apic-id", 0);
cs = cpu_by_arch_id(id);
} else {
cs = mon_get_cpu();
cs = mon_get_cpu(mon);
}