/*
- * Copyright (c) 1997-2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1997-2012 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#include <sys/conf.h>
/* Prototypes that should be elsewhere: */
-extern int isdisk(dev_t dev, int type);
extern dev_t chrtoblk(dev_t dev);
extern int chrtoblk_set(int cdev, int bdev);
-extern int iskmemdev(dev_t dev);
struct bdevsw bdevsw[] =
{
extern d_write_t cnwrite;
extern d_ioctl_t cnioctl;
extern d_select_t cnselect;
-extern d_getc_t cngetc;
-extern d_putc_t cnputc;
extern d_open_t kmopen;
extern d_close_t kmclose;
extern d_read_t kmread;
extern d_write_t kmwrite;
extern d_ioctl_t kmioctl;
-extern d_getc_t kmgetc;
-extern d_putc_t kmputc;
extern d_open_t sgopen;
extern d_close_t sgclose;
extern d_ioctl_t sgioctl;
#include <pty.h>
#if NPTY > 0
-extern struct tty *pt_tty[];
extern d_open_t ptsopen;
extern d_close_t ptsclose;
extern d_read_t ptsread;
extern d_write_t ptswrite;
extern d_stop_t ptsstop;
-extern d_putc_t ptsputc;
+extern d_select_t ptsselect;
extern d_open_t ptcopen;
extern d_close_t ptcclose;
extern d_read_t ptcread;
#define ptsread eno_rdwrt
#define ptswrite eno_rdwrt
#define ptsstop nulldev
-#define ptsputc nulldev
#define ptcopen eno_opcl
#define ptcclose eno_opcl
{
cnopen, cnclose, cnread, cnwrite, /* 0*/
cnioctl, nullstop, nullreset, 0, cnselect,
- eno_mmap, eno_strat, cngetc, cnputc, D_TTY
+ eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
},
NO_CDEVICE, /* 1*/
{
},
{
ptsopen, ptsclose, ptsread, ptswrite, /* 4*/
- ptyioctl, ptsstop, nullreset, pt_tty, ttselect,
+ ptyioctl, ptsstop, nullreset, 0, ptsselect,
eno_mmap, eno_strat, eno_getc, eno_putc, D_TTY
},
{
{
kmopen, kmclose, kmread, kmwrite, /*12*/
kmioctl, nullstop, nullreset, km_tty, ttselect,
- eno_mmap, eno_strat, kmgetc, kmputc, 0
+ eno_mmap, eno_strat, eno_getc, eno_putc, 0
},
NO_CDEVICE, /*13*/
NO_CDEVICE, /*14*/
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
+uint64_t cdevsw_flags[sizeof (cdevsw) / sizeof (cdevsw[0])];
#include <sys/vnode.h> /* for VCHR and VBLK */
/*
/* 8 */ NODEV, /* 9 */ NODEV,
/* 10 */ NODEV, /* 11 */ NODEV,
/* 12 */ NODEV, /* 13 */ NODEV,
- /* 14 */ 6, /* 15 */ NODEV,
+ /* 14 */ NODEV, /* 15 */ NODEV,
/* 16 */ NODEV, /* 17 */ NODEV,
/* 18 */ NODEV, /* 19 */ NODEV,
/* 20 */ NODEV, /* 21 */ NODEV,
/* 34 */ NODEV, /* 35 */ NODEV,
/* 36 */ NODEV, /* 37 */ NODEV,
/* 38 */ NODEV, /* 39 */ NODEV,
- /* 40 */ NODEV, /* 41 */ 1,
+ /* 40 */ NODEV, /* 41 */ NODEV,
/* 42 */ NODEV, /* 43 */ NODEV,
/* 44 */ NODEV,
};
return 0;
}
-/*
- * Returns true if dev is /dev/mem or /dev/kmem.
- */
-int iskmemdev(dev_t dev)
-{
- return (major(dev) == 3 && minor(dev) < 2);
-}