On 2015-03-19 at 11:43, Alberto Garcia wrote:
There are several error messages that identify a BlockDriverState by
its device name. However those errors can be produced in nodes that
don't have a device name associated.
In those cases we should use bdrv_get_device_or_node_name() to fall
back to the node name and produce a more meaningful message.
Signed-off-by: Alberto Garcia <be...@igalia.com>
---
block.c | 13 +++++++------
block/qcow.c | 4 ++--
block/qcow2.c | 2 +-
block/qed.c | 2 +-
block/vdi.c | 2 +-
block/vhdx.c | 2 +-
block/vmdk.c | 4 ++--
block/vpc.c | 2 +-
block/vvfat.c | 3 ++-
9 files changed, 18 insertions(+), 16 deletions(-)
Well, it may pose a problem that the error messages often state "Device
'%s'", but with this change, it's not always a device, but sometimes
just a node. Maybe it would be better to replace the "Device" in the
error messages by "Node" (a node can be specified both by the node name
and the device name, whereas a device can only be referenced by its
device name).
Apart from this, the idea of this change looks good, though, as do the
changes done by this patch.
Max