On Monday 11 June 2007, Renaud Cerrato wrote:
> Here's the patch correcting mdev, using recursive_action :
>
> We noticed that some devices were not attached to /dev/ using "mdev -s".
> Looking at the source code, the function which walk through the /sys/ tree
> make use of lstat, but the /sys tree can use symlink as seen here :
>
> $ ls -l /sys/class/misc/
> lrwxrwxrwx    1 root     root            0 Jan  1  1970 watchdog ->
> ../../devices/platform/at91sam9x_wdt/watchdog
>
> Doing so, the function can't walk through symbolic links. By replacing
> lstat by stat, the problem is corrected.
> To avoid infinite loop, we added a walking through depth limit to 2 (see
> udevstart.c).

almost ... you introduced a little memory corruption there and that's no 
good ;)

(notice how make_dev() requires the string be writable and that there be 64 
bytes to spare at the end)

but otherwise, recursive_action() is good stuff

try out current svn now please
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to