linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev.rules.devfs patch
@ 2004-01-15 14:23 John L. Fjellstad
  2004-01-15 14:49 ` Kay Sievers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: John L. Fjellstad @ 2004-01-15 14:23 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: clearsigned data --]
[-- Type: Text/Plain, Size: 493 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is a patch for udev.rules.devfs to make it closer to devfs layout.
Basically, added discs/disc? directories, and the cdrom directory

- -- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iEYEARECAAYFAkAGon4ACgkQkz0vhQtHHRhGlACgyGxHvvwnhlHsmTl11C32NHkB
1WwAoMBdiMwkWmtg7FKkDTOc+QYRGltt
=mOcE
-----END PGP SIGNATURE-----

[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1737 bytes --]

--- udev.rules.devfs.orig	2004-01-15 15:14:53.000000000 +0100
+++ udev.rules.devfs	2004-01-15 15:19:49.000000000 +0100
@@ -16,11 +16,19 @@
 #      If this is not a partition, it will result in 'disc'
 #
 
+# if this is an ide cdrom, put it in the cdroms directory and create symlinks
+# first matching rule decides the name
+BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="cdroms/cdrom%m", SYMLINK="cdrom dvd"
+
 # ide block devices
-BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
-BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
-BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
-BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
+BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc0/%D"
+BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D", SYMLINK="discs/disc1/%D"
+BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D", SYMLINK="discs/disc2/%D"
+BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D", SYMLINK="discs/disc3/%D"
+
+# scsi block devices
+BUS="scsi", id="0:0:0:0", NAME="scsi/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc4/%D"
+BUS="scsi", id="0:0:0:1", NAME="scsi/host0/bus0/target0/lun0/%D", SYMLINK="discs/disc5/%D"
 
 # md block devices
 KERNEL="md[0-9]*", NAME="md/%n"
@@ -49,13 +57,13 @@
 KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
 
 # loop devices
-KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
+KERNEL="loop[0-9]*", NAME="loop/%n"
 
 # ramdisks
-KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
+KERNEL="ram[0-9]*", NAME="rd/%n"
 
 # framebuffer devices
-KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
+KERNEL="fb[0-9]*", NAME="fb/%n"
 
 # misc
 KERNEL="rtc",   NAME="misc/%k", SYMLINK="%k"

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-15 21:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-15 14:23 udev.rules.devfs patch John L. Fjellstad
2004-01-15 14:49 ` Kay Sievers
2004-01-15 15:00 ` Martin Hicks
2004-01-15 15:07 ` Kay Sievers
2004-01-15 21:43 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).