chiark / gitweb /
[PATCH] remove unneeded keyboard rule.
[elogind.git] / etc / udev / udev.rules
1 # There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
2 # They provide the following subsitutions:
3 # %n - the "kernel number" of the device.
4 #      for example, 'sda3' has a "kernel number" of '3'
5 # %k - the kernel name for the device.
6 # %M - the kernel major number for the device
7 # %m - the kernel minor number for the device
8 # %b - the bus id for the device
9 # %c - the return value of the external PROGRAM (note, this doesn't work within
10 #      the PROGRAM field for the obvious reason.)
11 # %D - use the devfs style disk name for this device.
12 #      For partitions, this will result in 'part%n'
13 #      If this is not a partition, it will result in 'disc'
14 #
15
16 # Looking for scsi bus id 42:0:0:1
17 BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1", NAME="%c"
18
19 # A usb camera.
20 BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
21
22 # USB Epson printer to be called lp_epson
23 BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
24
25 # USB HP printer to be called lp_hp
26 BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
27
28 # sound card with PCI bus id 00:0b.0 to be the first sound card
29 BUS="pci", ID="00:0b.0", NAME="dsp"
30
31 # sound card with PCI bus id 00:07.1 to be the second sound card
32 BUS="pci", ID="00:07.1", NAME="dsp1" 
33
34 # USB mouse plugged into the third port of the first hub to be called mouse0
35 BUS="usb", PLACE="1.3", NAME="mouse0"
36
37 # USB tablet plugged into the third port of the second hub to be called mouse1
38 BUS="usb", PLACE="2.3", NAME="mouse1"
39 BUS="usb", PLACE="2.4", NAME="mouse2"
40
41 # ttyUSB1 should always be called visor
42 KERNEL="ttyUSB1", NAME="visor"
43 KERNEL="ttyUSB0", NAME="pl2303"
44
45 # a devfs like way to name some tty devices
46 #KERNEL="ttyS*", NAME="tts/%n"
47 #KERNEL="tty*", NAME="vc/%n"
48
49 # if this is a ide cdrom, name it the default name, and create a symlink to cdrom
50 BUS="ide", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", SYMLINK="cdrom" 
51
52 # device mapper creates its own device nodes so ignore these
53 KERNEL="dm-[0-9]*", NAME=""
54
55 # DRI devices always go into a subdirectory (as per the LSB spec)
56 KERNEL="card*", NAME="dri/card%n"
57
58 # alsa devices
59 KERNEL="controlC[0-9]*", NAME="snd/%k"
60 KERNEL="hw[CD0-9]*",     NAME="snd/%k"
61 KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
62 KERNEL="midi[CD0-9]*",   NAME="snd/%k"
63 KERNEL="timer",          NAME="snd/%k"
64 KERNEL="seq",            NAME="snd/%k"
65
66 # input devices
67 KERNEL="mice",          NAME="input/%k"
68 KERNEL="mouse*",        NAME="input/%k"
69 KERNEL="event*",        NAME="input/%k"
70 KERNEL="js*",           NAME="input/%k"
71 KERNEL="ts*",           NAME="input/%k"
72