aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
new file mode 100644
index 0000000000..47e1ff75cd
--- /dev/null
+++ b/hmp.c
@@ -0,0 +1,26 @@
+/*
+ * Human Monitor Interface
+ *
+ * Copyright IBM, Corp. 2011
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#include "hmp.h"
+#include "qmp-commands.h"
+
+void hmp_info_name(Monitor *mon)
+{
+ NameInfo *info;
+
+ info = qmp_query_name(NULL);
+ if (info->has_name) {
+ monitor_printf(mon, "%s\n", info->name);
+ }
+ qapi_free_NameInfo(info);
+}