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>
diff --git a/monitor/hmp.c b/monitor/hmp.c
index c5cd9d3..1204233 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -384,7 +384,7 @@
pch++;
}
*q = 0;
- ret = get_monitor_def(®, buf);
+ ret = get_monitor_def(mon, ®, buf);
if (ret < 0) {
expr_error(mon, "unknown register");
}