aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/monitor.c b/monitor.c
index c0569d5587..2bf82f3c66 100644
--- a/monitor.c
+++ b/monitor.c
@@ -71,11 +71,11 @@
typedef struct mon_cmd_t {
const char *name;
const char *args_type;
- void *handler;
const char *params;
const char *help;
union {
void (*info)(Monitor *mon);
+ void (*cmd)(Monitor *mon, const QDict *qdict);
} mhandler;
} mon_cmd_t;
@@ -3014,13 +3014,8 @@ static void monitor_handle_command(Monitor *mon, const char *cmdline)
cmd = monitor_parse_command(mon, cmdline, qdict);
if (cmd) {
- void (*handler)(Monitor *mon, const QDict *qdict);
-
qemu_errors_to_mon(mon);
-
- handler = cmd->handler;
- handler(mon, qdict);
-
+ cmd->mhandler.cmd(mon, qdict);
qemu_errors_to_previous();
}