diff options
Diffstat (limited to 'qapi')
-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 68b24c98b0..e8053686f3 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; |