4 #include <minix/sys_config.h>
7 enum dev_style
{ STYLE_NDEV
, STYLE_DEV
, STYLE_DEVA
, STYLE_TTY
, STYLE_CTTY
,
8 STYLE_CLONE
, STYLE_CLONE_A
};
9 #define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CLONE_A)
11 #define dev_style_asyn(devstyle) ((devstyle) == STYLE_DEVA || \
12 (devstyle) == STYLE_CLONE_A)
14 /*===========================================================================*
15 * Major and minor device numbers *
16 *===========================================================================*/
18 /* Total number of different devices. */
19 #define NR_DEVICES NR_SYS_PROCS /* number of (major) devices */
21 /* Major device numbers. */
22 #define NONE_MAJOR 0 /* 0 = not used */
23 #define MEMORY_MAJOR 1 /* 1 = /dev/mem (memory devices) */
24 #define FLOPPY_MAJOR 2 /* 2 = /dev/fd0 (floppy disks) */
26 #define TTY_MAJOR 4 /* 4 = /dev/tty00 (ttys) */
27 #define CTTY_MAJOR 5 /* 5 = /dev/tty */
28 #define PRINTER_MAJOR 6 /* 6 = /dev/lp (printer driver) */
29 #define INET_MAJOR 7 /* 7 = /dev/ip (inet) */
33 #define FILTER_MAJOR 11 /* 11 = /dev/filter (filter driver) */
35 #define AUDIO_MAJOR 13 /* 13 = /dev/audio (audio driver) */
36 #define FBD_MAJOR 14 /* 14 = /dev/fbd (faulty block dev)*/
37 #define LOG_MAJOR 15 /* 15 = /dev/klog (log driver) */
38 #define RANDOM_MAJOR 16 /* 16 = /dev/random (random driver) */
39 #define HELLO_MAJOR 17 /* 17 = /dev/hello (hello driver) */
40 #define UDS_MAJOR 18 /* 18 = /dev/uds (pfs) */
41 #define FB_MAJOR 19 /* 18 = /dev/fb0 (fb driver) */
44 /* Minor device numbers for memory driver. */
45 # define RAM_DEV_OLD 0 /* minor device for /dev/ram */
46 # define MEM_DEV 1 /* minor device for /dev/mem */
47 # define KMEM_DEV 2 /* minor device for /dev/kmem */
48 # define NULL_DEV 3 /* minor device for /dev/null */
49 # define BOOT_DEV 4 /* minor device for /dev/boot */
50 # define ZERO_DEV 5 /* minor device for /dev/zero */
51 # define IMGRD_DEV 6 /* minor device for /dev/imgrd */
52 # define RAM_DEV_FIRST 7 /* first minor device for /dev/ram* */
54 #define CTRLR(n) ((n)==0 ? 3 : (8 + 2*((n)-1))) /* magic formula */
56 /* Minor device numbers for log driver. */
57 # define IS_KLOG_DEV 0 /* minor device for /dev/klog */
59 /* Full device numbers that are special to the boot monitor and FS. */
60 # define DEV_RAM ((dev_t) 0x0100) /* device number of /dev/ram */
61 # define DEV_IMGRD ((dev_t) 0x0106) /* device number of /dev/imgrd */