[Toybox] [PATCH] mdev: Follow symbolic links in /sys

Rob Landley rob at landley.net
Thu Nov 29 17:37:45 PST 2018


On 11/19/18 12:05 AM, Marius Adaskevicius wrote:
> On 2018-11-17 01:21, Rob Landley wrote:
>> The problem with following symlinks is you can easily wind up in endless loops.
>> What it should be looking at is /sys/class/*/*/dev and then the first * being
>> block means mknod 'b' instead of 'c'.
>>
>> (Greg KH and Kay Sievers keep changing what's under sysfs and breaking code
>> attempting to parse it. It's really annoying. I wrestled with them for _years_
>> about it...)
> I agree, although currently dirtree callback skips entries that are more than
> two levels deep so endless loops should not be a problem.

Sorry for the delay. Fixed.

Rob



More information about the Toybox mailing list