From f0e48cbd791e88728fcea65366dbb6d9a63a16e5 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 24 Jun 2021 12:38:32 +0200 Subject: 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 Reviewed-by: Jose R. Ziviani Message-Id: <20210624103836.2382472-31-kraxel@redhat.com> Signed-off-by: Paolo Bonzini --- include/monitor/monitor.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 1211d6e..1a8a369 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 */ -- cgit v1.1