On Tue, May 03, 2022 at 04:55:26PM +0200, Hanna Reitz wrote:
> When a block driver supports obtaining format-specific information, but
> that object only contains optional fields, it is possible that none of
> them are present, so that dump_qobject() (called by
> bdrv_image_info_specific_dump()) will not print anything.
> 
> The callers of bdrv_image_info_specific_dump() put a header above this
> information ("Format specific information:\n"), which will look strange
> when there is nothing below.  Modify bdrv_image_info_specific_dump() to
> print this header instead of its callers, and only if there is indeed
> something to be printed.
> 
> Signed-off-by: Hanna Reitz <hre...@redhat.com>
> ---
>  include/block/qapi.h |  3 ++-
>  block/qapi.c         | 41 +++++++++++++++++++++++++++++++++++++----
>  qemu-io-cmds.c       |  4 ++--
>  3 files changed, 41 insertions(+), 7 deletions(-)
>

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply via email to