From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel@nongnu.org
Cc: linux@tjworld.net
Subject: [Qemu-devel] [PATCH] Silence warnings (was: [5441] Add USB sys file-system support (v8) (TJ))
Date: Fri, 24 Oct 2008 14:14:24 +0200 [thread overview]
Message-ID: <4901BC20.3070903@siemens.com> (raw)
In-Reply-To: <E1KnIpJ-00078B-RC@cvs.savannah.gnu.org>
Anthony Liguori wrote:
> Revision: 5441
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5441
> Author: aliguori
> Date: 2008-10-07 20:06:37 +0000 (Tue, 07 Oct 2008)
>
> Log Message:
> -----------
> Add USB sys file-system support (v8) (TJ)
>
> This patch adds support for host USB devices discovered via:
>
> /sys/bus/usb/devices/* and opened from /dev/bus/usb/*/*
> /dev/bus/usb/devices and opened from /dev/bus/usb/*/*
>
> in addition to the existing discovery via:
>
> /proc/bus/usb/devices and opened from /proc/bus/usb/*/*
And it introduces a few more warnings to the non-debug build... Possible
fix below.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
usb-linux.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: b/usb-linux.c
===================================================================
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -76,6 +76,8 @@ static int usb_host_find_device(int *pbu
#define dprintf(...)
#endif
+#define USBDBG_DEVOPENED "husb: opened %s/devices\n"
+
#define USBPROCBUS_PATH "/proc/bus/usb"
#define PRODUCT_NAME_SZ 32
#define MAX_ENDPOINTS 16
@@ -1262,8 +1264,6 @@ static int usb_host_scan(void *opaque, U
FILE *f = 0;
DIR *dir = 0;
int ret = 0;
- const char *devices = "/devices";
- const char *opened = "husb: opened %s%s\n";
const char *fs_type[] = {"unknown", "proc", "dev", "sys"};
char devpath[PATH_MAX];
@@ -1275,7 +1275,7 @@ static int usb_host_scan(void *opaque, U
strcpy(devpath, USBPROCBUS_PATH);
usb_fs_type = USB_FS_PROC;
fclose(f);
- dprintf(opened, USBPROCBUS_PATH, devices);
+ dprintf(USBDBG_DEVOPENED, USBPROCBUS_PATH);
goto found_devices;
}
/* try additional methods if an access method hasn't been found yet */
@@ -1285,7 +1285,7 @@ static int usb_host_scan(void *opaque, U
strcpy(devpath, USBDEVBUS_PATH);
usb_fs_type = USB_FS_DEV;
fclose(f);
- dprintf(opened, USBDEVBUS_PATH, devices);
+ dprintf(USBDBG_DEVOPENED, USBDEVBUS_PATH);
goto found_devices;
}
dir = opendir(USBSYSBUS_PATH "/devices");
@@ -1294,7 +1294,7 @@ static int usb_host_scan(void *opaque, U
strcpy(devpath, USBDEVBUS_PATH);
usb_fs_type = USB_FS_SYS;
closedir(dir);
- dprintf(opened, USBSYSBUS_PATH, devices);
+ dprintf(USBDBG_DEVOPENED, USBSYSBUS_PATH);
goto found_devices;
}
found_devices:
next prev parent reply other threads:[~2008-10-24 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 20:06 [Qemu-devel] [5441] Add USB sys file-system support (v8) (TJ) Anthony Liguori
2008-10-24 12:14 ` Jan Kiszka [this message]
2008-10-25 11:48 ` [Qemu-devel] [PATCH] Silence warnings (was: [5441] Add USB sys file-system support (v8) (TJ)) Blue Swirl
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=4901BC20.3070903@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=linux@tjworld.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).