- /* 0 - 15 are reserved for Apple */
-
- {
- cnopen, cnclose, cnread, cnwrite, /* 0*/
- cnioctl, nullstop, nullreset, 0, cnselect,
- eno_mmap, eno_strat, cngetc, cnputc, D_TTY
- },
- NO_CDEVICE, /* 1*/
- {
- cttyopen, nullclose, cttyread, cttywrite, /* 2*/
- cttyioctl, nullstop, nullreset, 0, cttyselect,
- eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
- },
- {
- nullopen, nullclose, mmread, mmwrite, /* 3*/
- mmioctl, nullstop, nullreset, 0, mmselect,
- mmmmap, eno_strat, eno_getc, eno_putc, D_DISK
- },
- {
- ptsopen, ptsclose, ptsread, ptswrite, /* 4*/
- ptyioctl, ptsstop, nullreset, pt_tty, ttselect,
- eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
- },
- {
- ptcopen, ptcclose, ptcread, ptcwrite, /* 5*/
- ptyioctl, nullstop, nullreset, 0, ptcselect,
- eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
- },
- {
- logopen, logclose, logread, eno_rdwrt, /* 6*/
- logioctl, eno_stop, nullreset, 0, logselect,
- eno_mmap, eno_strat, eno_getc, eno_putc, 0
- },
- NO_CDEVICE, /* 7*/
- NO_CDEVICE, /* 8*/
- NO_CDEVICE, /* 9*/
- NO_CDEVICE, /*10*/
- NO_CDEVICE, /*11*/
- {
- kmopen, kmclose, kmread, kmwrite, /*12*/
- kmioctl, nullstop, nullreset, km_tty, ttselect,
- eno_mmap, eno_strat, kmgetc, kmputc, 0
- },
- NO_CDEVICE, /*13*/
- NO_CDEVICE, /*14*/
- NO_CDEVICE, /*15*/
-
- /* 16 - 31 are reserved to the user */
- NO_CDEVICE, /*16*/
- NO_CDEVICE, /*17*/
- NO_CDEVICE, /*18*/
- NO_CDEVICE, /*19*/
- NO_CDEVICE, /*20*/
- NO_CDEVICE, /*21*/
- NO_CDEVICE, /*22*/
- NO_CDEVICE, /*23*/
- NO_CDEVICE, /*24*/
- NO_CDEVICE, /*25*/
- NO_CDEVICE, /*26*/
- NO_CDEVICE, /*27*/
- NO_CDEVICE, /*28*/
- NO_CDEVICE, /*29*/
- NO_CDEVICE, /*30*/
- NO_CDEVICE, /*31*/
-
- /* 32 - 47 are reserved to NeXT */
- {
- fdesc_open, eno_opcl, fdesc_read, fdesc_write, /*32*/
- fdesc_ioctl, eno_stop, eno_reset, 0, fdesc_select,
- eno_mmap, eno_strat, eno_getc, eno_putc, 0
- },
-#if 1
- NO_CDEVICE,
-#else
- {
- sgopen, sgclose, eno_rdwrt, eno_rdwrt, /*33*/
- sgioctl, eno_stop, eno_reset, 0, eno_select,
- eno_mmap, eno_strat, eno_getc, eno_putc, D_TAPE
- },
-#endif
- NO_CDEVICE, /*34*/
- NO_CDEVICE, /*35*/
- NO_CDEVICE, /*36*/
- NO_CDEVICE, /*37*/
- NO_CDEVICE, /*38*/
- NO_CDEVICE, /*39*/
- NO_CDEVICE, /*40*/
- NO_CDEVICE, /*41*/
- {
- volopen, volclose, eno_rdwrt, eno_rdwrt, /*42*/
- volioctl, eno_stop, eno_reset, 0, (select_fcn_t *)seltrue,
- eno_mmap, eno_strat, eno_getc, eno_putc, 0
- },
+ [0] = {
+ cnopen, cnclose, cnread, cnwrite,
+ cnioctl, nullstop, nullreset, 0, cnselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
+ },
+ [1] = NO_CDEVICE,
+ [2] = {
+ cttyopen, nullclose, cttyread, cttywrite,
+ cttyioctl, nullstop, nullreset, 0, cttyselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
+ },
+ [3] = {
+ nullopen, nullclose, mmread, mmwrite,
+ mmioctl, nullstop, nullreset, 0, mmselect,
+ mmmmap, eno_strat, eno_getc, eno_putc, D_DISK
+ },
+ [PTC_MAJOR] = {
+ ptsopen, ptsclose, ptsread, ptswrite,
+ ptyioctl, ptsstop, nullreset, 0, ptsselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
+ },
+ [PTS_MAJOR] = {
+ ptcopen, ptcclose, ptcread, ptcwrite,
+ ptyioctl, nullstop, nullreset, 0, ptcselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
+ },
+ [6] = {
+ logopen, logclose, logread, eno_rdwrt,
+ logioctl, eno_stop, nullreset, 0, logselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
+ },
+ [7] = {
+ oslogopen, oslogclose, eno_rdwrt, eno_rdwrt,
+ oslogioctl, eno_stop, nullreset, 0, oslogselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
+ },
+ [8] = {
+ oslog_streamopen, oslog_streamclose, oslog_streamread, eno_rdwrt,
+ oslog_streamioctl, eno_stop, nullreset, 0, oslog_streamselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
+ },
+ [9 ... 11] = NO_CDEVICE,
+ [12] = {
+ kmopen, kmclose, kmread, kmwrite,
+ kmioctl, nullstop, nullreset, km_tty, ttselect,
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
+ },
+ [13 ... 41] = NO_CDEVICE,
+ [42] = {
+ volopen, volclose, eno_rdwrt, eno_rdwrt,
+ volioctl, eno_stop, eno_reset, 0, (select_fcn_t *) seltrue,
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
+ }