[libvirt] [PATCH 1/3] storage: Don't lie about path used to look up in error message

Eric Blake eblake at redhat.com
Mon Feb 24 17:58:42 UTC 2014


On 02/24/2014 08:21 AM, Peter Krempa wrote:
> In storageVolLookupByPath the provided path is "sanitized" at first.
> This removes some extra slashes and stuff. When the lookup of the volume
> fails the original path is used which makes it hard to trace errors in
> some cases.
> 
> Improve the error message to print the sanitized path along with the
> user provided path if they are not equal.
> ---
>  src/storage/storage_driver.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 

> +                           _("no storage vol with matching path '%s'"), path);
> +        } else {
> +            virReportError(VIR_ERR_NO_STORAGE_VOL,
> +                           _("no storage vol with matching path '%s' (%s)"), path, cleanpath);

Long line; break after the first ','

ACK with that change; makes sense to me to give a bit more information
in the error message.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140224/c910dff9/attachment-0001.sig>


More information about the libvir-list mailing list