*
*/
-#include <glib.h>
-#include <string.h>
+#include "qemu/osdep.h"
#include "qapi/qmp/dispatch.h"
static QTAILQ_HEAD(QmpCommandList, QmpCommand) qmp_commands =
QmpCommand *cmd = g_malloc0(sizeof(*cmd));
cmd->name = name;
- cmd->type = QCT_NORMAL;
cmd->fn = fn;
cmd->enabled = true;
cmd->options = options;
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;