diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-04-28 20:52:17 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-04-28 20:52:17 +0200 |
commit | 5fc0fe383fff318b38291dcdf2cf38e329ec232a (patch) | |
tree | 11874fcce12774d3d3635bfda4e696c2cc4e1149 /qemu-io-cmds.c | |
parent | 2b4c0a20fbcfdba838d412d07739b2f4b6f7cd9a (diff) | |
parent | 262fbae692722d5c8b647ba6b079409baefc3e3e (diff) |
Merge remote-tracking branch 'mreitz/tags/pull-block-2017-04-28' into queue-block
Block patches for the block queue
# gpg: Signature made Fri Apr 28 20:50:48 2017 CEST
# gpg: using RSA key 0xF407DB0061D5CF40
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* mreitz/tags/pull-block-2017-04-28:
progress: Show current progress on SIGINFO
iotests: fix exclusion option
iotests: clarify help text
qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed
qemu-img: improve convert_iteration_sectors()
block: assert no image modification under BDRV_O_INACTIVE
block: fix obvious coding style mistakes in block_int.h
qcow2: Allow discard of final unaligned cluster
block: Add .bdrv_truncate() error messages
block: Add errp to BD.bdrv_truncate()
block: Add errp to b{lk,drv}_truncate()
block/vhdx: Make vhdx_create() always set errp
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r-- | qemu-io-cmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 312fc6d157..21af9e65b2 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -1567,6 +1567,7 @@ static const cmdinfo_t flush_cmd = { static int truncate_f(BlockBackend *blk, int argc, char **argv) { + Error *local_err = NULL; int64_t offset; int ret; @@ -1576,9 +1577,9 @@ static int truncate_f(BlockBackend *blk, int argc, char **argv) return 0; } - ret = blk_truncate(blk, offset); + ret = blk_truncate(blk, offset, &local_err); if (ret < 0) { - printf("truncate: %s\n", strerror(-ret)); + error_report_err(local_err); return 0; } |