svn commit: trunk/busybox/util-linux
vda at busybox.net
vda at busybox.net
Fri Feb 13 00:02:56 UTC 2009
Author: vda
Date: 2009-02-13 00:02:54 +0000 (Fri, 13 Feb 2009)
New Revision: 25311
Log:
mdev: if /sys/class/block exists, don't scan /sys/block
Modified:
trunk/busybox/util-linux/mdev.c
Changeset:
Modified: trunk/busybox/util-linux/mdev.c
===================================================================
--- trunk/busybox/util-linux/mdev.c 2009-02-12 20:21:12 UTC (rev 25310)
+++ trunk/busybox/util-linux/mdev.c 2009-02-13 00:02:54 UTC (rev 25311)
@@ -420,10 +420,17 @@
* /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 | ACTION_FOLLOWLINKS | ACTION_QUIET,
- fileAction, dirAction, temp, 0);
+ * but we can't enforce that on users)
+ */
+ if (access("/sys/class/block", F_OK) != 0) {
+ /* Scan obsolete /sys/block only if /sys/class/block
+ * doesn't exist. Otherwise we'll have dupes.
+ */
+ recursive_action("/sys/block",
+ ACTION_RECURSE | ACTION_FOLLOWLINKS,
+ // not needed now? | ACTION_QUIET
+ fileAction, dirAction, temp, 0);
+ }
recursive_action("/sys/class",
ACTION_RECURSE | ACTION_FOLLOWLINKS,
fileAction, dirAction, temp, 0);
More information about the busybox-cvs
mailing list