error: Let converted handlers print in human monitor
authorMarkus Armbruster <armbru@redhat.com>
Tue, 2 Mar 2010 13:56:34 +0000 (14:56 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 16 Mar 2010 16:01:08 +0000 (17:01 +0100)
commitd3f02fa68587a4305a5ae3a336f2173c7ea58524
tree1b31f269b788b772394fd00a077eeae5fc9ea74f
parent17d8df980345a9441d9ed75464c4c36259320426
error: Let converted handlers print in human monitor

While fully converted handlers are not supposed to print anything when
running in a QMP monitor, they are free to print in a human monitor.
For instance, device_add (not yet converted) prints help, and will
continue to do so after conversion.

Moreover, utility functions converted to QError should remain usable
from unconverted handlers.

Two problems:

* handler_audit() complains when a converted handler prints.  Limit
  that to QMP monitors.

* With QMP, handlers need to pass the error object by way of
  monitor_set_error().  However, we do that both for QMP and for the
  human monitor.  The human monitor prints the error object after the
  handler returns.  If the handler prints anything else, that output
  "overtakes" the error message.

  Limit use of monitor_set_error() to QMP monitors.  Update
  handler_audit() accordingly.
monitor.c
qemu-error.c