[Spice-devel] [PATCH spice-gtk v2] usb-device-manager: Do not give warnings for supported configuration
Victor Toso
victortoso at redhat.com
Tue Aug 6 11:41:25 UTC 2019
On Mon, Aug 05, 2019 at 09:51:06AM -0400, Frediano Ziglio wrote:
> ping
Acked-by: Victor Toso <victortoso at redhat.com>
>
> >
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> > src/usb-device-manager.c | 14 ++++++++++----
> > 1 file changed, 10 insertions(+), 4 deletions(-)
> >
> > Changes since v1:
> > - conver a debug into warning to inform the user at least one time
> >
> > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> > index 9aba275f..a38e3c0d 100644
> > --- a/src/usb-device-manager.c
> > +++ b/src/usb-device-manager.c
> > @@ -243,7 +243,7 @@ static void
> > spice_usb_device_manager_init(SpiceUsbDeviceManager *self)
> > if (usbdk_is_driver_installed()) {
> > priv->usbdk_api = usbdk_api_load();
> > } else {
> > - spice_debug("UsbDk driver is not installed");
> > + g_warning("UsbDk driver is not installed");
> > }
> > #endif
> > #ifdef USE_USBREDIR
> > @@ -1668,7 +1668,9 @@ gboolean _usbdk_hider_prepare(SpiceUsbDeviceManager
> > *manager)
> > {
> > SpiceUsbDeviceManagerPrivate *priv = manager->priv;
> >
> > - g_return_val_if_fail(priv->usbdk_api != NULL, FALSE);
> > + if (priv->usbdk_api == NULL) {
> > + return FALSE;
> > + }
> >
> > if (priv->usbdk_hider_handle == NULL) {
> > priv->usbdk_hider_handle =
> > usbdk_create_hider_handle(priv->usbdk_api);
> > @@ -1686,7 +1688,9 @@ void _usbdk_hider_clear(SpiceUsbDeviceManager *manager)
> > {
> > SpiceUsbDeviceManagerPrivate *priv = manager->priv;
> >
> > - g_return_if_fail(priv->usbdk_api != NULL);
> > + if (priv->usbdk_api == NULL) {
> > + return;
> > + }
> >
> > if (priv->usbdk_hider_handle != NULL) {
> > usbdk_clear_hide_rules(priv->usbdk_api, priv->usbdk_hider_handle);
> > @@ -1700,7 +1704,9 @@ void _usbdk_hider_update(SpiceUsbDeviceManager
> > *manager)
> > {
> > SpiceUsbDeviceManagerPrivate *priv = manager->priv;
> >
> > - g_return_if_fail(priv->usbdk_api != NULL);
> > + if (priv->usbdk_api == NULL) {
> > + return;
> > + }
> >
> > if (priv->auto_connect_filter == NULL) {
> > SPICE_DEBUG("No autoredirect rules, no hider setup needed");
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190806/4006de33/attachment-0001.sig>
More information about the Spice-devel
mailing list