mdev scan
Holland, John
John.Holland at cellent-fs.de
Fri Jul 4 11:39:12 UTC 2008
Hi,
I'm having problems scanning usb_endpoint '/dev's on older kernels, 2.6.13 in particular.
The usb_endpoints are beyond the constant MAX_SYSFS_DEPTH somewhere under /sys.
Is there any particular reason for scanning /sys/block and /sys/class separately other than
to ascertain a nodes type?
Assuming a particular <name>/dev combination is unambiguous, one could scan the entire /sys tree
without missing any '/dev's. I see three prerequisites. The first is to ignore links while traversing
, the second is to drop the maximal search depth and last determine a nodes type by searching
for '/block/' in the first len('/class/block/') characters in the resulting search path.
A solution may however, result in longer scan times, but reduces executable size and code complexity.
John Holland
___________________________________________
Cellent Finance Solutions AG
Firmensitz: Calwer Straße 33, 70173 Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 720743
Vorstand: Thomas Wild
Vorsitzender des Aufsichtsrats: Rudolf Zipf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080704/45cb4d0b/attachment-0002.htm
More information about the busybox
mailing list