OSDN Git Service

monitor: do_info(): handle new and old info handlers
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 7 Oct 2009 16:41:55 +0000 (13:41 -0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 9 Oct 2009 02:17:18 +0000 (21:17 -0500)
commit13c7425e1a3b1f3503d87aaa765ff0112c6b4dd7
tree0d9e711225210acb4a9fe47cd1d8beb1c6a7f2e4
parent13917beeaca78700a737506d9e1181e83fe41d93
monitor: do_info(): handle new and old info handlers

do_info() is special, its job is to call 'info handlers'.
This is similar to what monitor_handle_command() does,
therefore do_info() also has to distinguish among new and
old style info handlers.

This commit converts do_info() to the new QObject style and
makes the appropriate changes so that it can handle both
info handlers styles.

In the future, when all handlers are converted to QObject's
style, it will be possible to share more code with
monitor_handle_command().

This commit also introduces a new function called
monitor_user_noop(), it should be used by handlers which do
not have data to print.

This is the case of do_info().

Patchworks-ID: 35341
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c
qemu-monitor.hx