svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Sun Jul 6 10:00:50 PDT 2008


Author: vda
Date: 2008-07-06 10:00:49 -0700 (Sun, 06 Jul 2008)
New Revision: 22668

Log:
mdev: reinstate "follow symlinks" flag, this time with explanation



Modified:
   trunk/busybox/util-linux/mdev.c


Changeset:
Modified: trunk/busybox/util-linux/mdev.c
===================================================================
--- trunk/busybox/util-linux/mdev.c	2008-07-06 13:55:55 UTC (rev 22667)
+++ trunk/busybox/util-linux/mdev.c	2008-07-06 17:00:49 UTC (rev 22668)
@@ -420,14 +420,17 @@
 		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



More information about the busybox-cvs mailing list