block: Avoid printing NULL string in error messages
authorKevin Wolf <kwolf@redhat.com>
Wed, 21 Sep 2016 12:56:09 +0000 (14:56 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 23 Sep 2016 11:45:36 +0000 (13:45 +0200)
commite467da7b92ca207f02d29f52583a1097440a83cc
tree6afecef09cbb02797269c3aa0b007326554e8450
parent62acae8a9d20c872212aec59d4a0a634a97e87f0
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>
blockdev.c
tests/qemu-iotests/085.out