diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2009-10-07 13:41:55 -0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-08 21:17:18 -0500 |
commit | 13c7425e1a3b1f3503d87aaa765ff0112c6b4dd7 (patch) | |
tree | 0d9e711225210acb4a9fe47cd1d8beb1c6a7f2e4 /qemu-monitor.hx | |
parent | 13917beeaca78700a737506d9e1181e83fe41d93 (diff) |
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>
Diffstat (limited to 'qemu-monitor.hx')
-rw-r--r-- | qemu-monitor.hx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-monitor.hx b/qemu-monitor.hx index c689a074c..c37b0cb43 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -40,7 +40,8 @@ ETEXI .args_type = "item:s?", .params = "[subcommand]", .help = "show various information about the system state", - .mhandler.cmd = do_info, + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_info, }, STEXI |