Author: archaic
Date: 2006-05-12 17:29:17 -0600 (Fri, 12 May 2006)
New Revision: 7601
Modified:
trunk/udev-config/05-udev-early.rules
Log:
Added explanatory comments to 05-udev-early.rules.
Modified: trunk/udev-config/05-udev-early.rules
===================================================================
--- trunk/udev-config/05-udev-early.rules 2006-05-12 23:03:13 UTC (rev
7600)
+++ trunk/udev-config/05-udev-early.rules 2006-05-12 23:29:17 UTC (rev
7601)
@@ -1,4 +1,19 @@
-# sysfs is populated after the event is sent
+# The files, directories, and symlinks in /sys do not all appear at once. They
+# appear as the kernel identifies and enumerates them. However, the uevent for
+# any given device might sometimes be generated before this is finished. To
+# avoid race conditions, this rule matches those devices (which have an ACTION
+# of add, DEVPATH of /devices/*, and a non-empty environment variable named
+# PHYSDEVBUS) and causes Udev to wait until the kernel has created the needed
+# "bus" file (in this case it will be a symlink) for that particular device
+# before it attempts to match any other rule. This gives the kernel time to
+# enumerate the various devices and export them via sysfs.
+
ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*",
WAIT_FOR_SYSFS="bus"
+
+# Very similar to the previous rule, any uevent for devices handled by the
+# kernel's SCSI subsystem where the ACTION to take is "add" the device, Udev
+# will wait for the existence of the file /sys/bus/scsi/devices/<device
+# number>/ioerr_cnt (ioerr_cnt is known to be the last sysfs attribute created
+# for SCSI devices).
+
ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page