]> err.no Git - systemd/commitdiff
rules: add SUBSYSTEM match to scsi rules
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 22 May 2009 14:44:53 +0000 (16:44 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 22 May 2009 14:44:53 +0000 (16:44 +0200)
On Fri, May 22, 2009 at 16:15, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
> I've been looking at what is responsible for all the path lookup activity in
> coldplug.  On my debian stable system, it looks like every device gets its
> parent looked up in sysfs.  I think this is due to SUBSYSTEMS matches.
>
> I see the udev default rules are different, but it looks like they still
> test for SUBSYSTEMS on every single device. Should we add SUBSYSTEM="scsi_generic"
> to these three rules?

rules/rules.d/50-udev-default.rules
rules/rules.d/60-persistent-storage-tape.rules

index 87c8977347bdad7c88c2b0e9942948783171155b..de96b95ba41a81c3f24d5e85ce5c15507d931a87 100644 (file)
@@ -69,18 +69,18 @@ KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitio
 # cdrom
 SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
 SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
-SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
+SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
 KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
 KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrom"
 
 # tape
 KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
 KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
-SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
+SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
 
 # block-releated
 KERNEL=="sch[0-9]*", GROUP="disk"
-SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
+SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
 KERNEL=="pg[0-9]*", GROUP="disk"
 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
 KERNEL=="rawctl", NAME="raw/rawctl", GROUP="disk"
index 8d53888924b439fe8d11c730bfbbb753061ee24d..30a011560862ef7ebf783cf62b29c04d1c0a0fd4 100644 (file)
@@ -5,7 +5,7 @@
 ACTION!="add|change", GOTO="persistent_storage_tape_end"
 
 # type 8 devices are "Medium Changers"
-KERNEL=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
+SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
 
 SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end"