X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=blockdev.c;h=8e029e9c01b3ad6823bef64cd37e1741d195bc00;hb=8d9c72a2e2f21fb61e615478ea802799e3ef98f0;hp=03c7cd76517b77257abd5756d2053dcc917c6cbb;hpb=e9d42461920f6f40f4d847a5ba18e90d095ed0b9;p=thirdparty%2Fqemu.git diff --git a/blockdev.c b/blockdev.c index 03c7cd76517..8e029e9c01b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1088,11 +1088,11 @@ void hmp_commit(Monitor *mon, const QDict *qdict) blk = blk_by_name(device); if (!blk) { - monitor_printf(mon, "Device '%s' not found\n", device); + error_report("Device '%s' not found", device); return; } if (!blk_is_available(blk)) { - monitor_printf(mon, "Device '%s' has no medium\n", device); + error_report("Device '%s' has no medium", device); return; } @@ -1105,8 +1105,7 @@ void hmp_commit(Monitor *mon, const QDict *qdict) aio_context_release(aio_context); } if (ret < 0) { - monitor_printf(mon, "'commit' error for '%s': %s\n", device, - strerror(-ret)); + error_report("'commit' error for '%s': %s", device, strerror(-ret)); } } @@ -3205,7 +3204,7 @@ void qmp_block_resize(bool has_device, const char *device, } bdrv_drained_begin(bs); - ret = blk_truncate(blk, size, PREALLOC_MODE_OFF, errp); + ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); bdrv_drained_end(bs); out: