|
# There are a number of modifiers that are allowed to be used in some
|
|
# of the different fields. They provide the following subsitutions:
|
|
#
|
|
# %n the "kernel number" of the device.
|
|
# For example, 'sda3' has a "kernel number" of '3'
|
|
# %e the smallest number for that name which does not matches an existing node
|
|
# %k the kernel name for the device
|
|
# %M the kernel major number for the device
|
|
# %m the kernel minor number for the device
|
|
# %b the bus id for the device
|
|
# %c the string returned by the PROGRAM
|
|
# %s{filename} the content of a sysfs attribute
|
|
# %% the '%' char itself
|
|
#
|
|
|
|
# workaround for devices which do not report media changes
|
|
BUS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
|
|
ENV{ID_MODEL}=="IOMEGA_ZIP*", OPTIONS+="all_partitions"
|
|
|
|
# IDE devices
|
|
BUS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
|
|
SYMLINK+="%c{1} %c{2}", GROUP="%c{3}"
|
|
|
|
# SCSI devices
|
|
BUS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", SYMLINK+="%c{1} %c{2}"
|
|
|
|
# RAID controllers
|
|
KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", \
|
|
SYMLINK+="%c{1}"
|
|
|
|
# other block devices
|
|
KERNEL=="md[0-9]*", SYMLINK+="md/%n"
|
|
KERNEL=="loop[0-9]*", SYMLINK+="loop/%n"
|
|
KERNEL=="ram[0-9]*", SYMLINK+="rd/%n"
|
|
|
|
# USB devices
|
|
BUS=="usb", KERNEL=="auer[0-9]*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="cpad[0-9]*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="dabusb*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="hiddev*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="legousbtower*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="lp[0-9]*", SYMLINK+="usb/%k"
|
|
BUS=="usb", KERNEL=="ttyUSB*", ATTR{product}=="Palm Handheld*", \
|
|
SYMLINK+="pilot"
|
|
|
|
# usbfs-like devices
|
|
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; B=$${K%%%%.*}; D=$${K#*.}; echo bus/usb/$$B/$$D'", \
|
|
SYMLINK+="%c"
|
|
|
|
# serial devices
|
|
KERNEL=="ttyS[0-9]*", SYMLINK+="tts/%n"
|
|
KERNEL=="ttyUSB[0-9]*", SYMLINK+="tts/USB%n"
|
|
KERNEL=="rfcomm[0-9]*", SYMLINK+="bluetooth/rfcomm/%n",
|
|
KERNEL=="capi", SYMLINK+="capi20", SYMLINK+="isdn/capi20"
|
|
KERNEL=="capi[0-9]*", SYMLINK+="capi/%n"
|
|
|
|
# vc devices
|
|
KERNEL=="tty[0-9]*", SYMLINK+="vc/%n"
|
|
KERNEL=="vcs", SYMLINK+="vcc/0"
|
|
KERNEL=="vcs[0-9]*", SYMLINK+="vcc/%n"
|
|
KERNEL=="vcsa", SYMLINK+="vcc/a0"
|
|
KERNEL=="vcsa[0-9]*", SYMLINK+="vcc/a%n"
|
|
|
|
# video devices
|
|
KERNEL=="video[0-9]*", SYMLINK+="v4l/%k"
|
|
KERNEL=="radio[0-9]*", SYMLINK+="v4l/%k"
|
|
KERNEL=="vbi[0-9]*", SYMLINK+="v4l/%k"
|
|
KERNEL=="vtx[0-9]*", SYMLINK+="v4l/%k"
|
|
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'KSYMLINK+=%k; KSYMLINK+=$${KNAME#dvb}; A=$${KNAME%%%%.*}; D=$${KNAME#*.}; echo dvb/adapter$$A/$$D'", \
|
|
SYMLINK+="%c"
|
|
KERNEL=="fb[0-9]*", SYMLINK+="fb/%n"
|
|
KERNEL=="card[0-9]*", SYMLINK+="dri/%k"
|
|
|
|
# misc devices
|
|
KERNEL=="apm_bios", SYMLINK+="misc/%k",
|
|
KERNEL=="agpgart", SYMLINK+="misc/%k"
|
|
KERNEL=="hw_random", SYMLINK+="hwrng"
|
|
KERNEL=="nvram", SYMLINK+="misc/%k"
|
|
KERNEL=="psaux", SYMLINK+="misc/%k"
|
|
KERNEL=="rtc", SYMLINK+="misc/%k"
|
|
KERNEL=="tun", SYMLINK+="net/%k"
|
|
|
|
# printers and parallel devices
|
|
KERNEL=="lp[0-9]*", SYMLINK+="printers/%n"
|
|
KERNEL=="parport[0-9]*", SYMLINK+="parports/%n"
|
|
|
|
KERNEL=="i2c-[0-9]*", SYMLINK+="i2c/%n"
|
|
KERNEL=="fd[0-9]*", SYMLINK+="floppy/%n"
|
|
|
|
KERNEL=="cdemu[0-9]*", SYMLINK+="cdemu/%n"
|
|
KERNEL=="pktcdvd[0-9]*", SYMLINK+="pktcdvd/%n"
|
|
KERNEL=="pktcdvd", SYMLINK+="pktcdvd/control"
|
|
|
|
KERNEL=="cpu[0-9]*", SYMLINK+="cpu/%n/cpuid"
|
|
KERNEL=="msr[0-9]*", SYMLINK+="cpu/%n/msr"
|
|
KERNEL=="microcode", SYMLINK+="cpu/microcode misc/microcode"
|
|
|
|
KERNEL=="umad*", SYMLINK+="infiniband/%k"
|
|
KERNEL=="issm*", SYMLINK+="infiniband/%k"
|
|
KERNEL=="uverbs*", SYMLINK+="infiniband/%k"
|
|
KERNEL=="ucm*", SYMLINK+="infiniband/%k"
|
|
|
|
# sound devices
|
|
KERNEL=="controlC[0-9]*", SYMLINK+="snd/%k"
|
|
KERNEL=="hwC[D0-9]*", SYMLINK+="snd/%k"
|
|
KERNEL=="pcmC[D0-9cp]*", SYMLINK+="snd/%k"
|
|
KERNEL=="midiC[D0-9]*", SYMLINK+="snd/%k"
|
|
KERNEL=="timer", SYMLINK+="snd/%k"
|
|
KERNEL=="seq", SYMLINK+="snd/%k"
|
|
KERNEL=="audio*", SYMLINK+="sound/%k"
|
|
KERNEL=="dsp*", SYMLINK+="sound/%k"
|
|
KERNEL=="adsp*", SYMLINK+="sound/%k"
|
|
KERNEL=="midi*", SYMLINK+="sound/%k"
|
|
KERNEL=="mixer*", SYMLINK+="sound/%k"
|
|
KERNEL=="sequencer*", SYMLINK+="sound/%k"
|
|
KERNEL=="amidi*", SYMLINK+="sound/%k"
|
|
KERNEL=="dmmidi*", SYMLINK+="sound/%k"
|
|
KERNEL=="admmidi*", SYMLINK+="sound/%k"
|
|
|
|
# ieee1394 devices
|
|
KERNEL=="dv1394*", SYMLINK+="dv1394/%n"
|
|
KERNEL=="video1394*", SYMLINK+="video1394/%n"
|
|
|
|
# input devices
|
|
KERNEL=="mice", SYMLINK+="input/%k"
|
|
KERNEL=="mouse[0-9]*", SYMLINK+="input/%k"
|
|
KERNEL=="event[0-9]*", SYMLINK+="input/%k"
|
|
KERNEL=="js[0-9]*", SYMLINK+="input/%k"
|
|
KERNEL=="ts[0-9]*", SYMLINK+="input/%k"
|
|
KERNEL=="uinput", SYMLINK+="input/%k"
|
|
|
|
# Zaptel
|
|
KERNEL=="zapctl", SYMLINK+="zap/ctl"
|
|
KERNEL=="zaptimer", SYMLINK+="zap/timer"
|
|
KERNEL=="zapchannel", SYMLINK+="zap/channel"
|
|
KERNEL=="zappseudo", SYMLINK+="zap/pseudo"
|
|
KERNEL=="zap[0-9]*", SYMLINK+="zap/%n"
|
|
|
|
# AOE character devices
|
|
SUBSYSTEM=="aoe", KERNEL=="discover", SYMLINK+="etherd/%k"
|
|
SUBSYSTEM=="aoe", KERNEL=="err", SYMLINK+="etherd/%k"
|
|
SUBSYSTEM=="aoe", KERNEL=="interfaces", SYMLINK+="etherd/%k"
|
|
|
|
# device mapper creates its own device nodes, so ignore these
|
|
# KERNEL=="dm-[0-9]*", SYMLINK+=""
|
|
KERNEL=="device-mapper", SYMLINK+="mapper/control"
|
|
|
|
ACTION=="add", SUBSYSTEM=="firmware", RUN+="firmware_helper"
|