diff options
author | Fam Zheng <famz@redhat.com> | 2017-01-19 21:07:58 +0800 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-02-12 00:47:41 +0100 |
commit | 9adceb02133f856fc69bf105848849f409e805b9 (patch) | |
tree | 7c38eef965a478838dff69d51864aca76edb7d5a /block/qapi.c | |
parent | 6b33f3ae8b79726ef0812597b8a83c3e82d31514 (diff) |
qapi: Tweak error message of bdrv_query_image_info
@bs doesn't always have a device name, such as when it comes from
"qemu-img info". Report file name instead.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 20170119130759.28319-2-famz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qapi.c')
-rw-r--r-- | block/qapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qapi.c b/block/qapi.c index a62e862f3c..63297353f7 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -237,8 +237,8 @@ void bdrv_query_image_info(BlockDriverState *bs, size = bdrv_getlength(bs); if (size < 0) { - error_setg_errno(errp, -size, "Can't get size of device '%s'", - bdrv_get_device_name(bs)); + error_setg_errno(errp, -size, "Can't get image size '%s'", + bs->exact_filename); goto out; } |