[Spice-devel] [spice-gtk v2 3/3] win-usb-dev: improve warning message

Christophe Fergeau cfergeau at redhat.com
Tue Nov 15 16:22:11 UTC 2016


On Tue, Nov 15, 2016 at 02:33:16PM +0100, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> With the actual reason for failure. This might help to identify why
> code might be crashing or failing.
> 
> Signed-off-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/win-usb-dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c
> index 5e5bb4d..d5c2d91 100644
> --- a/src/win-usb-dev.c
> +++ b/src/win-usb-dev.c
> @@ -141,7 +141,7 @@ g_udev_client_list_devices(GUdevClient *self, GList **devs,
>      rc = libusb_get_device_list(priv->ctx, &lusb_list);
>      if (rc < 0) {
>          const char *errstr = spice_usbutil_libusb_strerror(rc);
> -        g_warning("%s: libusb_get_device_list failed", name);
> +        g_warning("%s: libusb_get_device_list failed due %s", name, errstr);

I would not try to build a sentence out of it, ie s/due/[some separator]
Maybe ':' again, or '-'

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161115/c10ee65d/attachment.sig>


More information about the Spice-devel mailing list