home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / docs / majors_min < prev    next >
Encoding:
Text File  |  1996-10-07  |  6.3 KB  |  244 lines

  1. /* $NetBSD: majors+minors,v 1.4 1996/06/03 21:55:46 mark Exp $ */
  2.  
  3. /*
  4.  * Copyright (c) 1994 Mark Brinicombe.
  5.  * All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Redistributions in binary form must reproduce the above copyright
  13.  *    notice, this list of conditions and the following disclaimer in the
  14.  *    documentation and/or other materials provided with the distribution.
  15.  * 3. All advertising materials mentioning features or use of this software
  16.  *    must display the following acknowledgement:
  17.  *    This product includes software developed by Mark Brinicombe.
  18.  * 4. The name of the company nor the name of the author may be used to
  19.  *    endorse or promote products derived from this software without specific
  20.  *    prior written permission.
  21.  *
  22.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  23.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  24.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  25.  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  26.  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  27.  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  28.  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  29.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  31.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32.  * SUCH DAMAGE.
  33.  *
  34.  * RiscBSD kernel project
  35.  *
  36.  * majors
  37.  *
  38.  * list of all allocated major numbers
  39.  *
  40.  * Created      : 17/09/94
  41.  */
  42.  
  43. List of allocated and reserved major and minor numbers
  44.  
  45. The block and character major numbers are ALWAYS allocated together to the
  46. same device driver even if the driver does not require both.
  47.  
  48.  0 B     - reserved
  49.  0 C    - memory device
  50.       minor = 0 - /dev/mem
  51.       minor = 1 - /dev/kmem
  52.       minor = 2 - /dev/null
  53.       minor = 3 - /dev/zero
  54.  1 B    - swap device
  55.  1 C    - psuedo swap device
  56.       minor = 0 - /dev/drum
  57.  2 B    - reserved
  58.  2 C    - console device
  59.       minor = 0 - /dev/console
  60.  3 B    - reserved
  61.  3 C    - controlling terminal
  62.       minor = 0 - /dev/tty
  63.  4 B    - reserved
  64.  4 C    - virtual console
  65.       /dev/ttyv{unit}
  66.       unit = minor
  67.  5 B    - reserved
  68.  5 C    - kernel log device
  69.       minor = 0 - /dev/klog
  70.  6 B    - reserved
  71.  6 C    - psuedo tty master
  72.       /dev/pty{class}{unit}
  73.       unit = minor % 16
  74.       minor / 16 = 0 - class = p
  75.       minor / 16 = 1 - class = q
  76.       minor / 16 = 2 - class = r
  77.       minor / 16 = 3 - class = s
  78.       minor / 16 = 4 - class = t
  79.  7 B    - reserved
  80.  7 C    - psuedo tty slave
  81.       /dev/tty{class}{unit}
  82.       unit = minor % 16
  83.       minor / 16 = 0 - class = p
  84.       minor / 16 = 1 - class = q
  85.       minor / 16 = 2 - class = r
  86.       minor / 16 = 3 - class = s
  87.       minor / 16 = 4 - class = t
  88.  8 B    - reserved
  89.  8 C    - parallel printer
  90.       /dev/lp{class}{unit}
  91.       unit = minor & 0x1f
  92.       minor & 0x80 = 0x00 - class = t - interrupt driver
  93.       minor & 0x80 = 0x80 - class = a - polling driver
  94.       e.g.
  95.         0 - /dev/lpt0
  96.       128 - /dev/lpa0
  97.  9 B    - reserved
  98.  9 C    - quadrature mouse
  99.       minor = 0 - /dev/quadmouse
  100. 10 B    - reserved
  101. 10 C    - beep device
  102.       minor = 0 - /dev/beep
  103. 11 B    - reserved
  104. 11 C    - keyboard device
  105.       minor = 0 - /dev/kbd
  106. 12 B    - reserved
  107. 12 C    - serial port
  108.       /dev/tty0{unit}
  109.       unit = minor
  110. 13 B    - reserver
  111. 13 C    - reserved
  112. 14 B    - reserved
  113. 14 C    - reserved
  114. 15 B    - reserved
  115. 15 C    - reserved
  116. 16 B    - ST506/ESDI/IDE disk
  117.       /dev/wd{unit}{partition}
  118.       partition = minor % 8
  119.       unit = minor / 8
  120. 16 C    - ST506/ESDI/IDE disk
  121.       /dev/rwd{unit}{partition}
  122.       partition = minor % 8
  123.       unit = minor / 8
  124. 17 B    - floppy disk
  125.       /dev/fd{unit}{partition}
  126.       partition = minor % 8
  127.       unit = minor / 8
  128. 17 C    - floppy disk
  129.       /dev/rfd{unit}{partition}
  130.       partition = minor % 8
  131.       unit = minor / 8
  132. 18 B    - ram disk
  133.       /dev/rd{unit}{partition}
  134.       partition = minor % 8
  135.       unit = minor / 8
  136. 18 C    - ram disk
  137.       /dev/rrd{unit}{partition}
  138.       partition = minor % 8
  139.       unit = minor / 8
  140. 19 B    - vnode disk driver
  141.       /dev/vnd{unit}{partition}
  142.       partition = minor % 8
  143.       unit = minor / 8
  144. 19 C    - vnode disk driver
  145.       /dev/rvnd{unit}{partition}
  146.       partition = minor % 8
  147.       unit = minor / 8
  148. 20 B    - reserved (ATAPI CDROM)
  149.       /dev/wcd{unit}{partition}
  150.       partition = minor % 8
  151.       unit = minor / 8
  152. 20 C    - reserved (ATAPI CDROM)
  153.       /dev/rwcd{unit}{partition}
  154.       partition = minor % 8
  155.       unit = minor / 8
  156. 21 B    - concatenated disk driver
  157.       /dev/ccd{unit}{partition}
  158.       partition = minor % 8
  159.       unit = minor / 8
  160. 21 C    - concatenated disk driver
  161.       /dev/rccd{unit}{partition}
  162.       partition = minor % 8
  163.       unit = minor / 8
  164. 22 B    - reserved
  165. 22 C    - reserved
  166. 23 B    - reserved
  167. 23 C    - reserved
  168. 24 B    - SCSI disk
  169.       /dev/sd{unit}{partition}
  170.       partition = minor % 8
  171.       unit = minor / 8
  172. 24 C    - SCSI disk
  173.       /dev/rsd{unit}{partition}
  174.       partition = minor % 8
  175.       unit = minor / 8
  176. 25 B    - SCSI tape
  177. 25 C    - SCSI tape
  178. 26 B    - SCSI cdrom
  179.       /dev/cd{unit}{partition}
  180.       partition = minor % 8
  181.       unit = minor / 8
  182. 26 C    - SCSI cdrom
  183.       /dev/rcd{unit}{partition}
  184.       partition = minor % 8
  185.       unit = minor / 8
  186. 27 B    - reserved
  187. 27 C    - SCSI autochanger
  188.       /dev/ch{unit}
  189.       unit = minor
  190. 28 B    - reserved
  191. 28 C    - SCSI unknown device
  192.       /dev/uk{unit}
  193.       unit = minor
  194. 29 B    - reserved
  195. 29 C    - SCSI scanner device
  196.       /dev/ss{unit}
  197.       unit = minor
  198. 30 B    - reserved
  199. 30 C    - reserved
  200. 31 B    - reserved
  201. 31 C    - reserved
  202. 32 B    - reserved
  203. 32 C    - Berkeley packet filter
  204.       /dev/bpf{unit}
  205.       unit = minor
  206.       minor = 0 - /dev/bpf0
  207.       minor = 1 - /dev/bpf1
  208.       minor = 2 - /dev/bpf2
  209.       minor = 3 - /dev/bpf3
  210. 33 B    - reserved
  211. 33 C    - network tunnel
  212.       /dev/tun{unit}
  213.       unit = minor
  214.       minor = 0 - /dev/tun0
  215.       minor = 1 - /dev/tun1
  216.       minor = 2 - /dev/tun2
  217. 34 B    - reserved
  218. 34 C    - file descriptor pseudo-device
  219.       minor = 0 - /dev/stdin
  220.       minor = 1 - /dev/stdout
  221.       minor = 2 - /dev/stderr
  222. 35 B    - reserved
  223. 35 C    - loadable module driver
  224.       minor = 0 - /dev/lkm
  225. 36 B    - reserved
  226. 36 C    - generic audio device
  227. 37 B    - reserved
  228. 37 C    - vidcvideo device
  229.       minor = 0 - /dev/vidcvideo
  230. 38 B    - reserved
  231. 38 C    - cpu/hydra
  232.       minor = 0 - /dev/cpu0
  233. 39 B    - reserved
  234. 39 C    - reserved
  235. 40 B    - reserved
  236. 40 C    - PS2 mouse
  237.       minor = 0 - /dev/pms
  238. 41 B    - reserved
  239. 41 C    - reserved
  240. 42 B    - reserved
  241. 42 C    - IIC device
  242. 43 B    - reserved
  243. 43 C    - RTC device
  244.