diff options
author | Max Reitz <mreitz@redhat.com> | 2017-03-28 22:51:29 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-04-28 16:02:03 +0200 |
commit | f59adb325618a2d2ba16aece551e7ab6acadb0ae (patch) | |
tree | bf67551473ad370d0b4ce17906c93247246aa622 /block/iscsi.c | |
parent | 4bff28b81a0ddb48a09d279e99ab847e8a292506 (diff) | |
download | qemu-f59adb325618a2d2ba16aece551e7ab6acadb0ae.zip qemu-f59adb325618a2d2ba16aece551e7ab6acadb0ae.tar.gz qemu-f59adb325618a2d2ba16aece551e7ab6acadb0ae.tar.bz2 |
block: Add .bdrv_truncate() error messages
Add missing error messages for the block driver implementations of
.bdrv_truncate(); drop the generic one from block.c's bdrv_truncate().
Since one of these changes touches a mis-indented block in
block/file-posix.c, this patch fixes that coding style issue along the
way.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170328205129.15138-5-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r-- | block/iscsi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 1ef38cf..5daa201 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2065,6 +2065,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64_t offset, Error **errp) Error *local_err = NULL; if (iscsilun->type != TYPE_DISK) { + error_setg(errp, "Cannot resize non-disk iSCSI devices"); return -ENOTSUP; } @@ -2075,6 +2076,7 @@ static int iscsi_truncate(BlockDriverState *bs, int64_t offset, Error **errp) } if (offset > iscsi_getlength(bs)) { + error_setg(errp, "Cannot grow iSCSI devices"); return -EINVAL; } |