diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-06 17:00:49 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-06 17:00:49 +0000 |
commit | 67075bb95f23233c49628a624cc6ba86c3462dcb (patch) | |
tree | 771476bfbe7866968764c3c02dc99086bf91c825 /util-linux/mdev.c | |
parent | 58f59a25ee82dea19aeee082f52846244929a95e (diff) | |
download | busybox-w32-67075bb95f23233c49628a624cc6ba86c3462dcb.tar.gz busybox-w32-67075bb95f23233c49628a624cc6ba86c3462dcb.tar.bz2 busybox-w32-67075bb95f23233c49628a624cc6ba86c3462dcb.zip |
mdev: reinstate "follow symlinks" flag, this time with explanation
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r-- | util-linux/mdev.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 9c4938a70..a4c0520ac 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -420,14 +420,17 @@ int mdev_main(int argc, char **argv) | |||
420 | root_major = major(st.st_dev); | 420 | root_major = major(st.st_dev); |
421 | root_minor = minor(st.st_dev); | 421 | root_minor = minor(st.st_dev); |
422 | 422 | ||
423 | /* ACTION_FOLLOWLINKS is needed since in newer kernels | ||
424 | * /sys/block/loop* (for example) are symlinks to dirs, | ||
425 | * not real directories. | ||
426 | * (kernel's CONFIG_SYSFS_DEPRECATED makes them real dirs, | ||
427 | * but we can't enforce that on users) */ | ||
423 | recursive_action("/sys/block", | 428 | recursive_action("/sys/block", |
424 | ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */, | 429 | ACTION_RECURSE | ACTION_FOLLOWLINKS, |
425 | fileAction, dirAction, temp, 0); | 430 | fileAction, dirAction, temp, 0); |
426 | |||
427 | recursive_action("/sys/class", | 431 | recursive_action("/sys/class", |
428 | ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */, | 432 | ACTION_RECURSE | ACTION_FOLLOWLINKS, |
429 | fileAction, dirAction, temp, 0); | 433 | fileAction, dirAction, temp, 0); |
430 | |||
431 | } else { | 434 | } else { |
432 | /* Hotplug: | 435 | /* Hotplug: |
433 | * env ACTION=... DEVPATH=... mdev | 436 | * env ACTION=... DEVPATH=... mdev |