2003-11-24 10:39:59 +03:00
# There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
2003-11-18 12:12:31 +03:00
# They provide the following subsitutions:
# %n - the "kernel number" of the device.
# for example, 'sda3' has a "kernel number" of '3'
2003-12-23 09:40:19 +03:00
# %k - the kernel name for the device.
2003-11-18 12:12:31 +03:00
# %M - the kernel major number for the device
# %m - the kernel minor number for the device
2003-11-19 09:48:46 +03:00
# %b - the bus id for the device
2004-01-14 05:31:18 +03:00
# %c - the return value of the external PROGRAM (note, this doesn't work within
2003-11-24 10:39:59 +03:00
# the PROGRAM field for the obvious reason.)
2003-11-25 10:45:38 +03:00
# %D - use the devfs style disk name for this device.
# For partitions, this will result in 'part%n'
2003-12-11 09:12:30 +03:00
# If this is not a partition, it will result in 'disc'
2003-11-18 12:12:31 +03:00
#
2003-11-24 10:39:59 +03:00
# Looking for scsi bus id 42:0:0:1
2004-01-13 10:45:30 +03:00
BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1", NAME="%c"
2003-11-24 10:39:59 +03:00
# A usb camera.
2004-01-13 10:13:10 +03:00
BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
2003-07-25 04:00:32 +04:00
2003-07-17 12:24:51 +04:00
# USB Epson printer to be called lp_epson
2004-01-13 10:13:10 +03:00
BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
2003-07-17 12:24:51 +04:00
# USB HP printer to be called lp_hp
2004-01-13 10:13:10 +03:00
BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
2003-07-17 12:24:51 +04:00
# sound card with PCI bus id 00:0b.0 to be the first sound card
2004-01-13 10:13:10 +03:00
BUS="pci", ID="00:0b.0", NAME="dsp"
2003-07-17 12:24:51 +04:00
# sound card with PCI bus id 00:07.1 to be the second sound card
2004-01-13 10:13:10 +03:00
BUS="pci", ID="00:07.1", NAME="dsp1"
2003-07-17 12:24:51 +04:00
# USB mouse plugged into the third port of the first hub to be called mouse0
2004-01-13 10:13:10 +03:00
BUS="usb", PLACE="1.3", NAME="mouse0"
2003-07-17 12:24:51 +04:00
2003-07-24 07:37:43 +04:00
# USB tablet plugged into the third port of the second hub to be called mouse1
2004-01-13 10:13:10 +03:00
BUS="usb", PLACE="2.3", NAME="mouse1"
BUS="usb", PLACE="2.4", NAME="mouse2"
2003-07-17 12:24:51 +04:00
# ttyUSB1 should always be called visor
2004-01-13 10:13:10 +03:00
KERNEL="ttyUSB1", NAME="visor"
KERNEL="ttyUSB0", NAME="pl2303"
2003-07-17 12:24:51 +04:00
2003-12-03 04:55:00 +03:00
# a devfs like way to name some tty devices
2004-01-13 10:13:10 +03:00
#KERNEL="ttyS*", NAME="tts/%n"
#KERNEL="tty*", NAME="vc/%n"
2003-12-03 04:55:00 +03:00
2004-01-06 12:11:15 +03:00
# if this is a ide cdrom, name it the default name, and create a symlink to cdrom
2004-01-13 10:45:30 +03:00
BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom"
2004-01-06 12:11:15 +03:00
2004-01-13 10:13:10 +03:00
# device mapper creates its own device nodes so ignore these
KERNEL="dm-[0-9]*", NAME=""
2004-01-10 12:14:34 +03:00
# DRI devices always go into a subdirectory (as per the LSB spec)
2004-01-13 10:13:10 +03:00
KERNEL="card*", NAME="dri/card%n"
2004-01-10 12:14:34 +03:00
2004-01-13 10:22:52 +03:00
# alsa devices
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hw[CD0-9]*", NAME="snd/%k"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL="midi[CD0-9]*", NAME="snd/%k"
KERNEL="timer", NAME="snd/%k"
KERNEL="seq", NAME="snd/%k"