summary refs log tree commit diff stats
path: root/monitor/monitor-internal.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-06-13 17:34:01 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-06-18 08:13:13 +0200
commited7bda5d07b655a4056fc579d06150f95dbe8738 (patch)
tree945d53b7766304ac607464454f6ac70798358f4f /monitor/monitor-internal.h
parent7e3c0deab1b76f37ac0b3199324db976a6cd1b2c (diff)
downloadfocaccia-qemu-ed7bda5d07b655a4056fc579d06150f95dbe8738.tar.gz
focaccia-qemu-ed7bda5d07b655a4056fc579d06150f95dbe8738.zip
monitor: Split out monitor/hmp.c
Move HMP infrastructure from monitor/misc.c to monitor/hmp.c. This is
code that can be shared for all targets, so compile it only once.

The amount of function and particularly extern variables in
monitor_int.h is probably a bit larger than it needs to be, but this way
no non-trivial code modifications are needed. The interfaces between HMP
and the monitor core can be cleaned up later.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20190613153405.24769-12-kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Comment reformatted to make checkpatch.pl happy, #include <dirent.h>
moved to fix Windows build, superfluous #include dropped]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'monitor/monitor-internal.h')
-rw-r--r--monitor/monitor-internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h
index d859bd3894..10fda7d97c 100644
--- a/monitor/monitor-internal.h
+++ b/monitor/monitor-internal.h
@@ -159,7 +159,10 @@ extern QemuMutex monitor_lock;
 extern MonitorList mon_list;
 extern int mon_refcount;
 
+extern HMPCommand hmp_cmds[];
+
 void monitor_init_qmp(Chardev *chr, int flags);
+void monitor_init_hmp(Chardev *chr, int flags);
 
 int monitor_puts(Monitor *mon, const char *str);
 void monitor_data_init(Monitor *mon, int flags, bool skip_flush,
@@ -172,4 +175,9 @@ void qmp_send_response(MonitorQMP *mon, const QDict *rsp);
 void monitor_data_destroy_qmp(MonitorQMP *mon);
 void monitor_qmp_bh_dispatcher(void *data);
 
+int get_monitor_def(int64_t *pval, const char *name);
+void help_cmd(Monitor *mon, const char *name);
+void handle_hmp_command(MonitorHMP *mon, const char *cmdline);
+int hmp_compare_cmd(const char *name, const char *list);
+
 #endif