chiark / gitweb /
[PATCH] update the Gentoo rules files.
[elogind.git] / etc / udev / udev.rules.gentoo
1 # /etc/udev/udev.rules:  device naming rules for udev
2 # $Header: /home/cvsroot/gentoo-x86/sys-fs/udev/files/udev.rules-018,v 1.2 2004/02/29 11:07:39 azarah Exp $
3 #
4 # There are a number of modifiers that are allowed to be used in some of the
5 # fields.  See the udev man page for a full description of them.
6
7 ###########################################################
8 #
9 # Add your own rules here (examples are commented)
10 #
11 ###########################################################
12
13 # Looking for scsi bus id 42:0:0:1
14 #BUS="scsi", PROGRAM="/bin/echo -n test-%b", RESULT="test-42:0:0:1", NAME="%c"
15
16 # A usb camera.
17 #BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
18
19 # USB Epson printer to be called lp_epson
20 #BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
21
22 # USB HP printer to be called lp_hp
23 #BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
24
25 # sound card with PCI bus id 00:0b.0 to be the first sound card
26 #BUS="pci", ID="00:0b.0", NAME="dsp"
27
28 # sound card with PCI bus id 00:07.1 to be the second sound card
29 #BUS="pci", ID="00:07.1", NAME="dsp1"
30
31 # USB mouse plugged into the third port of the first hub to be called mouse0
32 #BUS="usb", PLACE="1.3", NAME="mouse0"
33
34 # USB tablet plugged into the third port of the second hub to be called mouse1
35 #BUS="usb", PLACE="2.3", NAME="mouse1"
36 #BUS="usb", PLACE="2.4", NAME="mouse2"
37
38 # ttyUSB1 should always be called visor
39 #KERNEL="ttyUSB1", NAME="visor"
40 #KERNEL="ttyUSB0", NAME="pl2303"
41
42
43 ###########################################################
44 #
45 # For devfs similar /dev layout (neater)
46 #
47 ###########################################################
48
49 # devfs-names for ide-devices (uncomment only one)
50 #  /dev/ide/.../{disc,cd} and /dev/{cdroms,discs}/* type names
51 BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
52
53 # alsa devices
54 KERNEL="controlC[0-9]*", NAME="snd/%k"
55 KERNEL="hw[CD0-9]*",     NAME="snd/%k"
56 KERNEL="pcm[CD0-9cp]*",  NAME="snd/%k"
57 KERNEL="midi[CD0-9]*",   NAME="snd/%k"
58 KERNEL="timer",          NAME="snd/%k"
59 KERNEL="seq",            NAME="snd/%k"
60
61 # dm devices (ignore them)
62 KERNEL="dm-[0-9]*",     NAME=""
63 # create a symlink named after the device map name
64 # note devmap_name comes with extras/multipath
65 #KERNEL="dm-[0-9]*",     PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
66 KERNEL="device-mapper", NAME="mapper/control"
67
68 # fb devices
69 KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
70
71 # floppy devices
72 KERNEL="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k"
73
74 # i2c devices
75 KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
76
77 # input devices
78 KERNEL="mice",        NAME="input/mice"
79 KERNEL="mouse[0-9]*", NAME="input/mouse%n"
80 KERNEL="event[0-9]*", NAME="input/event%n"
81 KERNEL="js*",         NAME="input/%k"
82 KERNEL="ts*",         NAME="input/%k"
83
84 # loop devices
85 KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
86
87 # md block devices
88 KERNEL="md[0-9]*", NAME="md/%n", SYMLINK="%k"
89
90 # misc devices
91 KERNEL="rtc",     NAME="misc/%k", SYMLINK="%k"
92 KERNEL="psaux",   NAME="misc/%k", SYMLINK="%k"
93 KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
94 KERNEL="rtc",     NAME="misc/%k", SYMLINK="%k"
95 KERNEL="psaux",   NAME="misc/%k", SYMLINK="%k"
96 KERNEL="uinput",  NAME="misc/%k", SYMLINK="%k"
97
98 # pty devices
99 KERNEL="pty[p-za-e][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k"
100 KERNEL="tty[p-za-e][0-9a-f]*", NAME="tty/s%n", SYMLINK="%k"
101
102 # ramdisk devices
103 KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
104
105 # sound devices
106 KERNEL="adsp",       NAME="sound/adsp",       SYMLINK="%k"
107 KERNEL="audio",      NAME="sound/audio",      SYMLINK="%k"
108 KERNEL="dsp",        NAME="sound/dsp",        SYMLINK="%k"
109 KERNEL="mixer",      NAME="sound/mixer",      SYMLINK="%k"
110 KERNEL="sequencer",  NAME="sound/sequencer",  SYMLINK="%k"
111 KERNEL="sequencer2", NAME="sound/sequencer2", SYMLINK="%k"
112
113 # tty devices
114 KERNEL="tty[0-9]*",    NAME="vc/%n",  SYMLINK="%k"
115 KERNEL="ttyS[0-9]*",   NAME="tts/%n", SYMLINK="%k"
116 KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
117
118 # vc devices
119 KERNEL="vcs",        NAME="vcc/0",   SYMLINK="%k"
120 KERNEL="vcs[0-9]*",  NAME="vcc/%n",  SYMLINK="%k"
121 KERNEL="vcsa",       NAME="vcc/a0",  SYMLINK="%k"
122 KERNEL="vcsa[0-9]*", NAME="vcc/a%n", SYMLINK="%k"
123
124 # v4l devices
125 KERNEL="video[0-9]*", NAME="v4l/video%n"
126 KERNEL="radio[0-9]*", NAME="v4l/radio%n"
127 KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
128 KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"
129