diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-06-19 22:10:43 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-07-02 13:37:00 +0200 |
commit | 52924dea1761e329fb3a14a50f98a1cd161d68d5 (patch) | |
tree | 6045c3df0dad2d654b1a642f63ba81859f4f5e61 /vl.c | |
parent | ac057879f42549f130c44d5e63ac3743a3540020 (diff) |
hw/core: Collect QMP command handlers in hw/core/
The handlers for qapi/machine.json's QMP commands are spread over
cpus.c, hw/core/numa.c, monitor/misc.c, monitor/qmp-cmds.c, and vl.c.
Move them all to new hw/core/machine-qmp-cmds.c, where they are
covered by MAINTAINERS section "Machine core", just like
qapi/machine.json.
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190619201050.19040-11-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 45 |
1 files changed, 0 insertions, 45 deletions
@@ -55,7 +55,6 @@ int main(int argc, char **argv) #include "qemu/error-report.h" #include "qemu/sockets.h" #include "hw/hw.h" -#include "hw/boards.h" #include "sysemu/accel.h" #include "hw/usb.h" #include "hw/isa/isa.h" @@ -125,7 +124,6 @@ int main(int argc, char **argv) #include "qapi/qapi-visit-block-core.h" #include "qapi/qapi-visit-ui.h" #include "qapi/qapi-commands-block-core.h" -#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-run-state.h" #include "qapi/qapi-commands-ui.h" #include "qapi/qmp/qerror.h" @@ -1406,41 +1404,6 @@ static MachineClass *find_default_machine(GSList *machines) return NULL; } -MachineInfoList *qmp_query_machines(Error **errp) -{ - GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false); - MachineInfoList *mach_list = NULL; - - for (el = machines; el; el = el->next) { - MachineClass *mc = el->data; - MachineInfoList *entry; - MachineInfo *info; - - info = g_malloc0(sizeof(*info)); - if (mc->is_default) { - info->has_is_default = true; - info->is_default = true; - } - - if (mc->alias) { - info->has_alias = true; - info->alias = g_strdup(mc->alias); - } - - info->name = g_strdup(mc->name); - info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus; - info->hotpluggable_cpus = mc->has_hotpluggable_cpus; - - entry = g_malloc0(sizeof(*entry)); - entry->value = info; - entry->next = mach_list; - mach_list = entry; - } - - g_slist_free(machines); - return mach_list; -} - static int machine_help_func(QemuOpts *opts, MachineState *machine) { ObjectProperty *prop; @@ -1739,14 +1702,6 @@ bool qemu_wakeup_suspend_enabled(void) return wakeup_suspend_enabled; } -CurrentMachineParams *qmp_query_current_machine(Error **errp) -{ - CurrentMachineParams *params = g_malloc0(sizeof(*params)); - params->wakeup_suspend_support = qemu_wakeup_suspend_enabled(); - - return params; -} - void qemu_system_killed(int signal, pid_t pid) { shutdown_signal = signal; |