summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-06 17:00:49 +0000
committerDenis Vlasenko2008-07-06 17:00:49 +0000
commit67075bb95f23233c49628a624cc6ba86c3462dcb (patch)
tree771476bfbe7866968764c3c02dc99086bf91c825 /util-linux
parent58f59a25ee82dea19aeee082f52846244929a95e (diff)
downloadbusybox-67075bb95f23233c49628a624cc6ba86c3462dcb.zip
busybox-67075bb95f23233c49628a624cc6ba86c3462dcb.tar.gz
mdev: reinstate "follow symlinks" flag, this time with explanation
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mdev.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 9c4938a..a4c0520 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -420,14 +420,17 @@ int mdev_main(int argc, char **argv)
root_major = major(st.st_dev);
root_minor = minor(st.st_dev);
+ /* ACTION_FOLLOWLINKS is needed since in newer kernels
+ * /sys/block/loop* (for example) are symlinks to dirs,
+ * not real directories.
+ * (kernel's CONFIG_SYSFS_DEPRECATED makes them real dirs,
+ * but we can't enforce that on users) */
recursive_action("/sys/block",
- ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */,
+ ACTION_RECURSE | ACTION_FOLLOWLINKS,
fileAction, dirAction, temp, 0);
-
recursive_action("/sys/class",
- ACTION_RECURSE /* no ACTION_FOLLOWLINKS! */,
+ ACTION_RECURSE | ACTION_FOLLOWLINKS,
fileAction, dirAction, temp, 0);
-
} else {
/* Hotplug:
* env ACTION=... DEVPATH=... mdev