backup: Improve error for bdrv_getlength() failure
commit58226634c4b02af7b10862f7fbd3610a344bfb7f
authorKevin Wolf <kwolf@redhat.com>
Thu, 30 Apr 2020 14:27:53 +0000 (30 16:27 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 May 2020 11:26:35 +0000 (8 13:26 +0200)
tree3b3f4982cd47516e6ae9b3fd19ace71c3b6471d4
parent813cc2545b82409fd504509f0ba2e96fab6edb9e
backup: Improve error for bdrv_getlength() failure

bdrv_get_device_name() will be an empty string with modern management
tools that don't use -drive. Use bdrv_get_device_or_node_name() instead
so that the node name is used if the BlockBackend is anonymous.

While at it, start with upper case to make the message consistent with
the rest of the function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20200430142755.315494-3-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/backup.c