[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] block: use bdrv_get_device_or_node_name() i

From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 2/3] block: use bdrv_get_device_or_node_name() in error messages
Date: Thu, 19 Mar 2015 15:37:06 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

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 <address@hidden>
  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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]