|
@@ -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;
|