]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
block/qapi: make @node-name in @BlockDeviceInfo non-optional
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 2 Jul 2025 12:31:28 +0000 (14:31 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Jul 2025 15:11:01 +0000 (17:11 +0200)
Since commit 15489c769b ("block: auto-generated node-names"), if the
node name of a block driver state is not explicitly specified, it
will be auto-generated.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250702123204.325470-3-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qapi.c
qapi/block-core.json

index e08a1e970f533c36b34df8e09f9cb3253d935b53..12fbf8d1b7f5172b6b90f517b630288dd6b595c9 100644 (file)
@@ -75,9 +75,7 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
         .no_flush       = !!(bs->open_flags & BDRV_O_NO_FLUSH),
     };
 
-    if (bs->node_name[0]) {
-        info->node_name = g_strdup(bs->node_name);
-    }
+    info->node_name = g_strdup(bs->node_name);
 
     children_list_tail = &info->children;
     QLIST_FOREACH(child, &bs->children, next) {
index 3e720af5adfed87c0c66a8c0a495f08fcdb51685..9d36927fc1240b6a825ca4ed6b0aa505789a02ff 100644 (file)
 # Since: 0.14
 ##
 { 'struct': 'BlockDeviceInfo',
-  'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
+  'data': { 'file': 'str', 'node-name': 'str', 'ro': 'bool', 'drv': 'str',
             '*backing_file': 'str', 'backing_file_depth': 'int',
             'children': ['BlockdevChild'],
             'active': 'bool', 'encrypted': 'bool',