From 48a32bedfed0ea5b30bdbb470c0520acdadc3bf2 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Fri, 2 Sep 2011 12:34:48 -0500 Subject: qapi: convert query-name A simple example conversion 'info name'. This also adds the new files for QMP and HMP. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qmp.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 qmp.c (limited to 'qmp.c') diff --git a/qmp.c b/qmp.c new file mode 100644 index 0000000000..8aa9c66bd2 --- /dev/null +++ b/qmp.c @@ -0,0 +1,28 @@ +/* + * QEMU Management Protocol + * + * Copyright IBM, Corp. 2011 + * + * Authors: + * Anthony Liguori + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#include "qemu-common.h" +#include "sysemu.h" +#include "qmp-commands.h" + +NameInfo *qmp_query_name(Error **errp) +{ + NameInfo *info = g_malloc0(sizeof(*info)); + + if (qemu_name) { + info->has_name = true; + info->name = g_strdup(qemu_name); + } + + return info; +} -- cgit v1.2.1