From: Andreas Winkelbauer <andreas.winkelbauer@gmx.at>
To: aliguori@us.ibm.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] remove warning when using auto filters with -usbdevice
Date: Wed, 17 Sep 2008 18:50:30 +0200 [thread overview]
Message-ID: <48D13556.2090704@gmx.at> (raw)
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
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 <andreas.winkelbauer@gmx.at>
---
bye,
Andi
[-- Attachment #2: qemu-autofilter-add.patch --]
[-- Type: text/x-patch, Size: 678 bytes --]
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")) {
next reply other threads:[~2008-09-17 16:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 16:50 Andreas Winkelbauer [this message]
2008-09-22 14:44 ` [Qemu-devel] [PATCH] remove warning when using auto filters with -usbdevice Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48D13556.2090704@gmx.at \
--to=andreas.winkelbauer@gmx.at \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.