From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kg0Ek-0002Uz-JQ for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:50:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kg0Ei-0002UD-BV for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:50:41 -0400 Received: from [199.232.76.173] (port=59694 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kg0Ei-0002U9-7R for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:50:40 -0400 Received: from mail.gmx.net ([213.165.64.20]:44570) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Kg0Eg-00084w-Vn for qemu-devel@nongnu.org; Wed, 17 Sep 2008 12:50:40 -0400 Message-ID: <48D13556.2090704@gmx.at> Date: Wed, 17 Sep 2008 18:50:30 +0200 From: Andreas Winkelbauer MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000106060004010902020809" Subject: [Qemu-devel] [PATCH] remove warning when using auto filters with -usbdevice Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------000106060004010902020809 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --- bye, Andi --------------000106060004010902020809 Content-Type: text/x-patch; name="qemu-autofilter-add.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-autofilter-add.patch" 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")) { --------------000106060004010902020809--