mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
5.2 KiB

  1. # There are a number of modifiers that are allowed to be used in some
  2. # of the different fields. They provide the following subsitutions:
  3. #
  4. # %n the "kernel number" of the device.
  5. # For example, 'sda3' has a "kernel number" of '3'
  6. # %e the smallest number for that name which does not matches an existing node
  7. # %k the kernel name for the device
  8. # %M the kernel major number for the device
  9. # %m the kernel minor number for the device
  10. # %b the bus id for the device
  11. # %c the string returned by the PROGRAM
  12. # %s{filename} the content of a sysfs attribute
  13. # %% the '%' char itself
  14. #
  15. # workaround for devices which do not report media changes
  16. BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
  17. ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME="%k", OPTIONS+="all_partitions"
  18. # IDE devices
  19. BUS=="ide", KERNEL=="hd[a-z]*", PROGRAM="/lib/udev/ide-devfs.sh %k %b %n", \
  20. NAME="%c{1}", SYMLINK+="%k %c{2}", GROUP="%c{3}"
  21. # SCSI devices
  22. BUS=="scsi", KERNEL=="sd*", PROGRAM="/lib/udev/scsi-devfs.sh sd %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3}"
  23. BUS=="scsi", KERNEL=="sr*", PROGRAM="/lib/udev/scsi-devfs.sh sr %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3}"
  24. BUS=="scsi", KERNEL=="st*", PROGRAM="/lib/udev/scsi-devfs.sh st %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3}"
  25. BUS=="scsi", KERNEL=="sg*", PROGRAM="/lib/udev/scsi-devfs.sh sg %b %n", NAME="%c{1}", SYMLINK="%c{2} %k %c{3}"
  26. # RAID controllers
  27. KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="/lib/udev/raid-devfs.sh %k", \
  28. NAME="%c{1}", SYMLINK+="%k"
  29. # other block devices
  30. KERNEL=="md[0-9]*", NAME="md/%n",
  31. KERNEL=="loop[0-9]*", NAME="loop/%n"
  32. KERNEL=="ram[0-9]*", NAME="rd/%n"
  33. # USB devices
  34. BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
  35. BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
  36. BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
  37. BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
  38. BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
  39. BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
  40. BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
  41. SYMLINK+="pilot"
  42. # usbfs-like devices
  43. SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; B=$${K%%%%.*}; D=$${K#*.}; echo bus/usb/$$B/$$D'", \
  44. NAME="%c"
  45. # serial devices
  46. KERNEL=="ttyS[0-9]*", NAME="tts/%n"
  47. KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n"
  48. KERNEL=="rfcomm[0-9]*", NAME="bluetooth/rfcomm/%n",
  49. KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
  50. KERNEL=="capi[0-9]*", NAME="capi/%n"
  51. # vc devices
  52. KERNEL=="tty[0-9]*", NAME="vc/%n"
  53. KERNEL=="vcs", NAME="vcc/0"
  54. KERNEL=="vcs[0-9]*", NAME="vcc/%n"
  55. KERNEL=="vcsa", NAME="vcc/a0"
  56. KERNEL=="vcsa[0-9]*", NAME="vcc/a%n"
  57. # video devices
  58. KERNEL=="video[0-9]*", NAME="v4l/%k"
  59. KERNEL=="radio[0-9]*", NAME="v4l/%k"
  60. KERNEL=="vbi[0-9]*", NAME="v4l/%k"
  61. KERNEL=="vtx[0-9]*", NAME="v4l/%k"
  62. KERNEL=="dvb*", PROGRAM="/bin/sh -c 'KNAME=%k; KNAME=$${KNAME#dvb}; A=$${KNAME%%%%.*}; D=$${KNAME#*.}; echo dvb/adapter$$A/$$D'", \
  63. NAME="%c"
  64. KERNEL=="fb[0-9]*", NAME="fb/%n"
  65. KERNEL=="card[0-9]*", NAME="dri/%k"
  66. # misc devices
  67. KERNEL=="apm_bios", NAME="misc/%k",
  68. KERNEL=="agpgart", NAME="misc/%k"
  69. KERNEL=="hw_random", NAME="hwrng"
  70. KERNEL=="nvram", NAME="misc/%k"
  71. KERNEL=="psaux", NAME="misc/%k"
  72. KERNEL=="rtc", NAME="misc/%k"
  73. KERNEL=="tun", NAME="net/%k"
  74. # printers and parallel devices
  75. KERNEL=="lp[0-9]*", NAME="printers/%n"
  76. KERNEL=="parport[0-9]*", NAME="parports/%n"
  77. KERNEL=="i2c-[0-9]*", NAME="i2c/%n"
  78. KERNEL=="fd[0-9]*", NAME="floppy/%n"
  79. KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
  80. KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
  81. KERNEL=="pktcdvd", NAME="pktcdvd/control"
  82. KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
  83. KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
  84. KERNEL=="microcode", NAME="cpu/microcode", SYMLINK="misc/microcode"
  85. KERNEL=="umad*", NAME="infiniband/%k"
  86. KERNEL=="issm*", NAME="infiniband/%k"
  87. KERNEL=="uverbs*", NAME="infiniband/%k"
  88. KERNEL=="ucm*", NAME="infiniband/%k"
  89. # sound devices
  90. KERNEL=="controlC[0-9]*", NAME="snd/%k"
  91. KERNEL=="hwC[D0-9]*", NAME="snd/%k"
  92. KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
  93. KERNEL=="midiC[D0-9]*", NAME="snd/%k"
  94. KERNEL=="timer", NAME="snd/%k"
  95. KERNEL=="seq", NAME="snd/%k"
  96. KERNEL=="audio*", NAME="sound/%k"
  97. KERNEL=="dsp*", NAME="sound/%k"
  98. KERNEL=="adsp*", NAME="sound/%k"
  99. KERNEL=="midi*", NAME="sound/%k"
  100. KERNEL=="mixer*", NAME="sound/%k"
  101. KERNEL=="sequencer*", NAME="sound/%k"
  102. KERNEL=="amidi*", NAME="sound/%k"
  103. KERNEL=="dmmidi*", NAME="sound/%k"
  104. KERNEL=="admmidi*", NAME="sound/%k"
  105. # ieee1394 devices
  106. KERNEL=="dv1394*", NAME="dv1394/%n"
  107. KERNEL=="video1394*", NAME="video1394/%n"
  108. # input devices
  109. KERNEL=="mice", NAME="input/%k"
  110. KERNEL=="mouse[0-9]*", NAME="input/%k"
  111. KERNEL=="event[0-9]*", NAME="input/%k"
  112. KERNEL=="js[0-9]*", NAME="input/%k"
  113. KERNEL=="ts[0-9]*", NAME="input/%k"
  114. KERNEL=="uinput", NAME="input/%k"
  115. # Zaptel
  116. KERNEL=="zapctl", NAME="zap/ctl"
  117. KERNEL=="zaptimer", NAME="zap/timer"
  118. KERNEL=="zapchannel", NAME="zap/channel"
  119. KERNEL=="zappseudo", NAME="zap/pseudo"
  120. KERNEL=="zap[0-9]*", NAME="zap/%n"
  121. # AOE character devices
  122. SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
  123. SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
  124. SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
  125. # device mapper creates its own device nodes, so ignore these
  126. KERNEL=="dm-[0-9]*", NAME=""
  127. KERNEL=="device-mapper", NAME="mapper/control"