mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
bdrv_query_image_info Error parameter added
Inform a user in case qcow2_get_specific_info fails to obtain QCOW2 image specific information. This patch is preliminary to the one "qcow2: Add list of bitmaps to ImageInfoSpecificQCow2". Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <1549638368-530182-2-git-send-email-andrey.shinkevich@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
269ee27e99
commit
1bf6e9ca92
8 changed files with 32 additions and 15 deletions
|
|
@ -1661,6 +1661,7 @@ static int info_f(BlockBackend *blk, int argc, char **argv)
|
|||
BlockDriverState *bs = blk_bs(blk);
|
||||
BlockDriverInfo bdi;
|
||||
ImageInfoSpecific *spec_info;
|
||||
Error *local_err = NULL;
|
||||
char s1[64], s2[64];
|
||||
int ret;
|
||||
|
||||
|
|
@ -1682,7 +1683,11 @@ static int info_f(BlockBackend *blk, int argc, char **argv)
|
|||
printf("cluster size: %s\n", s1);
|
||||
printf("vm state offset: %s\n", s2);
|
||||
|
||||
spec_info = bdrv_get_specific_info(bs);
|
||||
spec_info = bdrv_get_specific_info(bs, &local_err);
|
||||
if (local_err) {
|
||||
error_report_err(local_err);
|
||||
return -EIO;
|
||||
}
|
||||
if (spec_info) {
|
||||
printf("Format specific information:\n");
|
||||
bdrv_image_info_specific_dump(fprintf, stdout, spec_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue