diff options
author | Markus Armbruster <armbru@redhat.com> | 2016-09-12 13:19:01 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-09-19 17:32:21 +0200 |
commit | 60b03e4e6ac6eee3acac3c3173180f43adc6ddd5 (patch) | |
tree | c54fa1eb91fb4219f7f7017e6fc81143cd2a5c2d /qapi/qmp-registry.c | |
parent | edcfaefe07e242f204d476a8f2290895593eb09f (diff) | |
download | qemu-60b03e4e6ac6eee3acac3c3173180f43adc6ddd5.zip qemu-60b03e4e6ac6eee3acac3c3173180f43adc6ddd5.tar.gz qemu-60b03e4e6ac6eee3acac3c3173180f43adc6ddd5.tar.bz2 |
qapi: Support unregistering QMP commands
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20160912091913.15831-7-marcandre.lureau@redhat.com>
Diffstat (limited to 'qapi/qmp-registry.c')
-rw-r--r-- | qapi/qmp-registry.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c index 68b24c9..e805368 100644 --- a/qapi/qmp-registry.c +++ b/qapi/qmp-registry.c @@ -30,6 +30,14 @@ void qmp_register_command(const char *name, QmpCommandFunc *fn, QTAILQ_INSERT_TAIL(&qmp_commands, cmd, node); } +void qmp_unregister_command(const char *name) +{ + QmpCommand *cmd = qmp_find_command(name); + + QTAILQ_REMOVE(&qmp_commands, cmd, node); + g_free(cmd); +} + QmpCommand *qmp_find_command(const char *name) { QmpCommand *cmd; |