mdev : bug corrected (patch attached) - recursive_action version

Renaud Cerrato renaud at toutsimplement.org
Mon Jun 11 07:56:37 UTC 2007


Dear,

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).

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20070611/754d98c9/attachment-0002.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdev.patch
Type: text/x-patch
Size: 2416 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070611/754d98c9/attachment-0002.bin 


More information about the busybox mailing list