]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
block: Monitor command commit neglects to report some errors
authorJeff Cody <jcody@redhat.com>
Fri, 18 Jan 2013 17:45:35 +0000 (12:45 -0500)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 25 Jan 2013 12:36:26 +0000 (10:36 -0200)
commit58513bde833804bc9395d79fd81aae631b97c348
tree82b4326f09101e164a967ad04e4320ef86c4b32c
parent11c29918be32be5b00f367c7da9724a5cddbbb0f
block: Monitor command commit neglects to report some errors

The non-live bdrv_commit() function may return one of the following
errors: -ENOTSUP, -EBUSY, -EACCES, -EIO.  The only error that is
checked in the HMP handler is -EBUSY, so the monitor command 'commit'
silently fails for all error cases other than 'Device is in use'.

Report error using monitor_printf() and strerror(), and convert existing
qerror_report() calls in do_commit() to monitor_printf().

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
blockdev.c