Gigacommit to improve device-driver source compatibility between
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
This commit is contained in:
parent
03f5c00144
commit
7ac40f5f59
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111815
@ -80,19 +80,15 @@ static d_mmap_t memmmap;
|
||||
|
||||
#define CDEV_MAJOR 2
|
||||
static struct cdevsw mem_cdevsw = {
|
||||
/* open */ mmopen,
|
||||
/* close */ mmclose,
|
||||
/* read */ mmrw,
|
||||
/* write */ mmrw,
|
||||
/* ioctl */ mmioctl,
|
||||
/* poll */ (d_poll_t *)seltrue,
|
||||
/* mmap */ memmmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mem",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MEM,
|
||||
.d_open = mmopen,
|
||||
.d_close = mmclose,
|
||||
.d_read = mmrw,
|
||||
.d_write = mmrw,
|
||||
.d_ioctl = mmioctl,
|
||||
.d_mmap = memmmap,
|
||||
.d_name = "mem",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MEM,
|
||||
};
|
||||
|
||||
struct mem_range_softc mem_range_softc;
|
||||
|
@ -64,19 +64,14 @@ static d_ioctl_t promioctl;
|
||||
|
||||
#define CDEV_MAJOR 97
|
||||
static struct cdevsw prom_cdevsw = {
|
||||
/* open */ promopen,
|
||||
/* close */ promclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ promioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "prom",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = promopen,
|
||||
.d_close = promclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = promioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "prom",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
|
||||
|
@ -69,19 +69,14 @@ static d_ioctl_t zsioctl;
|
||||
|
||||
#define CDEV_MAJOR 135
|
||||
static struct cdevsw zs_cdevsw = {
|
||||
/* open */ zsopen,
|
||||
/* close */ zsclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ zsioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "zs",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = zsopen,
|
||||
.d_close = zsclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = zsioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "zs",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void zsstart(struct tty *);
|
||||
|
@ -64,19 +64,13 @@ static d_poll_t apmpoll;
|
||||
|
||||
#define CDEV_MAJOR 39
|
||||
static struct cdevsw apm_cdevsw = {
|
||||
/* open */ apmopen,
|
||||
/* close */ apmclose,
|
||||
/* read */ noread,
|
||||
/* write */ apmwrite,
|
||||
/* ioctl */ apmioctl,
|
||||
/* poll */ apmpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "apm",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = apmopen,
|
||||
.d_close = apmclose,
|
||||
.d_write = apmwrite,
|
||||
.d_ioctl = apmioctl,
|
||||
.d_poll = apmpoll,
|
||||
.d_name = "apm",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -78,19 +78,15 @@ static d_mmap_t memmmap;
|
||||
|
||||
#define CDEV_MAJOR 2
|
||||
static struct cdevsw mem_cdevsw = {
|
||||
/* open */ mmopen,
|
||||
/* close */ mmclose,
|
||||
/* read */ mmrw,
|
||||
/* write */ mmrw,
|
||||
/* ioctl */ mmioctl,
|
||||
/* poll */ (d_poll_t *)seltrue,
|
||||
/* mmap */ memmmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mem",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MEM,
|
||||
.d_open = mmopen,
|
||||
.d_close = mmclose,
|
||||
.d_read = mmrw,
|
||||
.d_write = mmrw,
|
||||
.d_ioctl = mmioctl,
|
||||
.d_mmap = memmmap,
|
||||
.d_name = "mem",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MEM,
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
|
||||
|
@ -636,19 +636,11 @@ static d_close_t xptclose;
|
||||
static d_ioctl_t xptioctl;
|
||||
|
||||
static struct cdevsw xpt_cdevsw = {
|
||||
/* open */ xptopen,
|
||||
/* close */ xptclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ xptioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "xpt",
|
||||
/* maj */ XPT_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = xptopen,
|
||||
.d_close = xptclose,
|
||||
.d_ioctl = xptioctl,
|
||||
.d_name = "xpt",
|
||||
.d_maj = XPT_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static struct intr_config_hook *xpt_config_hook;
|
||||
|
@ -288,19 +288,15 @@ static struct periph_driver cddriver =
|
||||
PERIPHDRIVER_DECLARE(cd, cddriver);
|
||||
|
||||
static struct cdevsw cd_cdevsw = {
|
||||
/* open */ cdopen,
|
||||
/* close */ cdclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ cdioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ cdstrategy,
|
||||
/* name */ "cd",
|
||||
/* maj */ CD_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK,
|
||||
.d_open = cdopen,
|
||||
.d_close = cdclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = cdioctl,
|
||||
.d_strategy = cdstrategy,
|
||||
.d_name = "cd",
|
||||
.d_maj = CD_CDEV_MAJOR,
|
||||
.d_flags = D_DISK,
|
||||
};
|
||||
|
||||
static int num_changers;
|
||||
|
@ -211,19 +211,11 @@ static struct periph_driver chdriver =
|
||||
PERIPHDRIVER_DECLARE(ch, chdriver);
|
||||
|
||||
static struct cdevsw ch_cdevsw = {
|
||||
/* open */ chopen,
|
||||
/* close */ chclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ chioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ch",
|
||||
/* maj */ CH_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = chopen,
|
||||
.d_close = chclose,
|
||||
.d_ioctl = chioctl,
|
||||
.d_name = "ch",
|
||||
.d_maj = CH_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -105,19 +105,11 @@ static struct periph_driver passdriver =
|
||||
PERIPHDRIVER_DECLARE(pass, passdriver);
|
||||
|
||||
static struct cdevsw pass_cdevsw = {
|
||||
/* open */ passopen,
|
||||
/* close */ passclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ passioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "pass",
|
||||
/* maj */ PASS_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = passopen,
|
||||
.d_close = passclose,
|
||||
.d_ioctl = passioctl,
|
||||
.d_name = "pass",
|
||||
.d_maj = PASS_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -118,19 +118,14 @@ PERIPHDRIVER_DECLARE(pt, ptdriver);
|
||||
#define PT_CDEV_MAJOR 61
|
||||
|
||||
static struct cdevsw pt_cdevsw = {
|
||||
/* open */ ptopen,
|
||||
/* close */ ptclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ ptioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ ptstrategy,
|
||||
/* name */ "pt",
|
||||
/* maj */ PT_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ptopen,
|
||||
.d_close = ptclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = ptioctl,
|
||||
.d_strategy = ptstrategy,
|
||||
.d_name = "pt",
|
||||
.d_maj = PT_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifndef SCSI_PT_DEFAULT_TIMEOUT
|
||||
|
@ -426,19 +426,15 @@ PERIPHDRIVER_DECLARE(sa, sadriver);
|
||||
#define SA_CDEV_MAJOR 14
|
||||
|
||||
static struct cdevsw sa_cdevsw = {
|
||||
/* open */ saopen,
|
||||
/* close */ saclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ saioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ sastrategy,
|
||||
/* name */ "sa",
|
||||
/* maj */ SA_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TAPE,
|
||||
.d_open = saopen,
|
||||
.d_close = saclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = saioctl,
|
||||
.d_strategy = sastrategy,
|
||||
.d_name = "sa",
|
||||
.d_maj = SA_CDEV_MAJOR,
|
||||
.d_flags = D_TAPE,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -176,19 +176,11 @@ PERIPHDRIVER_DECLARE(ses, sesdriver);
|
||||
|
||||
static struct cdevsw ses_cdevsw =
|
||||
{
|
||||
/* open */ sesopen,
|
||||
/* close */ sesclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ sesioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ses",
|
||||
/* maj */ SES_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = sesopen,
|
||||
.d_close = sesclose,
|
||||
.d_ioctl = sesioctl,
|
||||
.d_name = "ses",
|
||||
.d_maj = SES_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -105,20 +105,16 @@ static struct filterops targread_filtops =
|
||||
|
||||
#define TARG_CDEV_MAJOR 65
|
||||
static struct cdevsw targ_cdevsw = {
|
||||
/* open */ targopen,
|
||||
/* close */ targclose,
|
||||
/* read */ targread,
|
||||
/* write */ targwrite,
|
||||
/* ioctl */ targioctl,
|
||||
/* poll */ targpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "targ",
|
||||
/* maj */ TARG_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_KQFILTER,
|
||||
/* kqfilter */ targkqfilter
|
||||
.d_open = targopen,
|
||||
.d_close = targclose,
|
||||
.d_read = targread,
|
||||
.d_write = targwrite,
|
||||
.d_ioctl = targioctl,
|
||||
.d_poll = targpoll,
|
||||
.d_name = "targ",
|
||||
.d_maj = TARG_CDEV_MAJOR,
|
||||
.d_flags = D_KQFILTER,
|
||||
.d_kqfilter = targkqfilter
|
||||
};
|
||||
|
||||
static cam_status targendislun(struct cam_path *path, int enable,
|
||||
|
@ -66,19 +66,14 @@
|
||||
#define VC_DEV_NO 93
|
||||
|
||||
static struct cdevsw codadevsw = {
|
||||
/* open */ vc_nb_open,
|
||||
/* close */ vc_nb_close,
|
||||
/* read */ vc_nb_read,
|
||||
/* write */ vc_nb_write,
|
||||
/* ioctl */ vc_nb_ioctl,
|
||||
/* poll */ vc_nb_poll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "Coda",
|
||||
/* maj */ VC_DEV_NO,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = vc_nb_open,
|
||||
.d_close = vc_nb_close,
|
||||
.d_read = vc_nb_read,
|
||||
.d_write = vc_nb_write,
|
||||
.d_ioctl = vc_nb_ioctl,
|
||||
.d_poll = vc_nb_poll,
|
||||
.d_name = "Coda",
|
||||
.d_maj = VC_DEV_NO,
|
||||
};
|
||||
|
||||
int vcdebug = 1;
|
||||
|
@ -105,19 +105,12 @@ SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW,
|
||||
|
||||
#define CDEV_MAJOR 79
|
||||
static struct cdevsw ipl_cdevsw = {
|
||||
/* open */ iplopen,
|
||||
/* close */ iplclose,
|
||||
/* read */ iplread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ iplioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ipl",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = iplopen,
|
||||
.d_close = iplclose,
|
||||
.d_read = iplread,
|
||||
.d_ioctl = iplioctl,
|
||||
.d_name = "ipl",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -182,19 +182,12 @@ static int aac_query_disk(struct aac_softc *sc, caddr_t uptr);
|
||||
#define AAC_CDEV_MAJOR 150
|
||||
|
||||
static struct cdevsw aac_cdevsw = {
|
||||
aac_open, /* open */
|
||||
aac_close, /* close */
|
||||
noread, /* read */
|
||||
nowrite, /* write */
|
||||
aac_ioctl, /* ioctl */
|
||||
aac_poll, /* poll */
|
||||
nommap, /* mmap */
|
||||
nostrategy, /* strategy */
|
||||
"aac", /* name */
|
||||
AAC_CDEV_MAJOR, /* major */
|
||||
nodump, /* dump */
|
||||
nopsize, /* psize */
|
||||
0, /* flags */
|
||||
.d_open = aac_open,
|
||||
.d_close = aac_close,
|
||||
.d_ioctl = aac_ioctl,
|
||||
.d_poll = aac_poll,
|
||||
.d_name = "aac",
|
||||
.d_maj = AAC_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver");
|
||||
|
@ -74,19 +74,11 @@ static d_ioctl_t acpiioctl;
|
||||
|
||||
#define CDEV_MAJOR 152
|
||||
static struct cdevsw acpi_cdevsw = {
|
||||
/* open */ acpiopen,
|
||||
/* close */ acpiclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ acpiioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "acpi",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0
|
||||
.d_open = acpiopen,
|
||||
.d_close = acpiclose,
|
||||
.d_ioctl = acpiioctl,
|
||||
.d_name = "acpi",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static const char* sleep_state_names[] = {
|
||||
|
@ -70,19 +70,13 @@ static d_ioctl_t agp_ioctl;
|
||||
static d_mmap_t agp_mmap;
|
||||
|
||||
static struct cdevsw agp_cdevsw = {
|
||||
/* open */ agp_open,
|
||||
/* close */ agp_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ agp_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ agp_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "agp",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY,
|
||||
.d_open = agp_open,
|
||||
.d_close = agp_close,
|
||||
.d_ioctl = agp_ioctl,
|
||||
.d_mmap = agp_mmap,
|
||||
.d_name = "agp",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY,
|
||||
};
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
@ -94,19 +94,11 @@ static d_close_t amr_close;
|
||||
static d_ioctl_t amr_ioctl;
|
||||
|
||||
static struct cdevsw amr_cdevsw = {
|
||||
/* open */ amr_open,
|
||||
/* close */ amr_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ amr_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "amr",
|
||||
/* maj */ AMR_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = amr_open,
|
||||
.d_close = amr_close,
|
||||
.d_ioctl = amr_ioctl,
|
||||
.d_name = "amr",
|
||||
.d_maj = AMR_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -577,19 +577,11 @@ DATA_SET (mode0_pciset, mode0_pcidev);
|
||||
*/
|
||||
#define CDEV_MAJOR 154 /* preferred default character major */
|
||||
STATIC struct cdevsw asr_cdevsw = {
|
||||
asr_open, /* open */
|
||||
asr_close, /* close */
|
||||
noread, /* read */
|
||||
nowrite, /* write */
|
||||
asr_ioctl, /* ioctl */
|
||||
nopoll, /* poll */
|
||||
nommap, /* mmap */
|
||||
nostrategy, /* strategy */
|
||||
"asr", /* name */
|
||||
CDEV_MAJOR, /* maj */
|
||||
nodump, /* dump */
|
||||
nopsize, /* psize */
|
||||
0, /* flags */
|
||||
.d_open = asr_open,
|
||||
.d_close = asr_close,
|
||||
.d_ioctl = asr_ioctl,
|
||||
.d_name = "asr",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifdef ASR_MEASURE_PERFORMANCE
|
||||
|
@ -57,19 +57,11 @@
|
||||
/* device structures */
|
||||
static d_ioctl_t ataioctl;
|
||||
static struct cdevsw ata_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ataioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ata",
|
||||
/* maj */ 159,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = ataioctl,
|
||||
.d_name = "ata",
|
||||
.d_maj = 159,
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
|
@ -55,19 +55,15 @@ static d_close_t acdclose;
|
||||
static d_ioctl_t acdioctl;
|
||||
static d_strategy_t acdstrategy;
|
||||
static struct cdevsw acd_cdevsw = {
|
||||
/* open */ acdopen,
|
||||
/* close */ acdclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ acdioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ acdstrategy,
|
||||
/* name */ "acd",
|
||||
/* maj */ 117,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK | D_TRACKCLOSE,
|
||||
.d_open = acdopen,
|
||||
.d_close = acdclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = acdioctl,
|
||||
.d_strategy = acdstrategy,
|
||||
.d_name = "acd",
|
||||
.d_maj = 117,
|
||||
.d_flags = D_DISK | D_TRACKCLOSE,
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
|
@ -52,19 +52,15 @@ static d_close_t astclose;
|
||||
static d_ioctl_t astioctl;
|
||||
static d_strategy_t aststrategy;
|
||||
static struct cdevsw ast_cdevsw = {
|
||||
/* open */ astopen,
|
||||
/* close */ astclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ astioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ aststrategy,
|
||||
/* name */ "ast",
|
||||
/* maj */ 119,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TAPE | D_TRACKCLOSE,
|
||||
.d_open = astopen,
|
||||
.d_close = astclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = astioctl,
|
||||
.d_strategy = aststrategy,
|
||||
.d_name = "ast",
|
||||
.d_maj = 119,
|
||||
.d_flags = D_TAPE | D_TRACKCLOSE,
|
||||
};
|
||||
|
||||
/* prototypes */
|
||||
|
@ -326,19 +326,13 @@ static driver_t psm_driver = {
|
||||
#define CDEV_MAJOR 21
|
||||
|
||||
static struct cdevsw psm_cdevsw = {
|
||||
/* open */ psmopen,
|
||||
/* close */ psmclose,
|
||||
/* read */ psmread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ psmioctl,
|
||||
/* poll */ psmpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ PSM_DRIVER_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = psmopen,
|
||||
.d_close = psmclose,
|
||||
.d_read = psmread,
|
||||
.d_ioctl = psmioctl,
|
||||
.d_poll = psmpoll,
|
||||
.d_name = PSM_DRIVER_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/* debug message level */
|
||||
|
@ -247,19 +247,15 @@ static d_poll_t bktr_poll;
|
||||
|
||||
#define CDEV_MAJOR 92
|
||||
static struct cdevsw bktr_cdevsw = {
|
||||
/* open */ bktr_open,
|
||||
/* close */ bktr_close,
|
||||
/* read */ bktr_read,
|
||||
/* write */ bktr_write,
|
||||
/* ioctl */ bktr_ioctl,
|
||||
/* poll */ bktr_poll,
|
||||
/* mmap */ bktr_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "bktr",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = bktr_open,
|
||||
.d_close = bktr_close,
|
||||
.d_read = bktr_read,
|
||||
.d_write = bktr_write,
|
||||
.d_ioctl = bktr_ioctl,
|
||||
.d_poll = bktr_poll,
|
||||
.d_mmap = bktr_mmap,
|
||||
.d_name = "bktr",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
DRIVER_MODULE(bktr, pci, bktr_driver, bktr_devclass, 0, 0);
|
||||
|
@ -115,19 +115,11 @@ static d_ioctl_t ccdctlioctl;
|
||||
#define CDEV_MAJOR 74
|
||||
|
||||
static struct cdevsw ccdctl_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ccdctlioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ccdctl",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = ccdctlioctl,
|
||||
.d_name = "ccdctl",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static LIST_HEAD(, ccd_s) ccd_softc_list =
|
||||
|
@ -217,20 +217,11 @@ static d_ioctl_t ciss_ioctl;
|
||||
#define CISS_CDEV_MAJOR 166
|
||||
|
||||
static struct cdevsw ciss_cdevsw = {
|
||||
/* open */ ciss_open,
|
||||
/* close */ ciss_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ciss_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ciss",
|
||||
/* maj */ CISS_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ nokqfilter
|
||||
.d_open = ciss_open,
|
||||
.d_close = ciss_close,
|
||||
.d_ioctl = ciss_ioctl,
|
||||
.d_name = "ciss",
|
||||
.d_maj = CISS_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
@ -397,20 +397,16 @@ static d_ioctl_t sioioctl;
|
||||
|
||||
#define CDEV_MAJOR 48
|
||||
static struct cdevsw sio_cdevsw = {
|
||||
/* open */ sioopen,
|
||||
/* close */ sioclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ siowrite,
|
||||
/* ioctl */ sioioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ driver_name,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = sioopen,
|
||||
.d_close = sioclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = siowrite,
|
||||
.d_ioctl = sioioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = driver_name,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static int comconsole = -1;
|
||||
|
@ -397,20 +397,16 @@ static d_ioctl_t sioioctl;
|
||||
|
||||
#define CDEV_MAJOR 48
|
||||
static struct cdevsw sio_cdevsw = {
|
||||
/* open */ sioopen,
|
||||
/* close */ sioclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ siowrite,
|
||||
/* ioctl */ sioioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ driver_name,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = sioopen,
|
||||
.d_close = sioclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = siowrite,
|
||||
.d_ioctl = sioioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = driver_name,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static int comconsole = -1;
|
||||
|
@ -242,20 +242,16 @@ static d_ioctl_t dgbioctl;
|
||||
|
||||
#define CDEV_MAJOR 58
|
||||
static struct cdevsw dgb_cdevsw = {
|
||||
/* open */ dgbopen,
|
||||
/* close */ dgbclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ dgbioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "dgb",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = dgbopen,
|
||||
.d_close = dgbclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = dgbioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "dgb",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static speed_t dgbdefaultrate = TTYDEF_SPEED;
|
||||
|
@ -143,20 +143,16 @@ const struct digi_control_signals digi_normal_signals = {
|
||||
};
|
||||
|
||||
static struct cdevsw digi_sw = {
|
||||
/* open */ digiopen,
|
||||
/* close */ digiclose,
|
||||
/* read */ digiread,
|
||||
/* write */ digiwrite,
|
||||
/* ioctl */ digiioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ driver_name,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter
|
||||
.d_open = digiopen,
|
||||
.d_close = digiclose,
|
||||
.d_read = digiread,
|
||||
.d_write = digiwrite,
|
||||
.d_ioctl = digiioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = driver_name,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -316,21 +316,18 @@ static driver_t DRM(driver) = {
|
||||
static devclass_t DRM( devclass);
|
||||
|
||||
static struct cdevsw DRM( cdevsw) = {
|
||||
/* open */ DRM( open ),
|
||||
/* close */ DRM( close ),
|
||||
/* read */ DRM( read ),
|
||||
/* write */ DRM( write ),
|
||||
/* ioctl */ DRM( ioctl ),
|
||||
/* poll */ DRM( poll ),
|
||||
/* mmap */ DRM( mmap ),
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ DRIVER_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_TRACKCLOSE,
|
||||
.d_open = DRM( open ),
|
||||
.d_close = DRM( close ),
|
||||
.d_read = DRM( read ),
|
||||
.d_write = DRM( write ),
|
||||
.d_ioctl = DRM( ioctl ),
|
||||
.d_poll = DRM( poll ),
|
||||
.d_mmap = DRM( mmap ),
|
||||
.d_name = DRIVER_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_TRACKCLOSE,
|
||||
#if __FreeBSD_version >= 500000
|
||||
/* kqfilter */ 0
|
||||
.d_kqfilter = 0
|
||||
#else
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -363,19 +363,14 @@ static d_mmap_t fbmmap;
|
||||
#define CDEV_MAJOR 123 /* XXX */
|
||||
|
||||
static struct cdevsw fb_cdevsw = {
|
||||
/* open */ fbopen,
|
||||
/* close */ fbclose,
|
||||
/* read */ fbread,
|
||||
/* write */ fbwrite,
|
||||
/* ioctl */ fbioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ fbmmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ FB_DRIVER_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = fbopen,
|
||||
.d_close = fbclose,
|
||||
.d_read = fbread,
|
||||
.d_write = fbwrite,
|
||||
.d_ioctl = fbioctl,
|
||||
.d_mmap = fbmmap,
|
||||
.d_name = FB_DRIVER_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -477,19 +477,15 @@ fdin_rd(fdc_p fdc)
|
||||
|
||||
#define CDEV_MAJOR 9
|
||||
static struct cdevsw fd_cdevsw = {
|
||||
/* open */ Fdopen,
|
||||
/* close */ fdclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ fdioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ fdstrategy,
|
||||
/* name */ "fd",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK,
|
||||
.d_open = Fdopen,
|
||||
.d_close = fdclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = fdioctl,
|
||||
.d_strategy = fdstrategy,
|
||||
.d_name = "fd",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_DISK,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -67,19 +67,16 @@ static d_mmap_t fw_mmap;
|
||||
|
||||
struct cdevsw firewire_cdevsw =
|
||||
{
|
||||
/* open */ fw_open,
|
||||
/* close */ fw_close,
|
||||
/* read */ fw_read,
|
||||
/* write */ fw_write,
|
||||
/* ioctl */ fw_ioctl,
|
||||
/* poll */ fw_poll,
|
||||
/* mmap */ fw_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "fw",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MEM
|
||||
.d_open = fw_open,
|
||||
.d_close = fw_close,
|
||||
.d_read = fw_read,
|
||||
.d_write = fw_write,
|
||||
.d_ioctl = fw_ioctl,
|
||||
.d_poll = fw_poll,
|
||||
.d_mmap = fw_mmap,
|
||||
.d_name = "fw",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MEM
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -507,19 +507,7 @@ fore_reset(fup)
|
||||
* Driver entry points
|
||||
*/
|
||||
static struct cdevsw fore_cdev = {
|
||||
/* open */ noopen,
|
||||
/* close */ noclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ noname,
|
||||
/* maj */ -1,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_maj = -1,
|
||||
};
|
||||
|
||||
|
||||
|
@ -94,19 +94,13 @@ static d_ioctl_t iicioctl;
|
||||
|
||||
#define CDEV_MAJOR 105
|
||||
static struct cdevsw iic_cdevsw = {
|
||||
/* open */ iicopen,
|
||||
/* close */ iicclose,
|
||||
/* read */ iicread,
|
||||
/* write */ iicwrite,
|
||||
/* ioctl */ iicioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "iic",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = iicopen,
|
||||
.d_close = iicclose,
|
||||
.d_read = iicread,
|
||||
.d_write = iicwrite,
|
||||
.d_ioctl = iicioctl,
|
||||
.d_name = "iic",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -69,20 +69,13 @@ static d_ioctl_t iir_ioctl;
|
||||
|
||||
/* Normally, this is a static structure. But we need it in pci/iir_pci.c */
|
||||
static struct cdevsw iir_cdevsw = {
|
||||
/* open */ iir_open,
|
||||
/* close */ iir_close,
|
||||
/* read */ iir_read,
|
||||
/* write */ iir_write,
|
||||
/* ioctl */ iir_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "iir",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ nokqfilter
|
||||
.d_open = iir_open,
|
||||
.d_close = iir_close,
|
||||
.d_read = iir_read,
|
||||
.d_write = iir_write,
|
||||
.d_ioctl = iir_ioctl,
|
||||
.d_name = "iir",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifndef SDEV_PER_HBA
|
||||
|
@ -50,19 +50,12 @@ static void isp_action(struct cam_sim *, union ccb *);
|
||||
|
||||
#define ISP_CDEV_MAJOR 248
|
||||
static struct cdevsw isp_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ispioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "isp",
|
||||
/* maj */ ISP_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TAPE,
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = ispioctl,
|
||||
.d_name = "isp",
|
||||
.d_maj = ISP_CDEV_MAJOR,
|
||||
.d_flags = D_TAPE,
|
||||
};
|
||||
|
||||
static struct ispsoftc *isplist = NULL;
|
||||
|
@ -68,19 +68,12 @@ static d_read_t joyread;
|
||||
static d_ioctl_t joyioctl;
|
||||
|
||||
static struct cdevsw joy_cdevsw = {
|
||||
/* open */ joyopen,
|
||||
/* close */ joyclose,
|
||||
/* read */ joyread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ joyioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "joy",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = joyopen,
|
||||
.d_close = joyclose,
|
||||
.d_read = joyread,
|
||||
.d_ioctl = joyioctl,
|
||||
.d_name = "joy",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
devclass_t joy_devclass;
|
||||
|
@ -425,19 +425,14 @@ static d_poll_t genkbdpoll;
|
||||
#define CDEV_MAJOR 112
|
||||
|
||||
static struct cdevsw kbd_cdevsw = {
|
||||
/* open */ genkbdopen,
|
||||
/* close */ genkbdclose,
|
||||
/* read */ genkbdread,
|
||||
/* write */ genkbdwrite,
|
||||
/* ioctl */ genkbdioctl,
|
||||
/* poll */ genkbdpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "kbd",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = genkbdopen,
|
||||
.d_close = genkbdclose,
|
||||
.d_read = genkbdread,
|
||||
.d_write = genkbdwrite,
|
||||
.d_ioctl = genkbdioctl,
|
||||
.d_poll = genkbdpoll,
|
||||
.d_name = "kbd",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -161,19 +161,14 @@ static d_strategy_t mcdstrategy;
|
||||
#define CDEV_MAJOR 29
|
||||
|
||||
static struct cdevsw mcd_cdevsw = {
|
||||
/* open */ mcdopen,
|
||||
/* close */ mcdclose,
|
||||
/* read */ physread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mcdioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ mcdstrategy,
|
||||
/* name */ "mcd",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK,
|
||||
.d_open = mcdopen,
|
||||
.d_close = mcdclose,
|
||||
.d_read = physread,
|
||||
.d_ioctl = mcdioctl,
|
||||
.d_strategy = mcdstrategy,
|
||||
.d_name = "mcd",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_DISK,
|
||||
};
|
||||
|
||||
#define MCD_RETRYS 5
|
||||
|
@ -119,16 +119,11 @@ static dev_t status_dev = 0;
|
||||
static d_ioctl_t mdctlioctl;
|
||||
|
||||
static struct cdevsw mdctl_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mdctlioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ MD_NAME,
|
||||
/* maj */ CDEV_MAJOR
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = mdctlioctl,
|
||||
.d_name = MD_NAME,
|
||||
.d_maj = CDEV_MAJOR
|
||||
};
|
||||
|
||||
|
||||
|
@ -56,19 +56,11 @@
|
||||
#define MLX_CDEV_MAJOR 130
|
||||
|
||||
static struct cdevsw mlx_cdevsw = {
|
||||
/* open */ mlx_open,
|
||||
/* close */ mlx_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mlx_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mlx",
|
||||
/* maj */ MLX_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = mlx_open,
|
||||
.d_close = mlx_close,
|
||||
.d_ioctl = mlx_ioctl,
|
||||
.d_name = "mlx",
|
||||
.d_maj = MLX_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
devclass_t mlx_devclass;
|
||||
|
@ -153,19 +153,11 @@ DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0);
|
||||
#define MLY_CDEV_MAJOR 158
|
||||
|
||||
static struct cdevsw mly_cdevsw = {
|
||||
/* open */ mly_user_open,
|
||||
/* close */ mly_user_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mly_user_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mly",
|
||||
/* maj */ MLY_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0
|
||||
.d_open = mly_user_open,
|
||||
.d_close = mly_user_close,
|
||||
.d_ioctl = mly_user_ioctl,
|
||||
.d_name = "mly",
|
||||
.d_maj = MLY_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -139,19 +139,13 @@ static d_poll_t msepoll;
|
||||
|
||||
#define CDEV_MAJOR 27
|
||||
static struct cdevsw mse_cdevsw = {
|
||||
/* open */ mseopen,
|
||||
/* close */ mseclose,
|
||||
/* read */ mseread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mseioctl,
|
||||
/* poll */ msepoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mse",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = mseopen,
|
||||
.d_close = mseclose,
|
||||
.d_read = mseread,
|
||||
.d_ioctl = mseioctl,
|
||||
.d_poll = msepoll,
|
||||
.d_name = "mse",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void mseintr(void *);
|
||||
|
@ -70,19 +70,15 @@ static d_ioctl_t nmdmioctl;
|
||||
|
||||
#define CDEV_MAJOR 18
|
||||
static struct cdevsw nmdm_cdevsw = {
|
||||
/* open */ nmdmopen,
|
||||
/* close */ nmdmclose,
|
||||
/* read */ nmdmread,
|
||||
/* write */ nmdmwrite,
|
||||
/* ioctl */ nmdmioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "pts",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY,
|
||||
.d_open = nmdmopen,
|
||||
.d_close = nmdmclose,
|
||||
.d_read = nmdmread,
|
||||
.d_write = nmdmwrite,
|
||||
.d_ioctl = nmdmioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "pts",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY,
|
||||
};
|
||||
|
||||
#define BUFSIZ 100 /* Chunk size iomoved to/from user */
|
||||
|
@ -51,37 +51,23 @@ static d_read_t null_read;
|
||||
#define ZERO_MINOR 12
|
||||
|
||||
static struct cdevsw null_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ null_read,
|
||||
/* write */ null_write,
|
||||
/* ioctl */ null_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "null",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ NULL
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_read = null_read,
|
||||
.d_write = null_write,
|
||||
.d_ioctl = null_ioctl,
|
||||
.d_name = "null",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static struct cdevsw zero_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ zero_read,
|
||||
/* write */ null_write,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "zero",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MMAP_ANON,
|
||||
/* kqfilter */ NULL
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_read = zero_read,
|
||||
.d_write = null_write,
|
||||
.d_name = "zero",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MMAP_ANON,
|
||||
};
|
||||
|
||||
static void *zbuf;
|
||||
|
@ -53,19 +53,14 @@ static d_ioctl_t ofw_dev_ioctl;
|
||||
#define CDEV_MAJOR 97
|
||||
|
||||
static struct cdevsw ofw_cdevsw = {
|
||||
/* open */ ofw_dev_open,
|
||||
/* close */ ofw_dev_close,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ ofw_dev_ioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ofw",
|
||||
/* major */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ofw_dev_open,
|
||||
.d_close = ofw_dev_close,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = ofw_dev_ioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "ofw",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static struct tty *ofw_tp = NULL;
|
||||
|
@ -66,20 +66,11 @@ static d_ioctl_t openfirm_ioctl;
|
||||
#define OPENFIRM_MINOR 0
|
||||
|
||||
static struct cdevsw openfirm_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ openfirm_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "openfirm",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ nokqfilter
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = openfirm_ioctl,
|
||||
.d_name = "openfirm",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static phandle_t lastnode; /* speed hack */
|
||||
|
@ -74,19 +74,11 @@ static d_ioctl_t pci_ioctl;
|
||||
#endif
|
||||
|
||||
struct cdevsw pcicdev = {
|
||||
/* open */ pci_open,
|
||||
/* close */ pci_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ pci_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "pci",
|
||||
/* maj */ PCI_CDEV,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = pci_open,
|
||||
.d_close = pci_close,
|
||||
.d_ioctl = pci_ioctl,
|
||||
.d_name = "pci",
|
||||
.d_maj = PCI_CDEV,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -189,19 +189,13 @@ static d_ioctl_t lptioctl;
|
||||
|
||||
#define CDEV_MAJOR 16
|
||||
static struct cdevsw lpt_cdevsw = {
|
||||
/* open */ lptopen,
|
||||
/* close */ lptclose,
|
||||
/* read */ lptread,
|
||||
/* write */ lptwrite,
|
||||
/* ioctl */ lptioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ LPT_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = lptopen,
|
||||
.d_close = lptclose,
|
||||
.d_read = lptread,
|
||||
.d_write = lptwrite,
|
||||
.d_ioctl = lptioctl,
|
||||
.d_name = LPT_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -67,19 +67,11 @@ static d_read_t pcfclock_read;
|
||||
|
||||
#define CDEV_MAJOR 140
|
||||
static struct cdevsw pcfclock_cdevsw = {
|
||||
/* open */ pcfclock_open,
|
||||
/* close */ pcfclock_close,
|
||||
/* read */ pcfclock_read,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ PCFCLOCK_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = pcfclock_open,
|
||||
.d_close = pcfclock_close,
|
||||
.d_read = pcfclock_read,
|
||||
.d_name = PCFCLOCK_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifndef PCFCLOCK_MAX_RETRIES
|
||||
|
@ -90,19 +90,13 @@ static d_read_t ppiread;
|
||||
|
||||
#define CDEV_MAJOR 82
|
||||
static struct cdevsw ppi_cdevsw = {
|
||||
/* open */ ppiopen,
|
||||
/* close */ ppiclose,
|
||||
/* read */ ppiread,
|
||||
/* write */ ppiwrite,
|
||||
/* ioctl */ ppiioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ppi",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ppiopen,
|
||||
.d_close = ppiclose,
|
||||
.d_read = ppiread,
|
||||
.d_write = ppiwrite,
|
||||
.d_ioctl = ppiioctl,
|
||||
.d_name = "ppi",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifdef PERIPH_1284
|
||||
|
@ -62,19 +62,11 @@ static d_ioctl_t ppsioctl;
|
||||
|
||||
#define CDEV_MAJOR 89
|
||||
static struct cdevsw pps_cdevsw = {
|
||||
/* open */ ppsopen,
|
||||
/* close */ ppsclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ppsioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ PPS_NAME,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ppsopen,
|
||||
.d_close = ppsclose,
|
||||
.d_ioctl = ppsioctl,
|
||||
.d_name = PPS_NAME,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -215,19 +215,11 @@ d_close_t raidctlclose;
|
||||
d_ioctl_t raidctlioctl;
|
||||
|
||||
static struct cdevsw raidctl_cdevsw = {
|
||||
/* open */ raidctlopen,
|
||||
/* close */ raidctlclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ raidctlioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "raidctl",
|
||||
/* maj */ 201,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = raidctlopen,
|
||||
.d_close = raidctlclose,
|
||||
.d_ioctl = raidctlioctl,
|
||||
.d_name = "raidctl",
|
||||
.d_maj = 201,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -62,20 +62,14 @@ static d_poll_t random_poll;
|
||||
#define RANDOM_MINOR 3
|
||||
|
||||
static struct cdevsw random_cdevsw = {
|
||||
/* open */ random_open,
|
||||
/* close */ random_close,
|
||||
/* read */ random_read,
|
||||
/* write */ random_write,
|
||||
/* ioctl */ random_ioctl,
|
||||
/* poll */ random_poll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "random",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ NULL
|
||||
.d_open = random_open,
|
||||
.d_close = random_close,
|
||||
.d_read = random_read,
|
||||
.d_write = random_write,
|
||||
.d_ioctl = random_ioctl,
|
||||
.d_poll = random_poll,
|
||||
.d_name = "random",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void random_kthread(void *);
|
||||
|
@ -146,20 +146,16 @@ static d_ioctl_t rcioctl;
|
||||
|
||||
#define CDEV_MAJOR 63
|
||||
static struct cdevsw rc_cdevsw = {
|
||||
/* open */ rcopen,
|
||||
/* close */ rcclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ rcioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "rc",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = rcopen,
|
||||
.d_close = rcclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = rcioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "rc",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static devclass_t rc_devclass;
|
||||
|
@ -571,19 +571,15 @@ static d_ioctl_t rpioctl;
|
||||
|
||||
#define CDEV_MAJOR 81
|
||||
struct cdevsw rp_cdevsw = {
|
||||
/* open */ rpopen,
|
||||
/* close */ rpclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ rpwrite,
|
||||
/* ioctl */ rpioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "rp",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY,
|
||||
.d_open = rpopen,
|
||||
.d_close = rpclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = rpwrite,
|
||||
.d_ioctl = rpioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "rp",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY,
|
||||
};
|
||||
|
||||
static int rp_num_ports_open = 0;
|
||||
|
@ -160,20 +160,16 @@ static void sabttystop(struct tty *tp, int rw);
|
||||
static int sabttyparam(struct tty *tp, struct termios *t);
|
||||
|
||||
static struct cdevsw sabtty_cdevsw = {
|
||||
/* open */ sabttyopen,
|
||||
/* close */ sabttyclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ sabttyioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "sabtty",
|
||||
/* major */ MAJOR_AUTO,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = sabttyopen,
|
||||
.d_close = sabttyclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = sabttyioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "sabtty",
|
||||
.d_maj = MAJOR_AUTO,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static device_method_t sab_methods[] = {
|
||||
|
@ -146,19 +146,14 @@ static d_strategy_t scdstrategy;
|
||||
#define CDEV_MAJOR 45
|
||||
|
||||
static struct cdevsw scd_cdevsw = {
|
||||
/* open */ scdopen,
|
||||
/* close */ scdclose,
|
||||
/* read */ physread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ scdioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ scdstrategy,
|
||||
/* name */ "scd",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK,
|
||||
.d_open = scdopen,
|
||||
.d_close = scdclose,
|
||||
.d_read = physread,
|
||||
.d_ioctl = scdioctl,
|
||||
.d_strategy = scdstrategy,
|
||||
.d_name = "scd",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_DISK,
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -116,20 +116,16 @@ static d_ioctl_t siioctl;
|
||||
|
||||
#define CDEV_MAJOR 68
|
||||
static struct cdevsw si_cdevsw = {
|
||||
/* open */ siopen,
|
||||
/* close */ siclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ siwrite,
|
||||
/* ioctl */ siioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "si",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = siopen,
|
||||
.d_close = siclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = siwrite,
|
||||
.d_ioctl = siioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "si",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static int si_Nports;
|
||||
|
@ -314,20 +314,16 @@ static d_ioctl_t sioioctl;
|
||||
|
||||
#define CDEV_MAJOR 28
|
||||
static struct cdevsw sio_cdevsw = {
|
||||
/* open */ sioopen,
|
||||
/* close */ sioclose,
|
||||
/* read */ sioread,
|
||||
/* write */ siowrite,
|
||||
/* ioctl */ sioioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ sio_driver_name,
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = sioopen,
|
||||
.d_close = sioclose,
|
||||
.d_read = sioread,
|
||||
.d_write = siowrite,
|
||||
.d_ioctl = sioioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = sio_driver_name,
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
int comconsole = -1;
|
||||
|
@ -89,19 +89,13 @@ static d_ioctl_t smbioctl;
|
||||
|
||||
#define CDEV_MAJOR 106
|
||||
static struct cdevsw smb_cdevsw = {
|
||||
/* open */ smbopen,
|
||||
/* close */ smbclose,
|
||||
/* read */ smbread,
|
||||
/* write */ smbwrite,
|
||||
/* ioctl */ smbioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "smb",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = smbopen,
|
||||
.d_close = smbclose,
|
||||
.d_read = smbread,
|
||||
.d_write = smbwrite,
|
||||
.d_ioctl = smbioctl,
|
||||
.d_name = "smb",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -38,19 +38,14 @@ static d_poll_t snppoll;
|
||||
|
||||
#define CDEV_MAJOR 53
|
||||
static struct cdevsw snp_cdevsw = {
|
||||
/* open */ snpopen,
|
||||
/* close */ snpclose,
|
||||
/* read */ snpread,
|
||||
/* write */ snpwrite,
|
||||
/* ioctl */ snpioctl,
|
||||
/* poll */ snppoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "snp",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = snpopen,
|
||||
.d_close = snpclose,
|
||||
.d_read = snpread,
|
||||
.d_write = snpwrite,
|
||||
.d_ioctl = snpioctl,
|
||||
.d_poll = snppoll,
|
||||
.d_name = "snp",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static struct linesw snpdisc = {
|
||||
|
@ -70,19 +70,14 @@ static int midi_readstatus(char *buf, int *ptr, struct uio *uio);
|
||||
|
||||
#define CDEV_MAJOR MIDI_CDEV_MAJOR
|
||||
static struct cdevsw midi_cdevsw = {
|
||||
/* open */ midiopen,
|
||||
/* close */ midiclose,
|
||||
/* read */ midiread,
|
||||
/* write */ midiwrite,
|
||||
/* ioctl */ midiioctl,
|
||||
/* poll */ midipoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "midi",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = midiopen,
|
||||
.d_close = midiclose,
|
||||
.d_read = midiread,
|
||||
.d_write = midiwrite,
|
||||
.d_ioctl = midiioctl,
|
||||
.d_poll = midipoll,
|
||||
.d_name = "midi",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -135,19 +135,14 @@ static d_poll_t seqpoll;
|
||||
|
||||
#define CDEV_MAJOR SEQ_CDEV_MAJOR
|
||||
static struct cdevsw seq_cdevsw = {
|
||||
/* open */ seqopen,
|
||||
/* close */ seqclose,
|
||||
/* read */ seqread,
|
||||
/* write */ seqwrite,
|
||||
/* ioctl */ seqioctl,
|
||||
/* poll */ seqpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "midi", /* XXX */
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = seqopen,
|
||||
.d_close = seqclose,
|
||||
.d_read = seqread,
|
||||
.d_write = seqwrite,
|
||||
.d_ioctl = seqioctl,
|
||||
.d_poll = seqpoll,
|
||||
.d_name = "midi", /* XXX */
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
|
||||
|
@ -42,19 +42,15 @@ static d_poll_t dsp_poll;
|
||||
static d_mmap_t dsp_mmap;
|
||||
|
||||
static struct cdevsw dsp_cdevsw = {
|
||||
/* open */ dsp_open,
|
||||
/* close */ dsp_close,
|
||||
/* read */ dsp_read,
|
||||
/* write */ dsp_write,
|
||||
/* ioctl */ dsp_ioctl,
|
||||
/* poll */ dsp_poll,
|
||||
/* mmap */ dsp_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "dsp",
|
||||
/* maj */ SND_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = dsp_open,
|
||||
.d_close = dsp_close,
|
||||
.d_read = dsp_read,
|
||||
.d_write = dsp_write,
|
||||
.d_ioctl = dsp_ioctl,
|
||||
.d_poll = dsp_poll,
|
||||
.d_mmap = dsp_mmap,
|
||||
.d_name = "dsp",
|
||||
.d_maj = SND_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifdef USING_DEVFS
|
||||
|
@ -73,19 +73,11 @@ static d_open_t mixer_open;
|
||||
static d_close_t mixer_close;
|
||||
|
||||
static struct cdevsw mixer_cdevsw = {
|
||||
/* open */ mixer_open,
|
||||
/* close */ mixer_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ mixer_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mixer",
|
||||
/* maj */ SND_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = mixer_open,
|
||||
.d_close = mixer_close,
|
||||
.d_ioctl = mixer_ioctl,
|
||||
.d_name = "mixer",
|
||||
.d_maj = SND_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
#ifdef USING_DEVFS
|
||||
|
@ -41,19 +41,11 @@ static d_close_t sndstat_close;
|
||||
static d_read_t sndstat_read;
|
||||
|
||||
static struct cdevsw sndstat_cdevsw = {
|
||||
/* open */ sndstat_open,
|
||||
/* close */ sndstat_close,
|
||||
/* read */ sndstat_read,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "sndstat",
|
||||
/* maj */ SND_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = sndstat_open,
|
||||
.d_close = sndstat_close,
|
||||
.d_read = sndstat_read,
|
||||
.d_name = "sndstat",
|
||||
.d_maj = SND_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
struct sndstat_entry {
|
||||
|
@ -34,19 +34,12 @@ static d_ioctl_t spkrioctl;
|
||||
|
||||
#define CDEV_MAJOR 26
|
||||
static struct cdevsw spkr_cdevsw = {
|
||||
/* open */ spkropen,
|
||||
/* close */ spkrclose,
|
||||
/* read */ noread,
|
||||
/* write */ spkrwrite,
|
||||
/* ioctl */ spkrioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "spkr",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = spkropen,
|
||||
.d_close = spkrclose,
|
||||
.d_write = spkrwrite,
|
||||
.d_ioctl = spkrioctl,
|
||||
.d_name = "spkr",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
|
||||
|
@ -105,19 +105,9 @@ static struct fileops svr4_netops = {
|
||||
|
||||
#define CDEV_MAJOR 103
|
||||
static struct cdevsw streams_cdevsw = {
|
||||
/* open */ streamsopen,
|
||||
/* close */ noclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "streams",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = streamsopen,
|
||||
.d_name = "streams",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
struct streams_softc {
|
||||
|
@ -212,20 +212,17 @@ static d_ioctl_t scioctl;
|
||||
static d_mmap_t scmmap;
|
||||
|
||||
static struct cdevsw sc_cdevsw = {
|
||||
/* open */ scopen,
|
||||
/* close */ scclose,
|
||||
/* read */ scread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ scioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ scmmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "sc",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter
|
||||
.d_open = scopen,
|
||||
.d_close = scclose,
|
||||
.d_read = scread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = scioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_mmap = scmmap,
|
||||
.d_name = "sc",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -48,19 +48,14 @@ static d_close_t smclose;
|
||||
static d_ioctl_t smioctl;
|
||||
|
||||
static struct cdevsw sm_cdevsw = {
|
||||
/* open */ smopen,
|
||||
/* close */ smclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ smioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "sysmouse",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY,
|
||||
.d_open = smopen,
|
||||
.d_close = smclose,
|
||||
.d_read = ttyread,
|
||||
.d_ioctl = smioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "sysmouse",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_TTY,
|
||||
};
|
||||
|
||||
/* local variables */
|
||||
|
@ -103,19 +103,12 @@ LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX);
|
||||
|
||||
/* Char. Dev. file operations structure */
|
||||
static struct cdevsw tdfx_cdev = {
|
||||
/* open */ tdfx_open,
|
||||
/* close */ tdfx_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ tdfx_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ tdfx_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "tdfx",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = tdfx_open,
|
||||
.d_close = tdfx_close,
|
||||
.d_ioctl = tdfx_ioctl,
|
||||
.d_mmap = tdfx_mmap,
|
||||
.d_name = "tdfx",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -97,20 +97,14 @@ static struct gfb_type tga_devs[] = {
|
||||
#ifdef FB_INSTALL_CDEV
|
||||
|
||||
static struct cdevsw tga_cdevsw = {
|
||||
/* open */ pcigfb_open,
|
||||
/* close */ pcigfb_close,
|
||||
/* read */ pcigfb_read,
|
||||
/* write */ pcigfb_write,
|
||||
/* ioctl */ pcigfb_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ pcigfb_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "tga",
|
||||
/* maj */ -1,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
/* kqfilter */ nokqfilter
|
||||
.d_open = pcigfb_open,
|
||||
.d_close = pcigfb_close,
|
||||
.d_read = pcigfb_read,
|
||||
.d_write = pcigfb_write,
|
||||
.d_ioctl = pcigfb_ioctl,
|
||||
.d_mmap = pcigfb_mmap,
|
||||
.d_name = "tga",
|
||||
.d_maj = -1,
|
||||
};
|
||||
|
||||
#endif /* FB_INSTALL_CDEV */
|
||||
|
@ -192,19 +192,11 @@ static d_close_t ti_close;
|
||||
static d_ioctl_t ti_ioctl2;
|
||||
|
||||
static struct cdevsw ti_cdevsw = {
|
||||
/* open */ ti_open,
|
||||
/* close */ ti_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ti_ioctl2,
|
||||
/* poll */ seltrue,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ti",
|
||||
/* maj */ TI_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ti_open,
|
||||
.d_close = ti_close,
|
||||
.d_ioctl = ti_ioctl2,
|
||||
.d_name = "ti",
|
||||
.d_maj = TI_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int ti_probe (device_t);
|
||||
|
@ -71,19 +71,11 @@ static d_ioctl_t twe_ioctl_wrapper;
|
||||
#define TWE_CDEV_MAJOR 146
|
||||
|
||||
static struct cdevsw twe_cdevsw = {
|
||||
/* open */ twe_open,
|
||||
/* close */ twe_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ twe_ioctl_wrapper,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "twe",
|
||||
/* maj */ TWE_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0
|
||||
.d_open = twe_open,
|
||||
.d_close = twe_close,
|
||||
.d_ioctl = twe_ioctl_wrapper,
|
||||
.d_name = "twe",
|
||||
.d_maj = TWE_CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -128,23 +128,19 @@ Static d_ioctl_t ucomioctl;
|
||||
#define UCOM_CDEV_MAJOR 138
|
||||
|
||||
static struct cdevsw ucom_cdevsw = {
|
||||
/* open */ ucomopen,
|
||||
/* close */ ucomclose,
|
||||
/* read */ ucomread,
|
||||
/* write */ ucomwrite,
|
||||
/* ioctl */ ucomioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ucom",
|
||||
/* maj */ UCOM_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
.d_open = ucomopen,
|
||||
.d_close = ucomclose,
|
||||
.d_read = ucomread,
|
||||
.d_write = ucomwrite,
|
||||
.d_ioctl = ucomioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "ucom",
|
||||
.d_maj = UCOM_CDEV_MAJOR,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1,
|
||||
#endif
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
Static void ucom_cleanup(struct ucom_softc *);
|
||||
|
@ -90,19 +90,11 @@ d_ioctl_t ufmioctl;
|
||||
#define UFM_CDEV_MAJOR MAJOR_AUTO
|
||||
|
||||
Static struct cdevsw ufm_cdevsw = {
|
||||
/* open */ ufmopen,
|
||||
/* close */ ufmclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ufmioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ufm",
|
||||
/* maj */ UFM_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ufmopen,
|
||||
.d_close = ufmclose,
|
||||
.d_ioctl = ufmioctl,
|
||||
.d_name = "ufm",
|
||||
.d_maj = UFM_CDEV_MAJOR,
|
||||
#if (__FreeBSD_version < 500014)
|
||||
-1
|
||||
#endif
|
||||
|
@ -138,19 +138,14 @@ d_poll_t ugenpoll;
|
||||
#define UGEN_CDEV_MAJOR 114
|
||||
|
||||
Static struct cdevsw ugen_cdevsw = {
|
||||
/* open */ ugenopen,
|
||||
/* close */ ugenclose,
|
||||
/* read */ ugenread,
|
||||
/* write */ ugenwrite,
|
||||
/* ioctl */ ugenioctl,
|
||||
/* poll */ ugenpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ugen",
|
||||
/* maj */ UGEN_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ugenopen,
|
||||
.d_close = ugenclose,
|
||||
.d_read = ugenread,
|
||||
.d_write = ugenwrite,
|
||||
.d_ioctl = ugenioctl,
|
||||
.d_poll = ugenpoll,
|
||||
.d_name = "ugen",
|
||||
.d_maj = UGEN_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -149,19 +149,14 @@ d_poll_t uhidpoll;
|
||||
#define UHID_CDEV_MAJOR 122
|
||||
|
||||
Static struct cdevsw uhid_cdevsw = {
|
||||
/* open */ uhidopen,
|
||||
/* close */ uhidclose,
|
||||
/* read */ uhidread,
|
||||
/* write */ uhidwrite,
|
||||
/* ioctl */ uhidioctl,
|
||||
/* poll */ uhidpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "uhid",
|
||||
/* maj */ UHID_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = uhidopen,
|
||||
.d_close = uhidclose,
|
||||
.d_read = uhidread,
|
||||
.d_write = uhidwrite,
|
||||
.d_ioctl = uhidioctl,
|
||||
.d_poll = uhidpoll,
|
||||
.d_name = "uhid",
|
||||
.d_maj = UHID_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -147,19 +147,12 @@ Static d_ioctl_t ulptioctl;
|
||||
#define ULPT_CDEV_MAJOR 113
|
||||
|
||||
Static struct cdevsw ulpt_cdevsw = {
|
||||
/* open */ ulptopen,
|
||||
/* close */ ulptclose,
|
||||
/* read */ noread,
|
||||
/* write */ ulptwrite,
|
||||
/* ioctl */ ulptioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ulpt",
|
||||
/* maj */ ULPT_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ulptopen,
|
||||
.d_close = ulptclose,
|
||||
.d_write = ulptwrite,
|
||||
.d_ioctl = ulptioctl,
|
||||
.d_name = "ulpt",
|
||||
.d_maj = ULPT_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -149,19 +149,13 @@ Static d_poll_t ums_poll;
|
||||
#define UMS_CDEV_MAJOR 111
|
||||
|
||||
Static struct cdevsw ums_cdevsw = {
|
||||
/* open */ ums_open,
|
||||
/* close */ ums_close,
|
||||
/* read */ ums_read,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ums_ioctl,
|
||||
/* poll */ ums_poll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ums",
|
||||
/* maj */ UMS_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = ums_open,
|
||||
.d_close = ums_close,
|
||||
.d_read = ums_read,
|
||||
.d_ioctl = ums_ioctl,
|
||||
.d_poll = ums_poll,
|
||||
.d_name = "ums",
|
||||
.d_maj = UMS_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -116,19 +116,13 @@ d_ioctl_t urioioctl;
|
||||
#define URIO_CDEV_MAJOR 143
|
||||
|
||||
Static struct cdevsw urio_cdevsw = {
|
||||
/* open */ urioopen,
|
||||
/* close */ urioclose,
|
||||
/* read */ urioread,
|
||||
/* write */ uriowrite,
|
||||
/* ioctl */ urioioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "urio",
|
||||
/* maj */ URIO_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = urioopen,
|
||||
.d_close = urioclose,
|
||||
.d_read = urioread,
|
||||
.d_write = uriowrite,
|
||||
.d_ioctl = urioioctl,
|
||||
.d_name = "urio",
|
||||
.d_maj = URIO_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
-1
|
||||
#endif
|
||||
|
@ -136,19 +136,13 @@ d_ioctl_t usbioctl;
|
||||
d_poll_t usbpoll;
|
||||
|
||||
struct cdevsw usb_cdevsw = {
|
||||
/* open */ usbopen,
|
||||
/* close */ usbclose,
|
||||
/* read */ usbread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ usbioctl,
|
||||
/* poll */ usbpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "usb",
|
||||
/* maj */ USB_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = usbopen,
|
||||
.d_close = usbclose,
|
||||
.d_read = usbread,
|
||||
.d_ioctl = usbioctl,
|
||||
.d_poll = usbpoll,
|
||||
.d_name = "usb",
|
||||
.d_maj = USB_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -249,19 +249,13 @@ d_poll_t uscannerpoll;
|
||||
#define USCANNER_CDEV_MAJOR 156
|
||||
|
||||
Static struct cdevsw uscanner_cdevsw = {
|
||||
/* open */ uscanneropen,
|
||||
/* close */ uscannerclose,
|
||||
/* read */ uscannerread,
|
||||
/* write */ uscannerwrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ uscannerpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "uscanner",
|
||||
/* maj */ USCANNER_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = uscanneropen,
|
||||
.d_close = uscannerclose,
|
||||
.d_read = uscannerread,
|
||||
.d_write = uscannerwrite,
|
||||
.d_poll = uscannerpoll,
|
||||
.d_name = "uscanner",
|
||||
.d_maj = USCANNER_CDEV_MAJOR,
|
||||
#if __FreeBSD_version < 500014
|
||||
/* bmaj */ -1
|
||||
#endif
|
||||
|
@ -55,19 +55,15 @@ extern struct mc malloced[];
|
||||
|
||||
struct cdevsw vinum_cdevsw =
|
||||
{
|
||||
/* open */ vinumopen,
|
||||
/* close */ vinumclose,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ vinumioctl,
|
||||
/* poll */ seltrue,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ vinumstrategy,
|
||||
/* name */ "vinum",
|
||||
/* maj */ VINUM_CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK
|
||||
.d_open = vinumopen,
|
||||
.d_close = vinumclose,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = vinumioctl,
|
||||
.d_strategy = vinumstrategy,
|
||||
.d_name = "vinum",
|
||||
.d_maj = VINUM_CDEV_MAJOR,
|
||||
.d_flags = D_DISK
|
||||
};
|
||||
|
||||
/* Called by main() during pseudo-device attachment. */
|
||||
|
@ -150,20 +150,16 @@ static void zsttystop(struct tty *tp, int rw);
|
||||
static int zsttyparam(struct tty *tp, struct termios *t);
|
||||
|
||||
static struct cdevsw zstty_cdevsw = {
|
||||
/* open */ zsttyopen,
|
||||
/* close */ zsttyclose,
|
||||
/* read */ ttyread,
|
||||
/* write */ ttywrite,
|
||||
/* ioctl */ zsttyioctl,
|
||||
/* poll */ ttypoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "zstty",
|
||||
/* major */ MAJOR_AUTO,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_TTY | D_KQFILTER,
|
||||
/* kqfilter */ ttykqfilter,
|
||||
.d_open = zsttyopen,
|
||||
.d_close = zsttyclose,
|
||||
.d_read = ttyread,
|
||||
.d_write = ttywrite,
|
||||
.d_ioctl = zsttyioctl,
|
||||
.d_poll = ttypoll,
|
||||
.d_name = "zstty",
|
||||
.d_maj = MAJOR_AUTO,
|
||||
.d_flags = D_TTY | D_KQFILTER,
|
||||
.d_kqfilter = ttykqfilter,
|
||||
};
|
||||
|
||||
static struct zstty_softc *zstty_cons;
|
||||
|
@ -66,19 +66,14 @@
|
||||
#define VC_DEV_NO 93
|
||||
|
||||
static struct cdevsw codadevsw = {
|
||||
/* open */ vc_nb_open,
|
||||
/* close */ vc_nb_close,
|
||||
/* read */ vc_nb_read,
|
||||
/* write */ vc_nb_write,
|
||||
/* ioctl */ vc_nb_ioctl,
|
||||
/* poll */ vc_nb_poll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "Coda",
|
||||
/* maj */ VC_DEV_NO,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = vc_nb_open,
|
||||
.d_close = vc_nb_close,
|
||||
.d_read = vc_nb_read,
|
||||
.d_write = vc_nb_write,
|
||||
.d_ioctl = vc_nb_ioctl,
|
||||
.d_poll = vc_nb_poll,
|
||||
.d_name = "Coda",
|
||||
.d_maj = VC_DEV_NO,
|
||||
};
|
||||
|
||||
int vcdebug = 1;
|
||||
|
@ -115,19 +115,11 @@ static d_ioctl_t ccdctlioctl;
|
||||
#define CDEV_MAJOR 74
|
||||
|
||||
static struct cdevsw ccdctl_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ ccdctlioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "ccdctl",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_ioctl = ccdctlioctl,
|
||||
.d_name = "ccdctl",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static LIST_HEAD(, ccd_s) ccd_softc_list =
|
||||
|
@ -59,20 +59,15 @@ static d_strategy_t g_dev_strategy;
|
||||
static d_ioctl_t g_dev_ioctl;
|
||||
|
||||
static struct cdevsw g_dev_cdevsw = {
|
||||
/* open */ g_dev_open,
|
||||
/* close */ g_dev_close,
|
||||
/* read */ physread,
|
||||
/* write */ physwrite,
|
||||
/* ioctl */ g_dev_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ g_dev_strategy,
|
||||
/* name */ "g_dev",
|
||||
/* maj */ GEOM_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_DISK | D_TRACKCLOSE,
|
||||
/* kqfilter */ nokqfilter
|
||||
.d_open = g_dev_open,
|
||||
.d_close = g_dev_close,
|
||||
.d_read = physread,
|
||||
.d_write = physwrite,
|
||||
.d_ioctl = g_dev_ioctl,
|
||||
.d_strategy = g_dev_strategy,
|
||||
.d_name = "g_dev",
|
||||
.d_maj = GEOM_MAJOR,
|
||||
.d_flags = D_DISK | D_TRACKCLOSE,
|
||||
};
|
||||
|
||||
static g_taste_t g_dev_taste;
|
||||
|
@ -106,19 +106,11 @@ g_stat_delete(struct g_stat *gsp)
|
||||
static d_mmap_t g_stat_mmap;
|
||||
|
||||
static struct cdevsw geom_stats_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ noioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ g_stat_mmap,
|
||||
/* strtegy */ nostrategy,
|
||||
/* name */ "g_stats",
|
||||
/* maj */ GEOM_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_mmap = g_stat_mmap,
|
||||
.d_name = "g_stats",
|
||||
.d_maj = GEOM_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -64,19 +64,13 @@ static d_poll_t apmpoll;
|
||||
|
||||
#define CDEV_MAJOR 39
|
||||
static struct cdevsw apm_cdevsw = {
|
||||
/* open */ apmopen,
|
||||
/* close */ apmclose,
|
||||
/* read */ noread,
|
||||
/* write */ apmwrite,
|
||||
/* ioctl */ apmioctl,
|
||||
/* poll */ apmpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "apm",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = apmopen,
|
||||
.d_close = apmclose,
|
||||
.d_write = apmwrite,
|
||||
.d_ioctl = apmioctl,
|
||||
.d_poll = apmpoll,
|
||||
.d_name = "apm",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -90,19 +90,13 @@ static d_poll_t apmpoll;
|
||||
|
||||
#define CDEV_MAJOR 39
|
||||
static struct cdevsw apm_cdevsw = {
|
||||
/* open */ apmopen,
|
||||
/* close */ apmclose,
|
||||
/* read */ noread,
|
||||
/* write */ apmwrite,
|
||||
/* ioctl */ apmioctl,
|
||||
/* poll */ apmpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "apm",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = apmopen,
|
||||
.d_close = apmclose,
|
||||
.d_write = apmwrite,
|
||||
.d_ioctl = apmioctl,
|
||||
.d_poll = apmpoll,
|
||||
.d_name = "apm",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int apm_suspend_delay = 1;
|
||||
|
@ -90,19 +90,13 @@ static d_poll_t apmpoll;
|
||||
|
||||
#define CDEV_MAJOR 39
|
||||
static struct cdevsw apm_cdevsw = {
|
||||
/* open */ apmopen,
|
||||
/* close */ apmclose,
|
||||
/* read */ noread,
|
||||
/* write */ apmwrite,
|
||||
/* ioctl */ apmioctl,
|
||||
/* poll */ apmpoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "apm",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = apmopen,
|
||||
.d_close = apmclose,
|
||||
.d_write = apmwrite,
|
||||
.d_ioctl = apmioctl,
|
||||
.d_poll = apmpoll,
|
||||
.d_name = "apm",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static int apm_suspend_delay = 1;
|
||||
|
@ -54,20 +54,12 @@ static d_ioctl_t smapi_ioctl;
|
||||
#define CDEV_MAJOR 183
|
||||
|
||||
static struct cdevsw smapi_cdevsw = {
|
||||
/* open */ smapi_open,
|
||||
/* close */ smapi_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ smapi_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "smapi",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MEM,
|
||||
/* kqfilter */ NULL,
|
||||
.d_open = smapi_open,
|
||||
.d_close = smapi_close,
|
||||
.d_ioctl = smapi_ioctl,
|
||||
.d_name = "smapi",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MEM,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -171,19 +171,13 @@ static d_mmap_t elan_mmap;
|
||||
|
||||
#define CDEV_MAJOR 100 /* Share with xrpu */
|
||||
static struct cdevsw elan_cdevsw = {
|
||||
/* open */ nullopen,
|
||||
/* close */ nullclose,
|
||||
/* read */ noread,
|
||||
/* write */ elan_write,
|
||||
/* ioctl */ elan_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ elan_mmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "elan",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = nullopen,
|
||||
.d_close = nullclose,
|
||||
.d_write = elan_write,
|
||||
.d_ioctl = elan_ioctl,
|
||||
.d_mmap = elan_mmap,
|
||||
.d_name = "elan",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -78,19 +78,15 @@ static d_mmap_t memmmap;
|
||||
|
||||
#define CDEV_MAJOR 2
|
||||
static struct cdevsw mem_cdevsw = {
|
||||
/* open */ mmopen,
|
||||
/* close */ mmclose,
|
||||
/* read */ mmrw,
|
||||
/* write */ mmrw,
|
||||
/* ioctl */ mmioctl,
|
||||
/* poll */ (d_poll_t *)seltrue,
|
||||
/* mmap */ memmmap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "mem",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ D_MEM,
|
||||
.d_open = mmopen,
|
||||
.d_close = mmclose,
|
||||
.d_read = mmrw,
|
||||
.d_write = mmrw,
|
||||
.d_ioctl = mmioctl,
|
||||
.d_mmap = memmmap,
|
||||
.d_name = "mem",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
.d_flags = D_MEM,
|
||||
};
|
||||
|
||||
MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
|
||||
|
@ -71,19 +71,11 @@ SYSINIT(cpu, SI_SUB_DRIVERS, SI_ORDER_ANY, perfmon_init_dev, NULL);
|
||||
|
||||
#define CDEV_MAJOR 2 /* We're really a minor of mem.c */
|
||||
static struct cdevsw perfmon_cdevsw = {
|
||||
/* open */ perfmon_open,
|
||||
/* close */ perfmon_close,
|
||||
/* read */ noread,
|
||||
/* write */ nowrite,
|
||||
/* ioctl */ perfmon_ioctl,
|
||||
/* poll */ nopoll,
|
||||
/* mmap */ nommap,
|
||||
/* strategy */ nostrategy,
|
||||
/* name */ "perfmon",
|
||||
/* maj */ CDEV_MAJOR,
|
||||
/* dump */ nodump,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
.d_open = perfmon_open,
|
||||
.d_close = perfmon_close,
|
||||
.d_ioctl = perfmon_ioctl,
|
||||
.d_name = "perfmon",
|
||||
.d_maj = CDEV_MAJOR,
|
||||
};
|
||||
|
||||
/*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user