diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-21 15:29:55 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-27 11:48:46 -0200 |
commit | e235cec3762d2aa20b548114ea7b172113690463 (patch) | |
tree | a7eda7c51ade1d852efe097431676d822c48bded /hmp.c | |
parent | 694a099a542563f40116743c963066ce142a7755 (diff) | |
download | qemu-e235cec3762d2aa20b548114ea7b172113690463.zip qemu-e235cec3762d2aa20b548114ea7b172113690463.tar.gz qemu-e235cec3762d2aa20b548114ea7b172113690463.tar.bz2 |
qapi: Convert query-mice
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -94,6 +94,26 @@ void hmp_info_chardev(Monitor *mon) qapi_free_ChardevInfoList(char_info); } +void hmp_info_mice(Monitor *mon) +{ + MouseInfoList *mice_list, *mouse; + + mice_list = qmp_query_mice(NULL); + if (!mice_list) { + monitor_printf(mon, "No mouse devices connected\n"); + return; + } + + for (mouse = mice_list; mouse; mouse = mouse->next) { + monitor_printf(mon, "%c Mouse #%" PRId64 ": %s%s\n", + mouse->value->current ? '*' : ' ', + mouse->value->index, mouse->value->name, + mouse->value->absolute ? " (absolute)" : ""); + } + + qapi_free_MouseInfoList(mice_list); +} + void hmp_quit(Monitor *mon, const QDict *qdict) { monitor_suspend(mon); |