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.


Reply via email to