[Spice-devel] [PATCH spice-gtk 1/3] Suppress libusb open error messages when trying to open a device

Marc-André Lureau marcandre.lureau at gmail.com
Sun Nov 20 14:58:40 PST 2011


hi

On Sat, Nov 19, 2011 at 4:29 PM, Hans de Goede <hdegoede at redhat.com> wrote:
>    /* Silence open failing (ie permission denied) errors */
> +    g_object_set(priv->context, "debug_level", 0, NULL);
>     rc = libusb_open(_g_usb_device_get_device(priv->device), &handle);
> +    g_object_set(priv->context, "debug_level",
> +                 spice_util_get_debug() ? 3 : 2, NULL);

You have to admit it looks more like a quick patch rather than a
proper solution.

It would make sense if it would report a GError domain/code when
trying to open a device. This would need a wrap of libusb_open, which
I wonder why it is not done yet, and perhaps some changes in libusb
also, to not print a "normal error" case.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list