Hi,
On 11/09/2010 09:43 PM, Yuriy Kaminskiy wrote:
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.
Ah I did not know that, well the same information is available in de->d_name,
and has
been so for much longer. So I'll do a new version getting it from de->d_name
instead.
Thanks,
Hans