[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/3] usb-linux: Store devpath into USBHostDevice
From: |
Yuriy Kaminskiy |
Subject: |
[Qemu-devel] Re: [PATCH 1/3] usb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS |
Date: |
Tue, 09 Nov 2010 23:43:55 +0300 |
User-agent: |
Icedove 1.5.0.14eol (X11/20090105) |
Hans de Goede wrote:
> This allows us to recreate the sysfspath used during scanning later
> (which will be used in a later patch in this series).
> ---
> usb-linux.c | 29 +++++++++++++++++++----------
> 1 files changed, 19 insertions(+), 10 deletions(-)
>
> diff --git a/usb-linux.c b/usb-linux.c
> index c3c38ec..61e8ec6 100644
> --- a/usb-linux.c
> +++ b/usb-linux.c
[...]
> @@ -1300,6 +1302,13 @@ static int usb_host_scan_sys(void *opaque, USBScanFunc
> *func)
> if (sscanf(line, "%d", &addr) != 1) {
> goto the_end;
> }
> + if (!usb_host_read_file(line, sizeof(line), "devpath",
> + de->d_name)) {
> + goto the_end;
> + }
FYI: "devpath" attribute was introduced in 2.6.33 kernel.