mdev scan
Denys Vlasenko
vda.linux at googlemail.com
Fri Jul 4 15:07:20 PDT 2008
On Friday 04 July 2008 13:39, Holland, John wrote:
> 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.
How much is ok on those kernels? 4? 5?
> Is there any particular reason for scanning /sys/block and /sys/class separately other than
> to ascertain a nodes type?
I guess scanning whole /sys will go into e.g. /sys/module too
and it can be rather deep.
> Assuming a particular <name>/dev combination is unambiguous, one could scan the entire /sys tree
> without missing any '/dev's. I see three prerequisites.
Can you re-formulate your thoughts is a simpler way? By now, I don't
understand what is the problem you are trying to solve.
> The first is to ignore links while traversing,
Yeah, pity mdev author forgot to document why ACTION_FOLLOWLINKS
is necessary (example would be most useful).
Now we need to guess whether it's real necessity or just an oversight...
> 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.
Solution for what problem?
--
vda
More information about the busybox
mailing list