diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-28 14:41:25 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-28 14:41:25 -0600 |
commit | 6cebf7afac9287f7bcaeb0d8fd64fd7b75e3fa2c (patch) | |
tree | 0f9ca38c851e8e330a1bcdcd52c06da6b4a808c5 /blockdev.c | |
parent | 6034fe7bdb555c43022706e228cde8d52a8b341a (diff) | |
parent | 49b6d7220bce42e6c06e0dbb61969a997868491f (diff) |
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Lei Li (3) and others
# Via Luiz Capitulino
* luiz/queue/qmp:
QAPI: Introduce memchar-read QMP command
QAPI: Introduce memchar-write QMP command
qemu-char: Add new char backend CirMemCharDriver
docs: document virtio-balloon stats
balloon: re-enable balloon stats
balloon: drop old stats code & API
block: Monitor command commit neglects to report some errors
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/blockdev.c b/blockdev.c index 9126587c45..030070b607 100644 --- a/blockdev.c +++ b/blockdev.c @@ -642,21 +642,17 @@ void do_commit(Monitor *mon, const QDict *qdict) if (!strcmp(device, "all")) { ret = bdrv_commit_all(); - if (ret == -EBUSY) { - qerror_report(QERR_DEVICE_IN_USE, device); - return; - } } else { bs = bdrv_find(device); if (!bs) { - qerror_report(QERR_DEVICE_NOT_FOUND, device); + monitor_printf(mon, "Device '%s' not found\n", device); return; } ret = bdrv_commit(bs); - if (ret == -EBUSY) { - qerror_report(QERR_DEVICE_IN_USE, device); - return; - } + } + if (ret < 0) { + monitor_printf(mon, "'commit' error for '%s': %s\n", device, + strerror(-ret)); } } |