summaryrefslogtreecommitdiff
path: root/qapi/qmp-registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'qapi/qmp-registry.c')
-rw-r--r--qapi/qmp-registry.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c
index abafa347fb..25c89ad098 100644
--- a/qapi/qmp-registry.c
+++ b/qapi/qmp-registry.c
@@ -52,6 +52,19 @@ void qmp_disable_command(const char *name)
}
}
+bool qmp_command_is_enabled(const char *name)
+{
+ QmpCommand *cmd;
+
+ QTAILQ_FOREACH(cmd, &qmp_commands, node) {
+ if (strcmp(cmd->name, name) == 0) {
+ return cmd->enabled;
+ }
+ }
+
+ return false;
+}
+
char **qmp_get_command_list(void)
{
QmpCommand *cmd;