qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] remove warning when using auto filters with -usbdev


From: Andreas Winkelbauer
Subject: [Qemu-devel] [PATCH] remove warning when using auto filters with -usbdevice
Date: Wed, 17 Sep 2008 18:50:30 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

This patch adds a check in usb_device_add() to distinguish between usb
auto filters and usb devices.

In turn confusing warnings like "Warning: could not add USB device
host:auto:..." are removed.

Signed-off-by: Andreas Winkelbauer <address@hidden>
---

bye,
Andi
diff -uNrp trunk.orig/vl.c trunk/vl.c
--- trunk.orig/vl.c     2008-09-17 02:11:53.000000000 +0200
+++ trunk/vl.c  2008-09-17 03:20:28.000000000 +0200
@@ -5786,7 +5786,13 @@ static int usb_device_add(const char *de
         return -1;
 
     if (strstart(devname, "host:", &p)) {
-        dev = usb_host_device_open(p);
+        /* check if we actually want to add an auto filter */
+        if (strstart(p, "auto:", NULL))        {
+            usb_host_device_open(p);
+            return 0;
+        } else {
+            dev = usb_host_device_open(p);
+        }
     } else if (!strcmp(devname, "mouse")) {
         dev = usb_mouse_init();
     } else if (!strcmp(devname, "tablet")) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]