diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-12 15:10:53 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:02:57 -0300 |
commit | 292a26027c8567556795dde771e46d87306bd013 (patch) | |
tree | d74f603eb11c7a9b5c59d7cf7a398b87dea66e75 /monitor.c | |
parent | b9c15f16d702306aeb984f30490cddb8b418a231 (diff) | |
download | qemu-292a26027c8567556795dde771e46d87306bd013.zip qemu-292a26027c8567556795dde771e46d87306bd013.tar.gz qemu-292a26027c8567556795dde771e46d87306bd013.tar.bz2 |
qapi: Convert query-kvm
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 36 |
1 files changed, 1 insertions, 35 deletions
@@ -2430,31 +2430,6 @@ static void do_info_mtree(Monitor *mon) mtree_info((fprintf_function)monitor_printf, mon); } -static void do_info_kvm_print(Monitor *mon, const QObject *data) -{ - QDict *qdict; - - qdict = qobject_to_qdict(data); - - monitor_printf(mon, "kvm support: "); - if (qdict_get_bool(qdict, "present")) { - monitor_printf(mon, "%s\n", qdict_get_bool(qdict, "enabled") ? - "enabled" : "disabled"); - } else { - monitor_printf(mon, "not compiled\n"); - } -} - -static void do_info_kvm(Monitor *mon, QObject **ret_data) -{ -#ifdef CONFIG_KVM - *ret_data = qobject_from_jsonf("{ 'enabled': %i, 'present': true }", - kvm_enabled()); -#else - *ret_data = qobject_from_jsonf("{ 'enabled': false, 'present': false }"); -#endif -} - static void do_info_numa(Monitor *mon) { int i; @@ -2955,8 +2930,7 @@ static const mon_cmd_t info_cmds[] = { .args_type = "", .params = "", .help = "show KVM information", - .user_print = do_info_kvm_print, - .mhandler.info_new = do_info_kvm, + .mhandler.info = hmp_info_kvm, }, { .name = "numa", @@ -3188,14 +3162,6 @@ static const mon_cmd_t qmp_query_cmds[] = { .mhandler.info_new = do_pci_info, }, { - .name = "kvm", - .args_type = "", - .params = "", - .help = "show KVM information", - .user_print = do_info_kvm_print, - .mhandler.info_new = do_info_kvm, - }, - { .name = "status", .args_type = "", .params = "", |