[Spice-devel] [spice-gtk Win32 v5 02/22] usb-device-manager: warn if a device to remove was not found

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 9 05:45:15 PDT 2012


ack

On Mon, Jul 9, 2012 at 2:14 PM, Uri Lublin <uril at redhat.com> wrote:
> Also changed a bit the warning text on device-add to differentiate the two.
> ---
>  gtk/usb-device-manager.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
> index b39c2d4..8b277cc 100644
> --- a/gtk/usb-device-manager.c
> +++ b/gtk/usb-device-manager.c
> @@ -576,7 +576,7 @@ static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager  *self,
>          libusb_free_device_list(dev_list, 1);
>
>      if (!device) {
> -        g_warning("Could not find USB device at busnum %d devaddr %d",
> +        g_warning("Could not find USB device to add at busnum %d devaddr %d",
>                    bus, address);
>          return;
>      }
> @@ -624,8 +624,12 @@ static void spice_usb_device_manager_remove_dev(SpiceUsbDeviceManager  *self,
>              break;
>          }
>      }
> -    if (!device)
> +
> +    if (!device) {
> +        g_warning("Could not find USB device to remove at busnum %d devaddr %d",
> +                  bus, address);
>          return;
> +    }
>
>      spice_usb_device_manager_disconnect_device(self, (SpiceUsbDevice *)device);
>
> --
> 1.7.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list