aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-07-09 17:20:53 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-08-21 13:24:01 +0200
commitffaee83bcb28913b8b854aeab78b1a1f2115712d (patch)
tree3c328442c829bd4471262b3cc8ac1034085125fe /hw
parent2e5b09fd0e766434962327db4678ce1cda0c7241 (diff)
downloadqemu-ffaee83bcb28913b8b854aeab78b1a1f2115712d.zip
qemu-ffaee83bcb28913b8b854aeab78b1a1f2115712d.tar.gz
qemu-ffaee83bcb28913b8b854aeab78b1a1f2115712d.tar.bz2
qapi: Move query-target from misc.json to machine.json
Move query-target and its return type TargetInfo from misc.json to machine.json, where they are covered by MAINTAINERS section "Machine core". Also move its implementation from arch_init.c to hw/core/machine-qmp-cmds, where it is likewise covered. All users of SysEmuTarget are now in machine.json. Move it there from common.json. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190709152053.16670-3-armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/machine-qmp-cmds.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 526fbd5..15cf7c6 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -249,6 +249,16 @@ CurrentMachineParams *qmp_query_current_machine(Error **errp)
return params;
}
+TargetInfo *qmp_query_target(Error **errp)
+{
+ TargetInfo *info = g_malloc0(sizeof(*info));
+
+ info->arch = qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1,
+ &error_abort);
+
+ return info;
+}
+
HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());