summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann2021-06-24 12:38:32 +0200
committerPaolo Bonzini2021-07-09 18:21:33 +0200
commitf0e48cbd791e88728fcea65366dbb6d9a63a16e5 (patch)
treec8bf882d378d93dc931d31f05bf8043d096b82e7 /include
parentaccel: build tcg modular (diff)
downloadqemu-f0e48cbd791e88728fcea65366dbb6d9a63a16e5.tar.gz
qemu-f0e48cbd791e88728fcea65366dbb6d9a63a16e5.tar.xz
qemu-f0e48cbd791e88728fcea65366dbb6d9a63a16e5.zip
monitor: allow register hmp commands
Allow commands having a NULL cmd pointer, add a function to set the pointer later. Use case: allow modules implement hmp commands. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-31-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/monitor/monitor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 1211d6e6d6..1a8a369b50 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -51,4 +51,7 @@ int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags);
void monitor_fdset_dup_fd_remove(int dup_fd);
int64_t monitor_fdset_dup_fd_find(int dup_fd);
+void monitor_register_hmp(const char *name, bool info,
+ void (*cmd)(Monitor *mon, const QDict *qdict));
+
#endif /* MONITOR_H */