Purpose of rules file: The kernel does not always fully populate a given kobject's attributes before sending the uevent for that kobject. This means that a given sysfs directory may not have all the required files in it (each directory corresponds to a kobject, and each file corresponds to an attribute). Therefore, we must sometimes wait for attributes to show up when devices are discovered. This is accomplished by udev's WAIT_FOR_SYSFS rule types. Description of rules: All rules in this file match ACTION="add", because none of them apply when devices are being removed. SUBSYSTEM is the kernel subsystem that the device uses. Current kernels have some issues with SCSI device attributes being created too late. For any device with a SUBSYSTEM of scsi, we must wait for the ioerr_cnt attribute. (This is the last attribute created for SCSI devices, so when this attribute appears, the kobject is fully populated.) It is also possible to use SUBSYSTEMS in Udev rules. Using SUBSYSTEMS would cause Udev to search up the device tree for a matching SUBSYSTEM value. (Note that "the device tree" is not necessarily the same as the path under /sys (the DEVPATH). Rather, "up the device tree" is the path followed by udevinfo when it is given the argument "-a".) We do not use SUBSYSTEMS in this rule, because we only care about the SUBSYSTEM of the kobject in question. We don't care about devices that are children of SCSI devices, only the SCSI device itself. We will use SUBSYSTEMS in later rules, though.