[Spice-devel] [PATCH usbredir] usbredirtestclient: don't show device info after a failure open

Chen Hanxiao chen_han_xiao at 126.com
Tue Nov 28 07:19:12 UTC 2017



At 2017-11-28 15:10:10, "Chen Hanxiao" <chen_han_xiao at 126.com> wrote:
>From: Chen Hanxiao <chenhanxiao at gmail.com>
>
>If we don't open a USB device successfully,
>don't try to show device info logs.
>
>Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
>---
> usbredirserver/usbredirserver.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/usbredirserver/usbredirserver.c b/usbredirserver/usbredirserver.c
>index 131ed5e..5a4adc5 100644
>--- a/usbredirserver/usbredirserver.c
>+++ b/usbredirserver/usbredirserver.c
>@@ -366,8 +366,7 @@ int main(int argc, char *argv[])
>                 fprintf(stderr,
>                     "Could not open an usb-device with vid:pid %04x:%04x\n",
>                     usbvendor, usbproduct);
>-            }
>-            if (verbose >= usbredirparser_info) {
>+            } else if (verbose >= usbredirparser_info) {
>                 libusb_device *dev;
>                 dev = libusb_get_device(handle);
>                 fprintf(stderr, "Open a usb-device with vid:pid %04x:%04x on "
>-- 

I forgot to change the prefix of the title.
Sorry for the noise.

v2 will come soon.

Regards,
- Chen


More information about the Spice-devel mailing list