summary refs log tree commit diff stats
path: root/qemu-io-cmds.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:17:55 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-18 22:18:59 +0200
commite1ce7d747bc071f86a77683b433b852001163c2c (patch)
treeb9459e51db7b87862c632ecb47342488bbd9b1a4 /qemu-io-cmds.c
parentac7ff4cf5f20eee8cec228209f6b3ca557c60639 (diff)
downloadfocaccia-qemu-e1ce7d747bc071f86a77683b433b852001163c2c.tar.gz
focaccia-qemu-e1ce7d747bc071f86a77683b433b852001163c2c.zip
block/qapi: Clean up how we print to monitor or stdout
bdrv_snapshot_dump(), bdrv_image_info_specific_dump(),
bdrv_image_info_dump() and their helpers take an fprintf()-like
callback and a FILE * to pass to it.

hmp.c passes monitor_printf() cast to fprintf_function and the current
monitor cast to FILE *.

qemu-img.c and qemu-io-cmds.c pass fprintf and stdout.

The type-punning is technically undefined behaviour, but works in
practice.  Clean up: drop the callback, and call qemu_printf()
instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190417191805.28198-8-armbru@redhat.com>
Diffstat (limited to 'qemu-io-cmds.c')
-rw-r--r--qemu-io-cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 09750a23ce..8826bebaf6 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1699,7 +1699,7 @@ static int info_f(BlockBackend *blk, int argc, char **argv)
     }
     if (spec_info) {
         printf("Format specific information:\n");
-        bdrv_image_info_specific_dump(fprintf, stdout, spec_info);
+        bdrv_image_info_specific_dump(spec_info);
         qapi_free_ImageInfoSpecific(spec_info);
     }