From 54fde4ff0621c22b15cbaaa3c74301cc0dbd1c9e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 4 Nov 2022 17:06:52 +0100 Subject: qapi block: Elide redundant has_FOO in generated C The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/block*.json. Said commit explains the transformation in more detail. There is one instance of the invariant violation mentioned there: qcow2_signal_corruption() passes false, "" when node_name is an empty string. Take care to pass NULL then. The previous two commits cleaned up two more. Additionally, helper bdrv_latency_histogram_stats() loses its output parameters and returns a value instead. Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20221104160712.3005652-11-armbru@redhat.com> [Fixes for #ifndef LIBRBD_SUPPORTS_ENCRYPTION and MacOS squashed in] --- monitor/hmp-cmds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'monitor/hmp-cmds.c') diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 01b789a..878e3ca 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1496,8 +1496,7 @@ void hmp_change(Monitor *mon, const QDict *qdict) } } - qmp_blockdev_change_medium(true, device, false, NULL, target, - !!arg, arg, true, force, + qmp_blockdev_change_medium(device, NULL, target, arg, true, force, !!read_only, read_only_mode, &err); } -- cgit v1.1