diff options
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r-- | qemu-io-cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index f91b6c4f02..8565d49336 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -1830,6 +1830,10 @@ static int alloc_f(BlockDriverState *bs, int argc, char **argv) sector_num = offset >> 9; while (remaining) { ret = bdrv_is_allocated(bs, sector_num, remaining, &num); + if (ret < 0) { + printf("is_allocated failed: %s\n", strerror(-ret)); + return 0; + } sector_num += num; remaining -= num; if (ret) { |