migration: Use error_reportf_err() instead of monitor_printf()
commitd410fe145446968055f3807b0d41ae8150eb0926
authorMarkus Armbruster <armbru@redhat.com>
Fri, 18 Dec 2015 15:35:17 +0000 (18 16:35 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 13 Jan 2016 14:16:17 +0000 (13 15:16 +0100)
tree320017213ad4a7291b6050da372b46f7351f73e8
parentb83baa6025d0bf921f2fc4514df4f60493ea41de
migration: Use error_reportf_err() instead of monitor_printf()

Both error_reportf_err() and monitor_printf() print to the same
destination when monitor_printf() is used correctly, i.e. within an
HMP monitor.  Elsewhere, monitor_printf() does nothing, while
error_reportf_err() reports to stderr.

Both changed functions are HMP command handlers.  These should only
run within an HMP monitor.

Unlike monitor_printf(), error_reportf_err() uses the error whole
instead of just its message obtained with error_get_pretty().  This
avoids suppressing its hint (see commit 50b7b00), but I don't think
the errors touched in this commit can come with hints.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-15-git-send-email-armbru@redhat.com>
migration/savevm.c