@@ -86,7 +86,7 @@ void monitor_print_balloon(Monitor *mon, const QObject *data)
}
/**
- * do_info_balloon(): Balloon information
+ * qmp_query_balloon(): Balloon information
*
* Make an asynchronous request for balloon info. When the request completes
* a QDict will be returned according to the following specification:
@@ -106,7 +106,7 @@ void monitor_print_balloon(Monitor *mon, const QObject *data)
* "major_page_faults": 142, "minor_page_faults": 239245,
* "free_mem": 1014185984, "total_mem": 1044668416 }
*/
-int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque)
+int qmp_query_balloon(Monitor *mon, MonitorCompletion cb, void *opaque)
{
int ret;
@@ -26,7 +26,7 @@ int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque);
int qemu_balloon_status(MonitorCompletion cb, void *opaque);
void monitor_print_balloon(Monitor *mon, const QObject *data);
-int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque);
+int qmp_query_balloon(Monitor *mon, MonitorCompletion cb, void *opaque);
int do_balloon(Monitor *mon, const QDict *params,
MonitorCompletion cb, void *opaque);
@@ -1596,7 +1596,7 @@ void bdrv_info_print(Monitor *mon, const QObject *data)
qlist_iter(qobject_to_qlist(data), bdrv_print_dict, mon);
}
-void bdrv_info(Monitor *mon, QObject **ret_data)
+void qmp_query_block(Monitor *mon, QObject **ret_data)
{
QList *bs_list;
BlockDriverState *bs;
@@ -1702,7 +1702,7 @@ static QObject* bdrv_info_stats_bs(BlockDriverState *bs)
return res;
}
-void bdrv_info_stats(Monitor *mon, QObject **ret_data)
+void qmp_query_blockstats(Monitor *mon, QObject **ret_data)
{
QObject *obj;
QList *devices;
@@ -53,9 +53,9 @@ typedef enum {
void bdrv_mon_event(const BlockDriverState *bdrv,
BlockMonEventAction action, int is_read);
void bdrv_info_print(Monitor *mon, const QObject *data);
-void bdrv_info(Monitor *mon, QObject **ret_data);
+void qmp_query_block(Monitor *mon, QObject **ret_data);
void bdrv_stats_print(Monitor *mon, const QObject *data);
-void bdrv_info_stats(Monitor *mon, QObject **ret_data);
+void qmp_query_blockstats(Monitor *mon, QObject **ret_data);
void bdrv_init(void);
void bdrv_init_with_whitelist(void);
@@ -73,7 +73,7 @@ struct MouseTransformInfo {
};
void do_info_mice_print(Monitor *mon, const QObject *data);
-void do_info_mice(Monitor *mon, QObject **ret_data);
+void qmp_query_mice(Monitor *mon, QObject **ret_data);
void do_mouse_set(Monitor *mon, const QDict *qdict);
/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
@@ -370,7 +370,7 @@ void vnc_display_close(DisplayState *ds);
int vnc_display_open(DisplayState *ds, const char *display);
int vnc_display_password(DisplayState *ds, const char *password);
void do_info_vnc_print(Monitor *mon, const QObject *data);
-void do_info_vnc(Monitor *mon, QObject **ret_data);
+void qmp_query_vnc(Monitor *mon, QObject **ret_data);
char *vnc_display_local_addr(DisplayState *ds);
/* curses.c */
@@ -1438,7 +1438,7 @@ static QObject *pci_get_bus_dict(PCIBus *bus, int bus_num)
return NULL;
}
-void do_pci_info(Monitor *mon, QObject **ret_data)
+void qmp_query_pci(Monitor *mon, QObject **ret_data)
{
QList *bus_list;
struct PCIHostBus *host;
@@ -254,7 +254,7 @@ int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
unsigned *slotp);
void do_pci_info_print(Monitor *mon, const QObject *data);
-void do_pci_info(Monitor *mon, QObject **ret_data);
+void qmp_query_pci(Monitor *mon, QObject **ret_data);
void pci_bridge_update_mappings(PCIBus *b);
bool pci_msi_enabled(PCIDevice *dev);
@@ -220,7 +220,7 @@ void do_info_mice_print(Monitor *mon, const QObject *data)
qlist_iter(mice_list, info_mice_iter, mon);
}
-void do_info_mice(Monitor *mon, QObject **ret_data)
+void qmp_query_mice(Monitor *mon, QObject **ret_data)
{
QEMUPutMouseEntry *cursor;
QList *mice_list;
@@ -216,7 +216,7 @@ static void migrate_put_status(QDict *qdict, const char *name,
qdict_put_obj(qdict, name, obj);
}
-void do_info_migrate(Monitor *mon, QObject **ret_data)
+void qmp_query_migrate(Monitor *mon, QObject **ret_data)
{
QDict *qdict;
MigrationState *s = current_migration;
@@ -67,7 +67,7 @@ int do_migrate_set_downtime(Monitor *mon, const QDict *qdict,
void do_info_migrate_print(Monitor *mon, const QObject *data);
-void do_info_migrate(Monitor *mon, QObject **ret_data);
+void qmp_query_migrate(Monitor *mon, QObject **ret_data);
int exec_start_incoming_migration(const char *host_port);
@@ -729,7 +729,7 @@ static void do_info_version_print(Monitor *mon, const QObject *data)
qdict_get_str(qdict, "package"));
}
-static void do_info_version(Monitor *mon, QObject **ret_data)
+static void qmp_query_version(Monitor *mon, QObject **ret_data)
{
const char *version = QEMU_VERSION;
int major = 0, minor = 0, micro = 0;
@@ -757,7 +757,7 @@ static void do_info_name_print(Monitor *mon, const QObject *data)
monitor_printf(mon, "%s\n", qdict_get_str(qdict, "name"));
}
-static void do_info_name(Monitor *mon, QObject **ret_data)
+static void qmp_query_name(Monitor *mon, QObject **ret_data)
{
*ret_data = qemu_name ? qobject_from_jsonf("{'name': %s }", qemu_name) :
qobject_from_jsonf("{}");
@@ -778,7 +778,7 @@ static QObject *get_cmd_dict(const char *name)
return qobject_from_jsonf("{ 'name': %s }", p);
}
-static void do_info_commands(Monitor *mon, QObject **ret_data)
+static void qmp_query_commands(Monitor *mon, QObject **ret_data)
{
QList *cmd_list;
const mon_cmd_t *cmd;
@@ -803,7 +803,7 @@ static void do_info_uuid_print(Monitor *mon, const QObject *data)
monitor_printf(mon, "%s\n", qdict_get_str(qobject_to_qdict(data), "UUID"));
}
-static void do_info_uuid(Monitor *mon, QObject **ret_data)
+static void qmp_query_uuid(Monitor *mon, QObject **ret_data)
{
char uuid[64];
@@ -898,7 +898,7 @@ static void monitor_print_cpus(Monitor *mon, const QObject *data)
qlist_iter(cpu_list, print_cpu_iter, mon);
}
-static void do_info_cpus(Monitor *mon, QObject **ret_data)
+static void qmp_query_cpus(Monitor *mon, QObject **ret_data)
{
CPUState *env;
QList *cpu_list;
@@ -2006,7 +2006,7 @@ static void do_info_kvm_print(Monitor *mon, const QObject *data)
}
}
-static void do_info_kvm(Monitor *mon, QObject **ret_data)
+static void qmp_query_kvm(Monitor *mon, QObject **ret_data)
{
#ifdef CONFIG_KVM
*ret_data = qobject_from_jsonf("{ 'enabled': %i, 'present': true }",
@@ -2149,7 +2149,7 @@ static void do_info_status_print(Monitor *mon, const QObject *data)
monitor_printf(mon, "\n");
}
-static void do_info_status(Monitor *mon, QObject **ret_data)
+static void qmp_query_status(Monitor *mon, QObject **ret_data)
{
*ret_data = qobject_from_jsonf("{ 'running': %i, 'singlestep': %i }",
vm_running, singlestep);
@@ -2386,7 +2386,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the version of QEMU",
.user_print = do_info_version_print,
- .mhandler.info_new = do_info_version,
+ .mhandler.info_new = qmp_query_version,
},
{
.name = "network",
@@ -2401,7 +2401,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the character devices",
.user_print = qemu_chr_info_print,
- .mhandler.info_new = qemu_chr_info,
+ .mhandler.info_new = qmp_query_chardev,
},
{
.name = "block",
@@ -2409,7 +2409,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the block devices",
.user_print = bdrv_info_print,
- .mhandler.info_new = bdrv_info,
+ .mhandler.info_new = qmp_query_block,
},
{
.name = "blockstats",
@@ -2417,7 +2417,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show block device statistics",
.user_print = bdrv_stats_print,
- .mhandler.info_new = bdrv_info_stats,
+ .mhandler.info_new = qmp_query_blockstats,
},
{
.name = "registers",
@@ -2432,7 +2432,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show infos for each CPU",
.user_print = monitor_print_cpus,
- .mhandler.info_new = do_info_cpus,
+ .mhandler.info_new = qmp_query_cpus,
},
{
.name = "history",
@@ -2461,7 +2461,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show PCI info",
.user_print = do_pci_info_print,
- .mhandler.info_new = do_pci_info,
+ .mhandler.info_new = qmp_query_pci,
},
#if defined(TARGET_I386) || defined(TARGET_SH4)
{
@@ -2494,7 +2494,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show KVM information",
.user_print = do_info_kvm_print,
- .mhandler.info_new = do_info_kvm,
+ .mhandler.info_new = qmp_query_kvm,
},
{
.name = "numa",
@@ -2544,7 +2544,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the current VM status (running|paused)",
.user_print = do_info_status_print,
- .mhandler.info_new = do_info_status,
+ .mhandler.info_new = qmp_query_status,
},
{
.name = "pcmcia",
@@ -2559,7 +2559,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show which guest mouse is receiving events",
.user_print = do_info_mice_print,
- .mhandler.info_new = do_info_mice,
+ .mhandler.info_new = qmp_query_mice,
},
{
.name = "vnc",
@@ -2567,7 +2567,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the vnc server status",
.user_print = do_info_vnc_print,
- .mhandler.info_new = do_info_vnc,
+ .mhandler.info_new = qmp_query_vnc,
},
{
.name = "name",
@@ -2575,7 +2575,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the current VM name",
.user_print = do_info_name_print,
- .mhandler.info_new = do_info_name,
+ .mhandler.info_new = qmp_query_name,
},
{
.name = "uuid",
@@ -2583,7 +2583,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show the current VM UUID",
.user_print = do_info_uuid_print,
- .mhandler.info_new = do_info_uuid,
+ .mhandler.info_new = qmp_query_uuid,
},
#if defined(TARGET_PPC)
{
@@ -2609,7 +2609,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show migration status",
.user_print = do_info_migrate_print,
- .mhandler.info_new = do_info_migrate,
+ .mhandler.info_new = qmp_query_migrate,
},
{
.name = "balloon",
@@ -2617,7 +2617,7 @@ static const mon_cmd_t info_cmds[] = {
.params = "",
.help = "show balloon information",
.user_print = monitor_print_balloon,
- .mhandler.info_async = do_info_balloon,
+ .mhandler.info_async = qmp_query_balloon,
.flags = MONITOR_CMD_ASYNC,
},
{
@@ -2674,7 +2674,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the version of QEMU",
.user_print = do_info_version_print,
- .mhandler.info_new = do_info_version,
+ .mhandler.info_new = qmp_query_version,
},
{
.name = "commands",
@@ -2682,7 +2682,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "list QMP available commands",
.user_print = monitor_user_noop,
- .mhandler.info_new = do_info_commands,
+ .mhandler.info_new = qmp_query_commands,
},
{
.name = "chardev",
@@ -2690,7 +2690,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the character devices",
.user_print = qemu_chr_info_print,
- .mhandler.info_new = qemu_chr_info,
+ .mhandler.info_new = qmp_query_chardev,
},
{
.name = "block",
@@ -2698,7 +2698,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the block devices",
.user_print = bdrv_info_print,
- .mhandler.info_new = bdrv_info,
+ .mhandler.info_new = qmp_query_block,
},
{
.name = "blockstats",
@@ -2706,7 +2706,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show block device statistics",
.user_print = bdrv_stats_print,
- .mhandler.info_new = bdrv_info_stats,
+ .mhandler.info_new = qmp_query_blockstats,
},
{
.name = "cpus",
@@ -2714,7 +2714,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show infos for each CPU",
.user_print = monitor_print_cpus,
- .mhandler.info_new = do_info_cpus,
+ .mhandler.info_new = qmp_query_cpus,
},
{
.name = "pci",
@@ -2722,7 +2722,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show PCI info",
.user_print = do_pci_info_print,
- .mhandler.info_new = do_pci_info,
+ .mhandler.info_new = qmp_query_pci,
},
{
.name = "kvm",
@@ -2730,7 +2730,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show KVM information",
.user_print = do_info_kvm_print,
- .mhandler.info_new = do_info_kvm,
+ .mhandler.info_new = qmp_query_kvm,
},
{
.name = "status",
@@ -2738,7 +2738,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the current VM status (running|paused)",
.user_print = do_info_status_print,
- .mhandler.info_new = do_info_status,
+ .mhandler.info_new = qmp_query_status,
},
{
.name = "mice",
@@ -2746,7 +2746,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show which guest mouse is receiving events",
.user_print = do_info_mice_print,
- .mhandler.info_new = do_info_mice,
+ .mhandler.info_new = qmp_query_mice,
},
{
.name = "vnc",
@@ -2754,7 +2754,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the vnc server status",
.user_print = do_info_vnc_print,
- .mhandler.info_new = do_info_vnc,
+ .mhandler.info_new = qmp_query_vnc,
},
{
.name = "name",
@@ -2762,7 +2762,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the current VM name",
.user_print = do_info_name_print,
- .mhandler.info_new = do_info_name,
+ .mhandler.info_new = qmp_query_name,
},
{
.name = "uuid",
@@ -2770,7 +2770,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show the current VM UUID",
.user_print = do_info_uuid_print,
- .mhandler.info_new = do_info_uuid,
+ .mhandler.info_new = qmp_query_uuid,
},
{
.name = "migrate",
@@ -2778,7 +2778,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show migration status",
.user_print = do_info_migrate_print,
- .mhandler.info_new = do_info_migrate,
+ .mhandler.info_new = qmp_query_migrate,
},
{
.name = "balloon",
@@ -2786,7 +2786,7 @@ static const mon_cmd_t qmp_query_cmds[] = {
.params = "",
.help = "show balloon information",
.user_print = monitor_print_balloon,
- .mhandler.info_async = do_info_balloon,
+ .mhandler.info_async = qmp_query_balloon,
.flags = MONITOR_CMD_ASYNC,
},
{ /* NULL */ },
@@ -4615,7 +4615,7 @@ static QObject *get_qmp_greeting(void)
{
QObject *ver;
- do_info_version(NULL, &ver);
+ qmp_query_version(NULL, &ver);
return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}}",ver);
}
@@ -2589,7 +2589,7 @@ void qemu_chr_info_print(Monitor *mon, const QObject *ret_data)
qlist_iter(qobject_to_qlist(ret_data), qemu_chr_qlist_iter, mon);
}
-void qemu_chr_info(Monitor *mon, QObject **ret_data)
+void qmp_query_chardev(Monitor *mon, QObject **ret_data)
{
QList *chr_list;
CharDriverState *chr;
@@ -93,7 +93,7 @@ void qemu_chr_read(CharDriverState *s, uint8_t *buf, int len);
int qemu_chr_get_msgfd(CharDriverState *s);
void qemu_chr_accept_input(CharDriverState *s);
void qemu_chr_info_print(Monitor *mon, const QObject *ret_data);
-void qemu_chr_info(Monitor *mon, QObject **ret_data);
+void qmp_query_chardev(Monitor *mon, QObject **ret_data);
CharDriverState *qemu_chr_find(const char *name);
/* add an eventfd to the qemu devices that are polled */
@@ -327,7 +327,7 @@ void do_info_vnc_print(Monitor *mon, const QObject *data)
}
}
-void do_info_vnc(Monitor *mon, QObject **ret_data)
+void qmp_query_vnc(Monitor *mon, QObject **ret_data)
{
if (vnc_display == NULL || vnc_display->display == NULL) {
*ret_data = qobject_from_jsonf("{ 'enabled': false }");
Query handlers still carry their human monitor name. This commit renames all of them to a more QMP-like name. For example, do_info_version() is renamed to qmp_query_version(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- balloon.c | 4 +- balloon.h | 2 +- block.c | 4 +- block.h | 4 +- console.h | 4 +- hw/pci.c | 2 +- hw/pci.h | 2 +- input.c | 2 +- migration.c | 2 +- migration.h | 2 +- monitor.c | 74 +++++++++++++++++++++++++++++----------------------------- qemu-char.c | 2 +- qemu-char.h | 2 +- ui/vnc.c | 2 +- 14 files changed, 54 insertions(+), 54 deletions(-)