From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P . Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 3/3] monitor: Remove monitor_register_hmp()
Date: Tue, 11 Jun 2024 12:23:05 +0200 [thread overview]
Message-ID: <20240611102305.60735-4-philmd@linaro.org> (raw)
In-Reply-To: <20240611102305.60735-1-philmd@linaro.org>
Previous commit removed the last use of monitor_register_hmp(),
remove it so new commands are implemented using
monitor_register_hmp_info_hrt().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/monitor/monitor.h | 2 --
monitor/hmp-target.c | 16 ----------------
2 files changed, 18 deletions(-)
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 965f5d5450..2199a74913 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -55,8 +55,6 @@ 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));
void monitor_register_hmp_info_hrt(const char *name,
HumanReadableText *(*handler)(Error **errp));
diff --git a/monitor/hmp-target.c b/monitor/hmp-target.c
index 1eb72ac1bf..86f48c613b 100644
--- a/monitor/hmp-target.c
+++ b/monitor/hmp-target.c
@@ -145,22 +145,6 @@ static void __attribute__((__constructor__)) sortcmdlist(void)
compare_mon_cmd);
}
-void monitor_register_hmp(const char *name, bool info,
- void (*cmd)(Monitor *mon, const QDict *qdict))
-{
- HMPCommand *table = info ? hmp_info_cmds : hmp_cmds;
-
- while (table->name != NULL) {
- if (strcmp(table->name, name) == 0) {
- g_assert(table->cmd == NULL && table->cmd_info_hrt == NULL);
- table->cmd = cmd;
- return;
- }
- table++;
- }
- g_assert_not_reached();
-}
-
void monitor_register_hmp_info_hrt(const char *name,
HumanReadableText *(*handler)(Error **errp))
{
--
2.41.0
next prev parent reply other threads:[~2024-06-11 10:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 10:23 [PATCH v2 0/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé
2024-06-11 10:23 ` [PATCH v2 1/3] hw/usb: Remove unused 'host.h' header Philippe Mathieu-Daudé
2024-06-11 12:25 ` Daniel P. Berrangé
2024-06-11 10:23 ` [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé
2024-06-11 12:28 ` Daniel P. Berrangé
2024-06-18 14:15 ` Philippe Mathieu-Daudé
2024-06-18 15:33 ` Philippe Mathieu-Daudé
2024-06-11 10:23 ` Philippe Mathieu-Daudé [this message]
2024-06-11 12:30 ` [PATCH v2 3/3] monitor: Remove monitor_register_hmp() Daniel P. Berrangé
2024-06-18 10:57 ` [PATCH v2 0/3] hw/usb: Introduce x-query-usbhost QMP command Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240611102305.60735-4-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dave@treblig.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).