block/qapi: Add indentation to bdrv_node_info_dump()

In order to let qemu-img info present a block graph, add a parameter to
bdrv_node_info_dump() and bdrv_image_info_specific_dump() so that the
information of nodes below the root level can be given an indentation.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220620162704.80987-9-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Hanna Reitz 2022-06-20 18:27:00 +02:00 committed by Kevin Wolf
parent 6cab33997b
commit 76c9e9750d
5 changed files with 34 additions and 25 deletions

View file

@ -725,7 +725,7 @@ static void print_block_info(Monitor *mon, BlockInfo *info,
monitor_printf(mon, "\nImages:\n");
image_info = inserted->image;
while (1) {
bdrv_node_info_dump(qapi_ImageInfo_base(image_info));
bdrv_node_info_dump(qapi_ImageInfo_base(image_info), 0);
if (image_info->backing_image) {
image_info = image_info->backing_image;
} else {