mirror of
https://github.com/mii443/qemu.git
synced 2025-12-18 06:19:07 +00:00
block: Avoid printing NULL string in error messages
Even for nodes that have a BlockBackend attached, bdrv_get_parent_name() can return NULL if the BB is anonymous (e.g. it belongs to a block job or a device that was created with a drive=<node-name> option). Remove the information from the error message. The user probably knows already why the node is still in use. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -68,9 +68,9 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/
|
||||
|
||||
=== Invalid command - snapshot node used as active layer ===
|
||||
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use by virtio0"}}
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use by virtio0"}}
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use by virtio1"}}
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use"}}
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use"}}
|
||||
{"error": {"class": "GenericError", "desc": "The snapshot is already in use"}}
|
||||
|
||||
=== Invalid command - snapshot node used as backing hd ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user