From 869093b15d791e90c619609d2c5cb564fd945235 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Fri, 24 Oct 2003 15:44:10 +0000 Subject: Add dumb console driver and related bits. dcons(4): very simple console and gdb port driver dcons_crom(4): FireWire attachment dconschat(8): User interface to dcons Tested with: i386, i386-PAE, and sparc64. --- sys/dev/dcons/dcons.c | 648 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/dcons/dcons.h | 97 +++++++ sys/dev/dcons/dcons_crom.c | 224 ++++++++++++++++ 3 files changed, 969 insertions(+) create mode 100644 sys/dev/dcons/dcons.c create mode 100644 sys/dev/dcons/dcons.h create mode 100644 sys/dev/dcons/dcons_crom.c (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c new file mode 100644 index 000000000000..4cea5ca2a064 --- /dev/null +++ b/sys/dev/dcons/dcons.c @@ -0,0 +1,648 @@ +/* + * Copyright (C) 2003 + * Hidetoshi Shimokawa. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Hidetoshi Shimokawa. + * + * 4. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $ + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +#include "opt_ddb.h" +#include "opt_comconsole.h" +#include "opt_dcons.h" + +#ifndef DCONS_POLL_HZ +#define DCONS_POLL_HZ 100 +#endif + +#ifndef DCONS_BUF_SIZE +#define DCONS_BUF_SIZE (16*1024) +#endif + +#ifndef DCONS_FORCE_CONSOLE +#define DCONS_FORCE_CONSOLE 0 /* mostly for FreeBSD-4 */ +#endif + +#ifndef DCONS_FORCE_GDB +#define DCONS_FORCE_GDB 1 +#endif + +#if __FreeBSD_version >= 500101 +#define CONS_NODEV 1 /* for latest current */ +static struct consdev gdbconsdev; +#endif + +#define CDEV_MAJOR 184 + +static d_open_t dcons_open; +static d_close_t dcons_close; +static d_ioctl_t dcons_ioctl; + +static struct cdevsw dcons_cdevsw = { +#if __FreeBSD_version >= 500104 + .d_open = dcons_open, + .d_close = dcons_close, + .d_read = ttyread, + .d_write = ttywrite, + .d_ioctl = dcons_ioctl, + .d_poll = ttypoll, + .d_name = "dcons", + .d_maj = CDEV_MAJOR, +#else + /* open */ dcons_open, + /* close */ dcons_close, + /* read */ ttyread, + /* write */ ttywrite, + /* ioctl */ dcons_ioctl, + /* poll */ ttypoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "dcons", + /* major */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, +#endif +}; + +#ifndef KLD_MODULE +static char bssbuf[DCONS_BUF_SIZE]; /* buf in bss */ +#endif +struct dcons_buf *dcons_buf; +size_t dcons_bufsize; +bus_dma_tag_t dcons_dma_tag = NULL; +bus_dmamap_t dcons_dma_map = NULL; + +static int poll_hz = DCONS_POLL_HZ; +SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); +SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, + "dcons polling rate"); + +static int drv_init = 0; +static struct callout dcons_callout; + +/* per device data */ +static struct dcons_softc { + dev_t dev; + struct dcons_ch o, i; + int brk_state; +#define DC_GDB 1 + int flags; +} sc[DCONS_NPORT]; +static void dcons_tty_start(struct tty *); +static int dcons_tty_param(struct tty *, struct termios *); +static void dcons_timeout(void *); +static int dcons_drv_init(int); +static int dcons_getc(struct dcons_softc *); +static int dcons_checkc(struct dcons_softc *); +static void dcons_putc(struct dcons_softc *, int); + +static cn_probe_t dcons_cnprobe; +static cn_init_t dcons_cninit; +static cn_getc_t dcons_cngetc; +static cn_checkc_t dcons_cncheckc; +static cn_putc_t dcons_cnputc; + +CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc, + dcons_cncheckc, dcons_cnputc, NULL); + +#if __FreeBSD_version < 500000 +#define THREAD proc +#else +#define THREAD thread +#endif + +static int +dcons_open(dev_t dev, int flag, int mode, struct THREAD *td) +{ + struct tty *tp; + int unit, error, s; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty = ttymalloc(dev->si_tty); + tp->t_oproc = dcons_tty_start; + tp->t_param = dcons_tty_param; + tp->t_stop = nottystop; + tp->t_dev = dev; + + error = 0; + + s = spltty(); + if ((tp->t_state & TS_ISOPEN) == 0) { + tp->t_state |= TS_CARR_ON; + ttychars(tp); + tp->t_iflag = TTYDEF_IFLAG; + tp->t_oflag = TTYDEF_OFLAG; + tp->t_cflag = TTYDEF_CFLAG|CLOCAL; + tp->t_lflag = TTYDEF_LFLAG; + tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttsetwater(tp); + } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { + splx(s); + return (EBUSY); + } + splx(s); + + error = (*linesw[tp->t_line].l_open)(dev, tp); + + return (error); +} + +static int +dcons_close(dev_t dev, int flag, int mode, struct THREAD *td) +{ + int unit; + struct tty *tp; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty; + if (tp->t_state & TS_ISOPEN) { + (*linesw[tp->t_line].l_close)(tp, flag); + ttyclose(tp); + } + + return (0); +} + +static int +dcons_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct THREAD *td) +{ + int unit; + struct tty *tp; + int error; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty; + error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); + if (error != ENOIOCTL) + return (error); + + error = ttioctl(tp, cmd, data, flag); + if (error != ENOIOCTL) + return (error); + + return (ENOTTY); +} + +static int +dcons_tty_param(struct tty *tp, struct termios *t) +{ + tp->t_ispeed = t->c_ispeed; + tp->t_ospeed = t->c_ospeed; + tp->t_cflag = t->c_cflag; + return 0; +} + +static void +dcons_tty_start(struct tty *tp) +{ + struct dcons_softc *dc; + int s; + + dc = (struct dcons_softc *)tp->t_dev->si_drv1; + s = spltty(); + if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { + ttwwakeup(tp); + return; + } + + tp->t_state |= TS_BUSY; + while (tp->t_outq.c_cc != 0) + dcons_putc(dc, getc(&tp->t_outq)); + tp->t_state &= ~TS_BUSY; + + ttwwakeup(tp); + splx(s); +} + +static void +dcons_timeout(void *v) +{ + struct tty *tp; + struct dcons_softc *dc; + int i, c, polltime; + + for (i = 0; i < DCONS_NPORT; i ++) { + dc = &sc[i]; + tp = dc->dev->si_tty; + while ((c = dcons_checkc(dc)) != -1) + if (tp->t_state & TS_ISOPEN) + (*linesw[tp->t_line].l_rint)(c, tp); + } + polltime = hz / poll_hz; + if (polltime < 1) + polltime = 1; + callout_reset(&dcons_callout, polltime, dcons_timeout, tp); +} + +static void +dcons_cnprobe(struct consdev *cp) +{ +#if __FreeBSD_version >= 501109 + sprintf(cp->cn_name, "dcons"); +#else + cp->cn_dev = makedev(CDEV_MAJOR, DCONS_CON); +#endif +#if DCONS_FORCE_CONSOLE + cp->cn_pri = CN_REMOTE; +#else + cp->cn_pri = CN_NORMAL; +#endif +} + +static void +dcons_cninit(struct consdev *cp) +{ + dcons_drv_init(0); +#if CONS_NODEV + cp->cn_arg +#else + cp->cn_dev->si_drv1 +#endif + = (void *)&sc[DCONS_CON]; /* share port0 with unit0 */ +} + +#if CONS_NODEV +static int +dcons_cngetc(struct consdev *cp) +{ + return(dcons_getc((struct dcons_softc *)cp->cn_arg)); +} +static int +dcons_cncheckc(struct consdev *cp) +{ + return(dcons_checkc((struct dcons_softc *)cp->cn_arg)); +} +static void +dcons_cnputc(struct consdev *cp, int c) +{ + dcons_putc((struct dcons_softc *)cp->cn_arg, c); +} +#else +static int +dcons_cngetc(dev_t dev) +{ + return(dcons_getc((struct dcons_softc *)dev->si_drv1)); +} +static int +dcons_cncheckc(dev_t dev) +{ + return(dcons_checkc((struct dcons_softc *)dev->si_drv1)); +} +static void +dcons_cnputc(dev_t dev, int c) +{ + dcons_putc((struct dcons_softc *)dev->si_drv1, c); +} +#endif + +static int +dcons_getc(struct dcons_softc *dc) +{ + int c; + + while ((c = dcons_checkc(dc)) == -1); + + return (c & 0xff); +} + +static int +dcons_checkc(struct dcons_softc *dc) +{ + unsigned char c; + u_int32_t ptr, pos, gen, next_gen; + struct dcons_ch *ch; + + ch = &dc->i; + + if (dcons_dma_tag != NULL) + bus_dmamap_sync(dcons_dma_tag, dcons_dma_map, + BUS_DMASYNC_POSTREAD); + ptr = ntohl(*ch->ptr); + gen = ptr >> DCONS_GEN_SHIFT; + pos = ptr & DCONS_POS_MASK; + if (gen == ch->gen && pos == ch->pos) + return (-1); + + next_gen = DCONS_NEXT_GEN(ch->gen); + /* XXX sanity check */ + if ((gen != ch->gen && gen != next_gen) + || (gen == ch->gen && pos < ch->pos)) { + /* generation skipped !! */ + /* XXX discard */ + ch->gen = gen; + ch->pos = pos; + return (-1); + } + + c = ch->buf[ch->pos]; + ch->pos ++; + if (ch->pos >= ch->size) { + ch->gen = next_gen; + ch->pos = 0; + } + +#if DDB && ALT_BREAK_TO_DEBUGGER + switch (dc->brk_state) { + case STATE1: + if (c == KEY_TILDE) + dc->brk_state = STATE2; + else + dc->brk_state = STATE0; + break; + case STATE2: + dc->brk_state = STATE0; + if (c == KEY_CTRLB) { +#if DCONS_FORCE_GDB + if (dc->flags & DC_GDB) + boothowto |= RB_GDB; +#endif + breakpoint(); + } + } + if (c == KEY_CR) + dc->brk_state = STATE1; +#endif + return (c); +} + +static void +dcons_putc(struct dcons_softc *dc, int c) +{ + struct dcons_ch *ch; + + ch = &dc->o; + + ch->buf[ch->pos] = c; + ch->pos ++; + if (ch->pos >= ch->size) { + ch->gen = DCONS_NEXT_GEN(ch->gen); + ch->pos = 0; + } + *ch->ptr = DCONS_MAKE_PTR(ch); + if (dcons_dma_tag != NULL) + bus_dmamap_sync(dcons_dma_tag, dcons_dma_map, + BUS_DMASYNC_PREWRITE); +} + +static int +dcons_init_port(int port, int offset, int size) +{ + int osize; + struct dcons_softc *dc; + + dc = &sc[port]; + + osize = size * 3 / 4; + + dc->o.size = osize; + dc->i.size = size - osize; + dc->o.buf = (char *)dcons_buf + offset; + dc->i.buf = dc->o.buf + osize; + dc->o.gen = dc->i.gen = 0; + dc->o.pos = dc->i.pos = 0; + dc->o.ptr = &dcons_buf->optr[port]; + dc->i.ptr = &dcons_buf->iptr[port]; + dc->brk_state = STATE0; + dcons_buf->osize[port] = htonl(osize); + dcons_buf->isize[port] = htonl(size - osize); + dcons_buf->ooffset[port] = htonl(offset); + dcons_buf->ioffset[port] = htonl(offset + osize); + dcons_buf->optr[port] = DCONS_MAKE_PTR(&dc->o); + dcons_buf->iptr[port] = DCONS_MAKE_PTR(&dc->i); + + return(0); +} + +static int +dcons_drv_init(int stage) +{ + int size, size0, offset; + + if (drv_init) + return(drv_init); + + drv_init = -1; + + dcons_bufsize = DCONS_BUF_SIZE; + +#ifndef KLD_MODULE + if (stage == 0) /* XXX or cold */ + /* + * DCONS_FORCE_CONSOLE == 1 and statically linked. + * called from cninit(). can't use contigmalloc yet . + */ + dcons_buf = (struct dcons_buf *) bssbuf; + else +#endif + /* + * DCONS_FORCE_CONSOLE == 0 or kernel module case. + * if the module is loaded after boot, + * dcons_buf could be non-continuous. + */ + dcons_buf = (struct dcons_buf *) contigmalloc(dcons_bufsize, + M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); + + offset = DCONS_HEADER_SIZE; + size = (dcons_bufsize - offset); + size0 = size * 3 / 4; + + dcons_init_port(0, offset, size0); + offset += size0; + dcons_init_port(1, offset, size - size0); + dcons_buf->version = htonl(DCONS_VERSION); + dcons_buf->magic = ntohl(DCONS_MAGIC); + +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; +#if __FreeBSD_version >= 501109 + sprintf(gdbconsdev.cn_name, "dgdb"); +#endif + gdb_arg = &gdbconsdev; +#else + gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); +#endif + gdb_getc = dcons_cngetc; + gdb_putc = dcons_cnputc; +#endif + drv_init = 1; + + return 0; +} + + +static int +dcons_attach_port(int port, char *name, int flags) +{ + struct dcons_softc *dc; + struct tty *tp; + + dc = &sc[port]; + dc->flags = flags; + dc->dev = make_dev(&dcons_cdevsw, port, + UID_ROOT, GID_WHEEL, 0600, name); + tp = ttymalloc(NULL); + + dc->dev->si_drv1 = (void *)dc; + dc->dev->si_tty = tp; + + tp->t_oproc = dcons_tty_start; + tp->t_param = dcons_tty_param; + tp->t_stop = nottystop; + tp->t_dev = dc->dev; + + return(0); +} + +static int +dcons_attach(void) +{ + int polltime; + + dcons_attach_port(DCONS_CON, "dcons", 0); + dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); +#if __FreeBSD_version < 500000 + callout_init(&dcons_callout); +#else + callout_init(&dcons_callout, 0); +#endif + polltime = hz / poll_hz; + if (polltime < 1) + polltime = 1; + callout_reset(&dcons_callout, polltime, dcons_timeout, NULL); + return(0); +} + +static int +dcons_detach(int port) +{ + struct tty *tp; + struct dcons_softc *dc; + + dc = &sc[port]; + + tp = dc->dev->si_tty; + + if (tp->t_state & TS_ISOPEN) { + printf("dcons: still opened\n"); + (*linesw[tp->t_line].l_close)(tp, 0); + tp->t_gen++; + ttyclose(tp); + ttwakeup(tp); + ttwwakeup(tp); + } + /* XXX + * must wait until all device are closed. + */ + tsleep((void *)dc, PWAIT, "dcodtc", hz/4); + destroy_dev(dc->dev); + + return(0); +} + + +/* cnXXX works only for FreeBSD-5 */ +static int +dcons_modevent(module_t mode, int type, void *data) +{ + int err = 0, ret; + + switch (type) { + case MOD_LOAD: + ret = dcons_drv_init(1); + dcons_attach(); +#if __FreeBSD_version >= 500000 + if (ret == 0) { + dcons_cnprobe(&dcons_consdev); + dcons_cninit(&dcons_consdev); + cnadd(&dcons_consdev); + } +#endif + break; + case MOD_UNLOAD: + printf("dcons: unload\n"); + callout_stop(&dcons_callout); +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdb_arg = NULL; +#else + gdbdev = NODEV; +#endif +#endif +#if __FreeBSD_version >= 500000 + cnremove(&dcons_consdev); +#endif + dcons_detach(DCONS_CON); + dcons_detach(DCONS_GDB); + dcons_buf->magic = 0; + + contigfree(dcons_buf, DCONS_BUF_SIZE, M_DEVBUF); + + break; + case MOD_SHUTDOWN: + break; + } + return(err); +} + +DEV_MODULE(dcons, dcons_modevent, NULL); +MODULE_VERSION(dcons, DCONS_VERSION); diff --git a/sys/dev/dcons/dcons.h b/sys/dev/dcons/dcons.h new file mode 100644 index 000000000000..73265bc816f0 --- /dev/null +++ b/sys/dev/dcons/dcons.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2002 + * Hidetoshi Shimokawa. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Hidetoshi Shimokawa. + * + * 4. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: dcons.h,v 1.15 2003/10/23 15:05:31 simokawa Exp $ + * $FreeBSD$ + */ + +#ifdef _KERNEL +#define V volatile +#else +#define V +#endif + +#define DCONS_NPORT 2 +#define DCONS_CON 0 +#define DCONS_GDB 1 + +struct dcons_buf { +#define DCONS_VERSION 2 + V u_int32_t version; + V u_int32_t ooffset[DCONS_NPORT]; + V u_int32_t ioffset[DCONS_NPORT]; + V u_int32_t osize[DCONS_NPORT]; + V u_int32_t isize[DCONS_NPORT]; +#define DCONS_MAGIC 0x64636f6e /* "dcon" */ + V u_int32_t magic; +#define DCONS_GEN_SHIFT (24) +#define DCONS_GEN_MASK (0xff) +#define DCONS_POS_MASK ((1<< DCONS_GEN_SHIFT) - 1) + V u_int32_t optr[DCONS_NPORT]; + V u_int32_t iptr[DCONS_NPORT]; + V char buf[0]; +}; + +#define DCONS_CSR_VAL_VER 0x64636f /* "dco" */ +#define DCONS_CSR_KEY_HI 0x3a +#define DCONS_CSR_KEY_LO 0x3b + +#define DCONS_HEADER_SIZE sizeof(struct dcons_buf) +#define DCONS_MAKE_PTR(x) htonl(((x)->gen << DCONS_GEN_SHIFT) | (x)->pos) +#define DCONS_NEXT_GEN(x) (((x) + 1) & DCONS_GEN_MASK) + +struct dcons_ch { + u_int32_t size; + u_int32_t gen; + u_int32_t pos; +#ifdef _KERNEL + V u_int32_t *ptr; + V char *buf; +#else + off_t buf; +#endif +}; + +#define KEY_CTRLB 2 /* ^B */ +#define KEY_CR 13 /* CR '\r' */ +#define KEY_TILDE 126 /* ~ */ +#define STATE0 0 +#define STATE1 1 +#define STATE2 2 + +#ifdef _KERNEL +extern struct dcons_buf *dcons_buf; +extern size_t dcons_bufsize; +extern bus_dma_tag_t dcons_dma_tag; +extern bus_dmamap_t dcons_dma_map; +#endif diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c new file mode 100644 index 000000000000..d7cd502a51dd --- /dev/null +++ b/sys/dev/dcons/dcons_crom.c @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2003 + * Hidetoshi Shimokawa. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Hidetoshi Shimokawa. + * + * 4. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: dcons_crom.c,v 1.8 2003/10/23 15:47:21 simokawa Exp $ + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +static bus_addr_t dcons_paddr; + +#ifndef CSRVAL_VENDOR_PRIVATE +#define NEED_NEW_DRIVER +#endif + +#define ADDR_HI(x) (((x) >> 24) & 0xffffff) +#define ADDR_LO(x) ((x) & 0xffffff) + +struct dcons_crom_softc { + struct firewire_dev_comm fd; + struct crom_chunk unit; + struct crom_chunk spec; + struct crom_chunk ver; + bus_dma_tag_t dma_tag; + bus_dmamap_t dma_map; + bus_addr_t bus_addr; +}; + +static void +dcons_crom_identify(driver_t *driver, device_t parent) +{ + BUS_ADD_CHILD(parent, 0, "dcons_crom", device_get_unit(parent)); +} + +static int +dcons_crom_probe(device_t dev) +{ + device_t pa; + + pa = device_get_parent(dev); + if(device_get_unit(dev) != device_get_unit(pa)){ + return(ENXIO); + } + + device_set_desc(dev, "dcons configuration ROM"); + return (0); +} + +#ifndef NEED_NEW_DRIVER +static void +dcons_crom_post_busreset(void *arg) +{ + struct dcons_crom_softc *sc; + struct crom_src *src; + struct crom_chunk *root; + + sc = (struct dcons_crom_softc *) arg; + src = sc->fd.fc->crom_src; + root = sc->fd.fc->crom_root; + + bzero(&sc->unit, sizeof(struct crom_chunk)); + + crom_add_chunk(src, root, &sc->unit, CROM_UDIR); + crom_add_entry(&sc->unit, CSRKEY_SPEC, CSRVAL_VENDOR_PRIVATE); + crom_add_simple_text(src, &sc->unit, &sc->spec, "FreeBSD"); + crom_add_entry(&sc->unit, CSRKEY_VER, DCONS_CSR_VAL_VER); + crom_add_simple_text(src, &sc->unit, &sc->ver, "dcons"); + crom_add_entry(&sc->unit, DCONS_CSR_KEY_HI, ADDR_HI(dcons_paddr)); + crom_add_entry(&sc->unit, DCONS_CSR_KEY_LO, ADDR_LO(dcons_paddr)); +} +#endif + +static void +dmamap_cb(void *arg, bus_dma_segment_t *segments, int seg, int error) +{ + bus_addr_t *ptr; + + if (error) + printf("dcons_dmamap_cb: error=%d\n", error); + + ptr = (bus_addr_t *) arg; + *ptr = segments[0].ds_addr; +} + +static int +dcons_crom_attach(device_t dev) +{ +#ifdef NEED_NEW_DRIVER + printf("dcons_crom: you need newer firewire driver\n"); + return (-1); +#else + struct dcons_crom_softc *sc; + + sc = (struct dcons_crom_softc *) device_get_softc(dev); + sc->fd.fc = device_get_ivars(dev); + sc->fd.dev = dev; + sc->fd.post_explore = NULL; + sc->fd.post_busreset = (void *) dcons_crom_post_busreset; + + /* map dcons buffer */ + bus_dma_tag_create( + /*parent*/ sc->fd.fc->dmat, + /*alignment*/ sizeof(u_int32_t), + /*boundary*/ 0, + /*lowaddr*/ BUS_SPACE_MAXADDR, + /*highaddr*/ BUS_SPACE_MAXADDR, + /*filter*/NULL, /*filterarg*/NULL, + /*maxsize*/ dcons_bufsize, + /*nsegments*/ 1, + /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, + /*flags*/ BUS_DMA_ALLOCNOW, +#if __FreeBSD_version >= 501102 + /*lockfunc*/busdma_lock_mutex, + /*lockarg*/&Giant, +#endif + &sc->dma_tag); + bus_dmamap_create(sc->dma_tag, 0, &sc->dma_map); + bus_dmamap_load(sc->dma_tag, sc->dma_map, + (void *)dcons_buf, dcons_bufsize, + dmamap_cb, &sc->bus_addr, 0); + bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE); + device_printf(sc->fd.dev, +#if __FreeBSD_version < 500000 + "bus_addr 0x%x\n", sc->bus_addr); +#else + "bus_addr 0x%jx\n", (uintmax_t)sc->bus_addr); +#endif + if (dcons_paddr != 0) { + /* XXX */ + device_printf(sc->fd.dev, "dcons_paddr is already set\n"); + return (0); + } + dcons_dma_tag = sc->dma_tag; + dcons_dma_map = sc->dma_map; + dcons_paddr = sc->bus_addr; + return (0); +#endif +} + +static int +dcons_crom_detach(device_t dev) +{ + struct dcons_crom_softc *sc; + + sc = (struct dcons_crom_softc *) device_get_softc(dev); + sc->fd.post_busreset = NULL; + + /* XXX */ + if (dcons_dma_tag == sc->dma_tag) + dcons_dma_tag = NULL; + + bus_dmamap_unload(sc->dma_tag, sc->dma_map); + bus_dmamap_destroy(sc->dma_tag, sc->dma_map); + bus_dma_tag_destroy(sc->dma_tag); + + return 0; +} + +static devclass_t dcons_crom_devclass; + +static device_method_t dcons_crom_methods[] = { + /* device interface */ + DEVMETHOD(device_identify, dcons_crom_identify), + DEVMETHOD(device_probe, dcons_crom_probe), + DEVMETHOD(device_attach, dcons_crom_attach), + DEVMETHOD(device_detach, dcons_crom_detach), + { 0, 0 } +}; + +static driver_t dcons_crom_driver = { + "dcons_crom", + dcons_crom_methods, + sizeof(struct dcons_crom_softc), +}; + +DRIVER_MODULE(dcons_crom, firewire, dcons_crom_driver, + dcons_crom_devclass, 0, 0); +MODULE_VERSION(dcons_crom, 1); +MODULE_DEPEND(dcons_crom, dcons, + DCONS_VERSION, DCONS_VERSION, DCONS_VERSION); +MODULE_DEPEND(dcons_crom, firewire, 1, 1, 1); -- cgit v1.3 From ddce43e1cf10a06aefc01c1d56ce7e2269c1c8f2 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Sat, 8 Nov 2003 16:26:22 +0000 Subject: Move post dmamap_load processes into the callback function. --- sys/dev/dcons/dcons_crom.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index d7cd502a51dd..917111d9aca8 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -116,13 +116,29 @@ dcons_crom_post_busreset(void *arg) static void dmamap_cb(void *arg, bus_dma_segment_t *segments, int seg, int error) { - bus_addr_t *ptr; + struct dcons_crom_softc *sc; if (error) printf("dcons_dmamap_cb: error=%d\n", error); - ptr = (bus_addr_t *) arg; - *ptr = segments[0].ds_addr; + sc = (struct dcons_crom_softc *)arg; + sc->bus_addr = segments[0].ds_addr; + + bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE); + device_printf(sc->fd.dev, +#if __FreeBSD_version < 500000 + "bus_addr 0x%x\n", sc->bus_addr); +#else + "bus_addr 0x%jx\n", (uintmax_t)sc->bus_addr); +#endif + if (dcons_paddr != 0) { + /* XXX */ + device_printf(sc->fd.dev, "dcons_paddr is already set\n"); + return; + } + dcons_dma_tag = sc->dma_tag; + dcons_dma_map = sc->dma_map; + dcons_paddr = sc->bus_addr; } static int @@ -160,22 +176,7 @@ dcons_crom_attach(device_t dev) bus_dmamap_create(sc->dma_tag, 0, &sc->dma_map); bus_dmamap_load(sc->dma_tag, sc->dma_map, (void *)dcons_buf, dcons_bufsize, - dmamap_cb, &sc->bus_addr, 0); - bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE); - device_printf(sc->fd.dev, -#if __FreeBSD_version < 500000 - "bus_addr 0x%x\n", sc->bus_addr); -#else - "bus_addr 0x%jx\n", (uintmax_t)sc->bus_addr); -#endif - if (dcons_paddr != 0) { - /* XXX */ - device_printf(sc->fd.dev, "dcons_paddr is already set\n"); - return (0); - } - dcons_dma_tag = sc->dma_tag; - dcons_dma_map = sc->dma_map; - dcons_paddr = sc->bus_addr; + dmamap_cb, sc, 0); return (0); #endif } -- cgit v1.3 From 19b3bba3e5e734773a56c7a0962510dfe16a64d5 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Mon, 16 Feb 2004 07:25:46 +0000 Subject: - Clean up global data. - Force dcons to be the high-level console after dcons_crom has been attached. - Add a tunable to be the high-level console. --- sys/dev/dcons/dcons.c | 59 ++++++++++++++++++++++++---------------------- sys/dev/dcons/dcons.h | 12 ++++++---- sys/dev/dcons/dcons_crom.c | 25 +++++++++++++++----- 3 files changed, 58 insertions(+), 38 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 4cea5ca2a064..6fd284486e37 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -117,18 +117,19 @@ static struct cdevsw dcons_cdevsw = { #ifndef KLD_MODULE static char bssbuf[DCONS_BUF_SIZE]; /* buf in bss */ #endif -struct dcons_buf *dcons_buf; -size_t dcons_bufsize; -bus_dma_tag_t dcons_dma_tag = NULL; -bus_dmamap_t dcons_dma_map = NULL; +/* global data */ +static struct dcons_global dg; +struct dcons_global *dcons_conf; static int poll_hz = DCONS_POLL_HZ; + SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, "dcons polling rate"); static int drv_init = 0; static struct callout dcons_callout; +struct dcons_buf *dcons_buf; /* for local dconschat */ /* per device data */ static struct dcons_softc { @@ -373,9 +374,8 @@ dcons_checkc(struct dcons_softc *dc) ch = &dc->i; - if (dcons_dma_tag != NULL) - bus_dmamap_sync(dcons_dma_tag, dcons_dma_map, - BUS_DMASYNC_POSTREAD); + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD); ptr = ntohl(*ch->ptr); gen = ptr >> DCONS_GEN_SHIFT; pos = ptr & DCONS_POS_MASK; @@ -438,9 +438,8 @@ dcons_putc(struct dcons_softc *dc, int c) ch->pos = 0; } *ch->ptr = DCONS_MAKE_PTR(ch); - if (dcons_dma_tag != NULL) - bus_dmamap_sync(dcons_dma_tag, dcons_dma_map, - BUS_DMASYNC_PREWRITE); + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_PREWRITE); } static int @@ -455,19 +454,19 @@ dcons_init_port(int port, int offset, int size) dc->o.size = osize; dc->i.size = size - osize; - dc->o.buf = (char *)dcons_buf + offset; + dc->o.buf = (char *)dg.buf + offset; dc->i.buf = dc->o.buf + osize; dc->o.gen = dc->i.gen = 0; dc->o.pos = dc->i.pos = 0; - dc->o.ptr = &dcons_buf->optr[port]; - dc->i.ptr = &dcons_buf->iptr[port]; + dc->o.ptr = &dg.buf->optr[port]; + dc->i.ptr = &dg.buf->iptr[port]; dc->brk_state = STATE0; - dcons_buf->osize[port] = htonl(osize); - dcons_buf->isize[port] = htonl(size - osize); - dcons_buf->ooffset[port] = htonl(offset); - dcons_buf->ioffset[port] = htonl(offset + osize); - dcons_buf->optr[port] = DCONS_MAKE_PTR(&dc->o); - dcons_buf->iptr[port] = DCONS_MAKE_PTR(&dc->i); + dg.buf->osize[port] = htonl(osize); + dg.buf->isize[port] = htonl(size - osize); + dg.buf->ooffset[port] = htonl(offset); + dg.buf->ioffset[port] = htonl(offset + osize); + dg.buf->optr[port] = DCONS_MAKE_PTR(&dc->o); + dg.buf->iptr[port] = DCONS_MAKE_PTR(&dc->i); return(0); } @@ -482,7 +481,10 @@ dcons_drv_init(int stage) drv_init = -1; - dcons_bufsize = DCONS_BUF_SIZE; + bzero(&dg, sizeof(dg)); + dcons_conf = &dg; + dg.cdev = &dcons_consdev; + dg.size = DCONS_BUF_SIZE; #ifndef KLD_MODULE if (stage == 0) /* XXX or cold */ @@ -490,26 +492,27 @@ dcons_drv_init(int stage) * DCONS_FORCE_CONSOLE == 1 and statically linked. * called from cninit(). can't use contigmalloc yet . */ - dcons_buf = (struct dcons_buf *) bssbuf; + dg.buf = (struct dcons_buf *) bssbuf; else #endif /* * DCONS_FORCE_CONSOLE == 0 or kernel module case. * if the module is loaded after boot, - * dcons_buf could be non-continuous. + * bssbuf could be non-continuous. */ - dcons_buf = (struct dcons_buf *) contigmalloc(dcons_bufsize, + dg.buf = (struct dcons_buf *) contigmalloc(dg.size, M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); + dcons_buf = dg.buf; offset = DCONS_HEADER_SIZE; - size = (dcons_bufsize - offset); + size = (dg.size - offset); size0 = size * 3 / 4; dcons_init_port(0, offset, size0); offset += size0; dcons_init_port(1, offset, size - size0); - dcons_buf->version = htonl(DCONS_VERSION); - dcons_buf->magic = ntohl(DCONS_MAGIC); + dg.buf->version = htonl(DCONS_VERSION); + dg.buf->magic = ntohl(DCONS_MAGIC); #if DDB && DCONS_FORCE_GDB #if CONS_NODEV @@ -633,9 +636,9 @@ dcons_modevent(module_t mode, int type, void *data) #endif dcons_detach(DCONS_CON); dcons_detach(DCONS_GDB); - dcons_buf->magic = 0; + dg.buf->magic = 0; - contigfree(dcons_buf, DCONS_BUF_SIZE, M_DEVBUF); + contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); break; case MOD_SHUTDOWN: diff --git a/sys/dev/dcons/dcons.h b/sys/dev/dcons/dcons.h index 73265bc816f0..6c25ee13a625 100644 --- a/sys/dev/dcons/dcons.h +++ b/sys/dev/dcons/dcons.h @@ -90,8 +90,12 @@ struct dcons_ch { #define STATE2 2 #ifdef _KERNEL -extern struct dcons_buf *dcons_buf; -extern size_t dcons_bufsize; -extern bus_dma_tag_t dcons_dma_tag; -extern bus_dmamap_t dcons_dma_map; +struct dcons_global { + struct consdev *cdev; + struct dcons_buf *buf; + size_t size; + bus_dma_tag_t dma_tag; + bus_dmamap_t dma_map; +}; +extern struct dcons_global *dcons_conf; #endif diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index 917111d9aca8..3d79ad588554 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -50,8 +50,15 @@ #include #include +#include + static bus_addr_t dcons_paddr; +#if __FreeBSD_version >= 500000 +static int force_console = 1; +TUNABLE_INT("hw.firewire.dcons_crom.force_console", &force_console); +#endif + #ifndef CSRVAL_VENDOR_PRIVATE #define NEED_NEW_DRIVER #endif @@ -136,9 +143,15 @@ dmamap_cb(void *arg, bus_dma_segment_t *segments, int seg, int error) device_printf(sc->fd.dev, "dcons_paddr is already set\n"); return; } - dcons_dma_tag = sc->dma_tag; - dcons_dma_map = sc->dma_map; + dcons_conf->dma_tag = sc->dma_tag; + dcons_conf->dma_map = sc->dma_map; dcons_paddr = sc->bus_addr; + +#if __FreeBSD_version >= 500000 + /* Force to be the high-level console */ + if (force_console) + cnselect(dcons_conf->cdev); +#endif } static int @@ -164,7 +177,7 @@ dcons_crom_attach(device_t dev) /*lowaddr*/ BUS_SPACE_MAXADDR, /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/ dcons_bufsize, + /*maxsize*/ dcons_conf->size, /*nsegments*/ 1, /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, /*flags*/ BUS_DMA_ALLOCNOW, @@ -175,7 +188,7 @@ dcons_crom_attach(device_t dev) &sc->dma_tag); bus_dmamap_create(sc->dma_tag, 0, &sc->dma_map); bus_dmamap_load(sc->dma_tag, sc->dma_map, - (void *)dcons_buf, dcons_bufsize, + (void *)dcons_conf->buf, dcons_conf->size, dmamap_cb, sc, 0); return (0); #endif @@ -190,8 +203,8 @@ dcons_crom_detach(device_t dev) sc->fd.post_busreset = NULL; /* XXX */ - if (dcons_dma_tag == sc->dma_tag) - dcons_dma_tag = NULL; + if (dcons_conf->dma_tag == sc->dma_tag) + dcons_conf->dma_tag = NULL; bus_dmamap_unload(sc->dma_tag, sc->dma_map); bus_dmamap_destroy(sc->dma_tag, sc->dma_map); -- cgit v1.3 From c9c7976f7ffdd0ed81e12d8930651a9a858defa1 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 21 Feb 2004 19:42:58 +0000 Subject: Device megapatch 1/6: Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. --- sys/alpha/alpha/promcons.c | 2 - sys/alpha/tlsb/zs_tlsb.c | 2 - sys/cam/cam_xpt.c | 2 - sys/cam/scsi/scsi_ch.c | 2 - sys/cam/scsi/scsi_pass.c | 2 - sys/cam/scsi/scsi_pt.c | 2 - sys/cam/scsi/scsi_sa.c | 2 - sys/cam/scsi/scsi_ses.c | 5 +- sys/cam/scsi/scsi_target.c | 2 - sys/conf/majors | 73 ---------------------- sys/dev/acpica/acpi.c | 2 - sys/dev/agp/agp.c | 2 - sys/dev/atkbdc/psm.c | 2 - sys/dev/bktr/bktr_os.c | 2 - sys/dev/ciss/ciss.c | 2 - sys/dev/cy/cy.c | 2 - sys/dev/cy/cy_isa.c | 2 - sys/dev/dcons/dcons.c | 2 - sys/dev/digi/digi.c | 2 - sys/dev/dpt/dpt.h | 1 - sys/dev/drm/drm_drv.h | 1 - sys/dev/drm/drm_os_freebsd.h | 1 - sys/dev/fb/fb.c | 2 - sys/dev/fdc/fdc.c | 2 - sys/dev/firewire/fwdev.c | 2 - sys/dev/iicbus/iic.c | 2 - sys/dev/isp/isp_freebsd.c | 2 - sys/dev/joy/joy.c | 2 - sys/dev/kbd/kbd.c | 2 - sys/dev/mcd/mcd.c | 2 - sys/dev/mlx/mlx.c | 2 - sys/dev/mly/mly.c | 2 - sys/dev/mse/mse.c | 2 - sys/dev/ofw/ofw_console.c | 4 +- sys/dev/ppbus/lpt.c | 2 - sys/dev/ppbus/pcfclock.c | 2 - sys/dev/ppbus/ppi.c | 2 - sys/dev/ppbus/pps.c | 2 - sys/dev/rc/rc.c | 2 - sys/dev/rp/rp.c | 2 - sys/dev/scd/scd.c | 2 - sys/dev/si/si.c | 2 - sys/dev/sio/sio.c | 2 - sys/dev/smbus/smb.c | 2 - sys/dev/speaker/spkr.c | 2 - sys/dev/streams/streams.c | 2 - sys/dev/syscons/sysmouse.c | 5 +- sys/dev/tdfx/tdfx_pci.c | 1 - sys/dev/tdfx/tdfx_vars.h | 1 - sys/dev/ti/if_ti.c | 2 - sys/dev/twe/twe_freebsd.c | 1 - sys/dev/twe/twevar.h | 2 - sys/dev/usb/ucom.c | 2 - sys/dev/usb/ufm.c | 7 --- sys/dev/usb/ugen.c | 2 - sys/dev/usb/uhid.c | 2 - sys/dev/usb/ulpt.c | 2 - sys/dev/usb/ums.c | 2 - sys/dev/usb/urio.c | 2 - sys/dev/usb/usb.c | 1 - sys/dev/usb/usbdi.h | 1 - sys/dev/usb/uscanner.c | 2 - sys/i386/acpica/acpi_machdep.c | 2 - sys/i386/bios/apm.c | 2 - sys/i386/bios/smapi.c | 1 - sys/i386/i386/perfmon.c | 2 - sys/i386/isa/asc.c | 2 - sys/i386/isa/ctx.c | 2 - sys/i386/isa/cy.c | 2 - sys/i386/isa/gpib.c | 2 - sys/i386/isa/gsc.c | 2 - sys/i386/isa/istallion.c | 2 - sys/i386/isa/mse.c | 2 - sys/i386/isa/pcvt/pcvt_drv.c | 2 - sys/i386/isa/spic.c | 1 - sys/i386/isa/spicreg.h | 1 - sys/i386/isa/spigot.c | 2 - sys/i386/isa/spkr.c | 2 - sys/i386/isa/stallion.c | 2 - sys/i386/isa/wt.c | 2 - sys/i4b/driver/i4b_ctl.c | 2 - sys/i4b/driver/i4b_rbch.c | 2 - sys/i4b/driver/i4b_tel.c | 2 - sys/i4b/driver/i4b_trace.c | 2 - sys/i4b/layer4/i4b_i4bdrv.c | 2 - sys/ia64/ia64/ssc.c | 2 - sys/isa/fd.c | 2 - sys/isa/psm.c | 2 - sys/net/bpf.c | 4 +- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 7 --- sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c | 7 --- sys/netgraph/ng_device.c | 2 - sys/pc98/cbus/fdc.c | 2 - sys/pc98/cbus/olpt.c | 2 - sys/pc98/cbus/sio.c | 2 - sys/pc98/pc98/fd.c | 2 - sys/pc98/pc98/mse.c | 2 - sys/pc98/pc98/olpt.c | 2 - sys/pc98/pc98/sio.c | 2 - sys/pc98/pc98/wd_cd.c | 2 - sys/pccard/pccard.c | 6 -- sys/pci/agp.c | 2 - sys/pci/if_ti.c | 2 - 103 files changed, 4 insertions(+), 291 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 68bf6bfc252c..1800de6e624c 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -63,7 +63,6 @@ static d_open_t promopen; static d_close_t promclose; static d_ioctl_t promioctl; -#define CDEV_MAJOR 97 static struct cdevsw prom_cdevsw = { .d_open = promopen, .d_close = promclose, @@ -72,7 +71,6 @@ static struct cdevsw prom_cdevsw = { .d_ioctl = promioctl, .d_poll = ttypoll, .d_name = "prom", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 0852724f0d3e..55065e1f786f 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -70,7 +70,6 @@ static d_open_t zsopen; static d_close_t zsclose; static d_ioctl_t zsioctl; -#define CDEV_MAJOR 135 static struct cdevsw zs_cdevsw = { .d_open = zsopen, .d_close = zsclose, @@ -79,7 +78,6 @@ static struct cdevsw zs_cdevsw = { .d_ioctl = zsioctl, .d_poll = ttypoll, .d_name = "zs", - .d_maj = CDEV_MAJOR, }; static void zsstart(struct tty *); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 3b9961368d63..03eaf544439e 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -630,7 +630,6 @@ static struct periph_driver probe_driver = PERIPHDRIVER_DECLARE(xpt, xpt_driver); PERIPHDRIVER_DECLARE(probe, probe_driver); -#define XPT_CDEV_MAJOR 104 static d_open_t xptopen; static d_close_t xptclose; @@ -641,7 +640,6 @@ static struct cdevsw xpt_cdevsw = { .d_close = xptclose, .d_ioctl = xptioctl, .d_name = "xpt", - .d_maj = XPT_CDEV_MAJOR, }; static struct intr_config_hook *xpt_config_hook; diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index 1ece680c54eb..a9ed37376c23 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -174,7 +174,6 @@ struct ch_softc { }; #define CHUNIT(x) (minor((x))) -#define CH_CDEV_MAJOR 17 static d_open_t chopen; static d_close_t chclose; @@ -217,7 +216,6 @@ static struct cdevsw ch_cdevsw = { .d_close = chclose, .d_ioctl = chioctl, .d_name = "ch", - .d_maj = CH_CDEV_MAJOR, }; static void diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index 6aa75684393c..13c1017e5ca1 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -77,7 +77,6 @@ struct pass_softc { dev_t dev; }; -#define PASS_CDEV_MAJOR 31 static d_open_t passopen; static d_close_t passclose; @@ -110,7 +109,6 @@ static struct cdevsw pass_cdevsw = { .d_close = passclose, .d_ioctl = passioctl, .d_name = "pass", - .d_maj = PASS_CDEV_MAJOR, }; static void diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 72e529013c2e..cc3afa6ce58c 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -116,7 +116,6 @@ static struct periph_driver ptdriver = PERIPHDRIVER_DECLARE(pt, ptdriver); -#define PT_CDEV_MAJOR 61 static struct cdevsw pt_cdevsw = { .d_open = ptopen, @@ -126,7 +125,6 @@ static struct cdevsw pt_cdevsw = { .d_ioctl = ptioctl, .d_strategy = ptstrategy, .d_name = "pt", - .d_maj = PT_CDEV_MAJOR, }; #ifndef SCSI_PT_DEFAULT_TIMEOUT diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index adb22f846ccf..c41e4166ef91 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -423,7 +423,6 @@ PERIPHDRIVER_DECLARE(sa, sadriver); #define D_TAPE 0 #endif -#define SA_CDEV_MAJOR 14 static struct cdevsw sa_cdevsw = { .d_open = saopen, @@ -433,7 +432,6 @@ static struct cdevsw sa_cdevsw = { .d_ioctl = saioctl, .d_strategy = sastrategy, .d_name = "sa", - .d_maj = SA_CDEV_MAJOR, .d_flags = D_TAPE, }; diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index 738178714f35..8f594ae2bcd5 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -153,7 +153,6 @@ struct ses_softc { #define SES_FLAG_INITIALIZED 0x04 #define SESUNIT(x) (minor((x))) -#define SES_CDEV_MAJOR 110 static d_open_t sesopen; static d_close_t sesclose; @@ -175,13 +174,11 @@ static struct periph_driver sesdriver = { PERIPHDRIVER_DECLARE(ses, sesdriver); -static struct cdevsw ses_cdevsw = -{ +static struct cdevsw ses_cdevsw = { .d_open = sesopen, .d_close = sesclose, .d_ioctl = sesioctl, .d_name = "ses", - .d_maj = SES_CDEV_MAJOR, }; static void diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 749447fb9fd0..7e0d28fbd83b 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -104,7 +104,6 @@ static int targreadfilt(struct knote *kn, long hint); static struct filterops targread_filtops = { 1, NULL, targreadfiltdetach, targreadfilt }; -#define TARG_CDEV_MAJOR 65 static struct cdevsw targ_cdevsw = { .d_open = targopen, .d_close = targclose, @@ -113,7 +112,6 @@ static struct cdevsw targ_cdevsw = { .d_ioctl = targioctl, .d_poll = targpoll, .d_name = "targ", - .d_maj = TARG_CDEV_MAJOR, .d_kqfilter = targkqfilter }; diff --git a/sys/conf/majors b/sys/conf/majors index 60c0727a4379..62f5264e8a36 100644 --- a/sys/conf/majors +++ b/sys/conf/majors @@ -23,25 +23,10 @@ 5 *pts pseudo tty "tty" half 6 *ptc pseudo tty "master" half 7 *log system log -9 *fd floppy disk -10 *wt i386/isa/wt.c -11 *spigot Video capture? -12 *sc syscons/pcvt virtual consoles -14 *sa SCSI "sequential access devices" -16 *lpt PC parallel printer port -17 *ch SCSI changer 18 *nmdm nullmodem back-to-back tty ports 19 *tw X-10 power interface -20 *ng_device Netgraph -21 *psm PS/2 Mouse 22 *fd (/dev/stdin etc) -23 *bpf Berkeley Packet Filter -26 *spkr PC speaker (/dev/spkr) -27 *mse Microsoft bus-mouse -28 *sio 16450/16550 serial -29 *mcd Mitsumi CDROM interface 30 *snd sound driver system -31 *pass SCSI "Application Pass-Thru" 32 lkmc Loadable Kernel Module Controller 33 lkm assigned to Loadable Kernel Modules 34 lkm assigned to Loadable Kernel Modules @@ -49,110 +34,55 @@ 36 lkm assigned to Loadable Kernel Modules 37 lkm assigned to Loadable Kernel Modules 38 lkm assigned to Loadable Kernel Modules -39 *apm Advanced Power Management also ACPI -40 *ctx Cortex 42 *cx Cronyx/Sigma serial adapter 43 vn vnode "disk" device (retired) -44 *gp GPIB -45 *scd Sony CDROM interface 46 - - -47 *gsc Genius Scanner -48 *cy Cyclades -51 *joy joystick 52 *tun IP tunnel device -53 *snp tty snoop 54 OLDnic ISDN system -55 *i4b_ctl ISDN4BSD -56 *i4b_tel ISDN4BSD -57 *i4b_rbch ISDN4BSD 58 - Was dgb: Digiboard PC/Xe -59 *i4b_trace ISDN4BSD -60 *i4b_i4bdrv ISDN4BSD -61 *pt SCSI "processor target" 62 worm SCSI "worm type" -63 *rc Riscom/8 driver 64 ?? Talisman -65 *targ SCSI target sample driver 66 labpc National Instruments LabPC 67 - was meteor Matrox Meteor video capture -68 *si Specialix SI/XIO (peter@freebsd.org) -69 *wcd ATAPI CDROM client of "wd" 70 crypto Device-independent crypto interface (from openbsd) -71 *asc AmiScan driver -72 *stl Stallion (cd1400 based) (gerg@stallion.oz.au) 74 *ccd concatenated disk -75 *stli Stallion (intelligent cdk based) (gerg@stallion.oz.au) 76 scc IBM Smart Capture Card (ohashi@mickey.ai.kyutech.ac.jp) 77 cyy Cyclades Ye/PCI serial card 78 pci PCI bus 79 *ipl IP Filter 80 xdcp Assigned to Chris Ficklin -81 *rp RocketPort/Steve Gericke -82 *ppi Generic Parallel I/O 83 can CAN16-2 CAN-PC Interface 84 dtfp Datum Time and Frequency processor (louie@UU.NET) 85 vesa VESA support device (j_mini@efn.org) 86 alog Industrial Computer Source AIO8-P driver (deprecated) 87 wfd ATAPI floppy client of "wd" -88 *dpt DPT RAID Controller -89 *pps Pulse-Per-Second timing interface 90 wst ATAPI tape client of "wd" 91 *vinum Volume manager 92 *bktr Bt848 video capture driver (hasty@star-gate.com) 93 *coda CODA filesystem. 96 altq alternate queueing (including cbq, red, wfq) -97 *prom Alpha PROM console 98 loe Loopback pseudo-ethernet (sbabkin@dcn.att.com) 99 ct Cronyx/Tau serial adaptor -103 *streams SVR4 Streams emulation -104 *xpt CAM Transport Layer Services -105 *iic I2C bus generic i/o -106 *smb System Management Bus generic i/o -107 *3dfx 3Dfx driver -108 *usb Universal Serial Bus -110 *ses SCSI Environmental Services driver (mjacob@feral.com) -111 *ums USB Mouse -112 *kbd keyboard -113 *ulpt USB Printer -114 *ugen USB Generic device 115 dag University of Waikato DAG network capture boards 117 *acd ATAPI CDROM 119 *ast ATAPI tape 121 onew Dallas Semiconductor One-Wire bus -122 *uhid USB HID devices -123 *fb frame buffer 124 ucdc USB Communication Class Driver 125 digio Advantech PCI-1750 IO card jen@vulture.dmem.strath.ac.uk 126 sync Generic sync port support , -127 *fire Firewire driver 128 arla Arla (AFS-clone) driver -130 *mlx Mylex DAC960 RAID (control device) 134 taupci Cronyx Tau-PCI card -135 *zsc TurboLaser console uart 136 ipr Iprobe on-chip perf. counters (gallatin@freebsd.org) 137 nfp nFast PCI crypto accelerator (support@ncipher.com) -138 *ucom USB Serial support 139 wanrouter Sangoma Technologies Inc. (al.feldman@sangoma.com) -140 *pcfclock PCFCLOCK 141 pcdmx PCDMX theatre lighting controller 142 skip SKIP port (security/skip) control device -143 *urio USB Rio 500 -145 *dri DRI Graphics for OpenGL -146 *twe 3ware Escalade ATA RAID (controller) -148 *agp AGP 149 *tap Ethernet tunneling device -152 *acpi ACPI bios support (Takanori Watanabe takawata@shidahara1.planet.sci.kobe-u.ac.jp) -153 *ti Tigon Gigabit Ethernet driver (ken@FreeBSD.ORG) 154 *asr Adaptec SCSI RAID 155 phone Quicknet PhoneJACK and LineJACK cards for VoIP -156 *uscanner USB Scanners -158 *mly Mylex RAID control device 159 *ata ATA control device -160 *spic Sony Programmable I/O Controller (jogdial) 161 swdoc Sitara networks watchdog device -162 *digi Digiboard 163 - - -166 *ciss Compaq SmartArray 5* adapter 168 XXX used by pst in RELENG_4 170 pst Promise SuperTrak (uses 168 in RELENG_4) 171 mide LSI MegaRAID IDE (control device) @@ -162,12 +92,9 @@ 180 nvidia NVIDIA (nvidiaN/nvidiactl) 181 casm HP/Compaq ProLiant Advanced Server Management 183 *smapi SMAPI BIOS interface -184 dcons Dumb console driver 185 ce Cronyx Tau-32 E1 adapter 186 sx Specialix I/O8+ driver 187 twa 3ware Apache ATA RAID (controller) -200 ?? entries from 200-252 are reserved for local use -248 *isp dev/isp/isp_freebsd.c 252 ?? entries from 200-252 are reserved for local use 254 internal Used internally by the kernel 255 bad_choice -1 is 255 which has magic meanings internally diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index a92659a34674..3c7b038e9a85 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -66,13 +66,11 @@ static d_open_t acpiopen; static d_close_t acpiclose; static d_ioctl_t acpiioctl; -#define CDEV_MAJOR 152 static struct cdevsw acpi_cdevsw = { .d_open = acpiopen, .d_close = acpiclose, .d_ioctl = acpiioctl, .d_name = "acpi", - .d_maj = CDEV_MAJOR, }; static const char* sleep_state_names[] = { diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 2ae2b72e20ad..6f09660fad6a 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -63,7 +63,6 @@ MODULE_VERSION(agp, 1); MALLOC_DEFINE(M_AGP, "agp", "AGP data structures"); -#define CDEV_MAJOR 148 /* agp_drv.c */ static d_open_t agp_open; static d_close_t agp_close; @@ -76,7 +75,6 @@ static struct cdevsw agp_cdevsw = { .d_ioctl = agp_ioctl, .d_mmap = agp_mmap, .d_name = "agp", - .d_maj = CDEV_MAJOR, }; static devclass_t agp_devclass; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 4b1277632024..e886e8cc9e4b 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -346,7 +346,6 @@ static driver_t psm_driver = { sizeof(struct psm_softc), }; -#define CDEV_MAJOR 21 static struct cdevsw psm_cdevsw = { .d_open = psmopen, @@ -355,7 +354,6 @@ static struct cdevsw psm_cdevsw = { .d_ioctl = psmioctl, .d_poll = psmpoll, .d_name = PSM_DRIVER_NAME, - .d_maj = CDEV_MAJOR, }; /* debug message level */ diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index b074962f472d..92c7fbea8d74 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -257,7 +257,6 @@ static d_ioctl_t bktr_ioctl; static d_mmap_t bktr_mmap; static d_poll_t bktr_poll; -#define CDEV_MAJOR 92 static struct cdevsw bktr_cdevsw = { .d_open = bktr_open, .d_close = bktr_close, @@ -267,7 +266,6 @@ static struct cdevsw bktr_cdevsw = { .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); diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index e3deb352b487..843577de431d 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -212,14 +212,12 @@ static d_open_t ciss_open; static d_close_t ciss_close; static d_ioctl_t ciss_ioctl; -#define CISS_CDEV_MAJOR 166 static struct cdevsw ciss_cdevsw = { .d_open = ciss_open, .d_close = ciss_close, .d_ioctl = ciss_ioctl, .d_name = "ciss", - .d_maj = CISS_CDEV_MAJOR, }; /************************************************************************ diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 203ed94c60e5..4351a3051de8 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 203ed94c60e5..4351a3051de8 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 6fd284486e37..04d75494f1c6 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -81,7 +81,6 @@ static struct consdev gdbconsdev; #endif -#define CDEV_MAJOR 184 static d_open_t dcons_open; static d_close_t dcons_close; @@ -96,7 +95,6 @@ static struct cdevsw dcons_cdevsw = { .d_ioctl = dcons_ioctl, .d_poll = ttypoll, .d_name = "dcons", - .d_maj = CDEV_MAJOR, #else /* open */ dcons_open, /* close */ dcons_close, diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index d36694727b48..f1bc67019e2a 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -58,7 +58,6 @@ #include #include -#define CDEV_MAJOR 162 #define CTRL_DEV 0x800000 #define CALLOUT_MASK 0x400000 @@ -150,7 +149,6 @@ static struct cdevsw digi_sw = { .d_ioctl = digiioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter }; diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h index 6b909a9dc416..d04c95a3b8bb 100644 --- a/sys/dev/dpt/dpt.h +++ b/sys/dev/dpt/dpt.h @@ -47,7 +47,6 @@ #include -#define DPT_CDEV_MAJOR 88 #undef DPT_USE_DLM_SWI diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index b6b8c6111ff4..e0dfbccf5257 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -219,7 +219,6 @@ static struct cdevsw DRM(cdevsw) = { .d_poll = DRM( poll ), .d_mmap = DRM( mmap ), .d_name = DRIVER_NAME, - .d_maj = CDEV_MAJOR, .d_flags = D_TRACKCLOSE, #if __FreeBSD_version < 500000 .d_bmaj = -1 diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index 43b6524935de..43f630927cd3 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -114,7 +114,6 @@ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) #define DRM_DEV_UID 0 #define DRM_DEV_GID 0 -#define CDEV_MAJOR 145 #if __FreeBSD_version >= 500000 #define DRM_CURPROC curthread diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index c47bd128a519..5ce670841029 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -361,7 +361,6 @@ static d_write_t fbwrite; static d_ioctl_t fbioctl; static d_mmap_t fbmmap; -#define CDEV_MAJOR 123 /* XXX */ static struct cdevsw fb_cdevsw = { .d_open = fbopen, @@ -371,7 +370,6 @@ static struct cdevsw fb_cdevsw = { .d_ioctl = fbioctl, .d_mmap = fbmmap, .d_name = FB_DRIVER_NAME, - .d_maj = CDEV_MAJOR, }; #endif diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 5cc94086bcb5..5a506334d5c4 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -481,7 +481,6 @@ fdin_rd(fdc_p fdc) return bus_space_read_1(fdc->portt, fdc->porth, FDIN); } -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -490,7 +489,6 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index b3ecc8acccd5..9a34ff95fd3c 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -62,7 +62,6 @@ #include #include -#define CDEV_MAJOR 127 #define FWNODE_INVAL 0xffff static d_open_t fw_open; @@ -86,7 +85,6 @@ struct cdevsw firewire_cdevsw = .d_mmap = fw_mmap, .d_strategy = fw_strategy, .d_name = "fw", - .d_maj = CDEV_MAJOR, .d_flags = D_MEM #else fw_open, fw_close, fw_read, fw_write, fw_ioctl, diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index d6410c7e8824..0951f1f5847d 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -92,7 +92,6 @@ static d_write_t iicwrite; static d_read_t iicread; static d_ioctl_t iicioctl; -#define CDEV_MAJOR 105 static struct cdevsw iic_cdevsw = { .d_open = iicopen, .d_close = iicclose, @@ -100,7 +99,6 @@ static struct cdevsw iic_cdevsw = { .d_write = iicwrite, .d_ioctl = iicioctl, .d_name = "iic", - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 2e70f53532fa..e7526ab94207 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -52,11 +52,9 @@ static void isp_kthread(void *); static void isp_action(struct cam_sim *, union ccb *); -#define ISP_CDEV_MAJOR 248 static struct cdevsw isp_cdevsw = { .d_ioctl = ispioctl, .d_name = "isp", - .d_maj = ISP_CDEV_MAJOR, }; static struct ispsoftc *isplist = NULL; diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 9f6ff51d308f..2ef286bebef9 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #define JOY_SOFTC(unit) (struct joy_softc *) \ devclass_get_softc(joy_devclass,(unit)) -#define CDEV_MAJOR 51 static d_open_t joyopen; static d_close_t joyclose; static d_read_t joyread; @@ -75,7 +74,6 @@ static struct cdevsw joy_cdevsw = { .d_read = joyread, .d_ioctl = joyioctl, .d_name = "joy", - .d_maj = CDEV_MAJOR, }; devclass_t joy_devclass; diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c index f4910e1ef34c..e7a67db70957 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -431,7 +431,6 @@ static d_write_t genkbdwrite; static d_ioctl_t genkbdioctl; static d_poll_t genkbdpoll; -#define CDEV_MAJOR 112 static struct cdevsw kbd_cdevsw = { .d_open = genkbdopen, @@ -441,7 +440,6 @@ static struct cdevsw kbd_cdevsw = { .d_ioctl = genkbdioctl, .d_poll = genkbdpoll, .d_name = "kbd", - .d_maj = CDEV_MAJOR, }; int diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 21c160e513cd..285d57dcbf24 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -160,7 +160,6 @@ static d_close_t mcdclose; static d_ioctl_t mcdioctl; static d_strategy_t mcdstrategy; -#define CDEV_MAJOR 29 static struct cdevsw mcd_cdevsw = { .d_open = mcdopen, @@ -169,7 +168,6 @@ static struct cdevsw mcd_cdevsw = { .d_ioctl = mcdioctl, .d_strategy = mcdstrategy, .d_name = "mcd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 7c450249913f..bf9412c1e989 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -53,14 +53,12 @@ #include #include -#define MLX_CDEV_MAJOR 130 static struct cdevsw mlx_cdevsw = { .d_open = mlx_open, .d_close = mlx_close, .d_ioctl = mlx_ioctl, .d_name = "mlx", - .d_maj = MLX_CDEV_MAJOR, }; devclass_t mlx_devclass; diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 48e8f25fea74..6dacf2778fd7 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -149,14 +149,12 @@ static driver_t mly_pci_driver = { static devclass_t mly_devclass; DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0); -#define MLY_CDEV_MAJOR 158 static struct cdevsw mly_cdevsw = { .d_open = mly_user_open, .d_close = mly_user_close, .d_ioctl = mly_user_ioctl, .d_name = "mly", - .d_maj = MLY_CDEV_MAJOR, }; /******************************************************************************** diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index 408bbf77c0b0..b2c821b59154 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -139,7 +139,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -147,7 +146,6 @@ static struct cdevsw mse_cdevsw = { .d_ioctl = mseioctl, .d_poll = msepoll, .d_name = "mse", - .d_maj = CDEV_MAJOR, }; static void mseintr(void *); diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index a0e29ea8d92d..a4b5c8f98902 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -51,7 +51,6 @@ static d_open_t ofw_dev_open; static d_close_t ofw_dev_close; static d_ioctl_t ofw_dev_ioctl; -#define CDEV_MAJOR 97 static struct cdevsw ofw_cdevsw = { .d_open = ofw_dev_open, @@ -61,7 +60,6 @@ static struct cdevsw ofw_cdevsw = { .d_ioctl = ofw_dev_ioctl, .d_poll = ttypoll, .d_name = "ofw", - .d_maj = CDEV_MAJOR, }; static struct tty *ofw_tp = NULL; @@ -106,7 +104,7 @@ cn_drvinit(void *unused) } } -SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE + CDEV_MAJOR, cn_drvinit, NULL) +SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL) static int stdin; static int stdout; diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index 1914c95c5af3..687e7ade284f 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -189,7 +189,6 @@ static d_write_t lptwrite; static d_read_t lptread; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .d_open = lptopen, .d_close = lptclose, @@ -197,7 +196,6 @@ static struct cdevsw lpt_cdevsw = { .d_write = lptwrite, .d_ioctl = lptioctl, .d_name = LPT_NAME, - .d_maj = CDEV_MAJOR, }; static int diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c index 35dce7171ca7..bf0a01d64430 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -67,13 +67,11 @@ static d_open_t pcfclock_open; static d_close_t pcfclock_close; static d_read_t pcfclock_read; -#define CDEV_MAJOR 140 static struct cdevsw pcfclock_cdevsw = { .d_open = pcfclock_open, .d_close = pcfclock_close, .d_read = pcfclock_read, .d_name = PCFCLOCK_NAME, - .d_maj = CDEV_MAJOR, }; #ifndef PCFCLOCK_MAX_RETRIES diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index bccccf8688dd..c2783a66ea71 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -90,7 +90,6 @@ static d_ioctl_t ppiioctl; static d_write_t ppiwrite; static d_read_t ppiread; -#define CDEV_MAJOR 82 static struct cdevsw ppi_cdevsw = { .d_open = ppiopen, .d_close = ppiclose, @@ -98,7 +97,6 @@ static struct cdevsw ppi_cdevsw = { .d_write = ppiwrite, .d_ioctl = ppiioctl, .d_name = "ppi", - .d_maj = CDEV_MAJOR, }; #ifdef PERIPH_1284 diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index 08646bcba9af..e7e1373ed3cd 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -62,13 +62,11 @@ static d_open_t ppsopen; static d_close_t ppsclose; static d_ioctl_t ppsioctl; -#define CDEV_MAJOR 89 static struct cdevsw pps_cdevsw = { .d_open = ppsopen, .d_close = ppsclose, .d_ioctl = ppsioctl, .d_name = PPS_NAME, - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 6817d02ce6da..f11537c4c82c 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -146,7 +146,6 @@ static d_open_t rcopen; static d_close_t rcclose; static d_ioctl_t rcioctl; -#define CDEV_MAJOR 63 static struct cdevsw rc_cdevsw = { .d_open = rcopen, .d_close = rcclose, @@ -155,7 +154,6 @@ static struct cdevsw rc_cdevsw = { .d_ioctl = rcioctl, .d_poll = ttypoll, .d_name = "rc", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 8e96f5bae324..98ae4a738bd3 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -571,7 +571,6 @@ static d_close_t rpclose; static d_write_t rpwrite; static d_ioctl_t rpioctl; -#define CDEV_MAJOR 81 struct cdevsw rp_cdevsw = { .d_open = rpopen, .d_close = rpclose, @@ -580,7 +579,6 @@ struct cdevsw rp_cdevsw = { .d_ioctl = rpioctl, .d_poll = ttypoll, .d_name = "rp", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, }; diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 89850b3705b8..d455e095902f 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -145,7 +145,6 @@ static d_close_t scdclose; static d_ioctl_t scdioctl; static d_strategy_t scdstrategy; -#define CDEV_MAJOR 45 static struct cdevsw scd_cdevsw = { .d_open = scdopen, @@ -154,7 +153,6 @@ static struct cdevsw scd_cdevsw = { .d_ioctl = scdioctl, .d_strategy = scdstrategy, .d_name = "scd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 148182a46d0d..a3fd213f0e65 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -117,7 +117,6 @@ static d_close_t siclose; static d_write_t siwrite; static d_ioctl_t siioctl; -#define CDEV_MAJOR 68 static struct cdevsw si_cdevsw = { .d_open = siopen, .d_close = siclose, @@ -126,7 +125,6 @@ static struct cdevsw si_cdevsw = { .d_ioctl = siioctl, .d_poll = ttypoll, .d_name = "si", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index be51ac329e6b..571265ddc65b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -322,7 +322,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -331,7 +330,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index b7cfff991afc..280bda52da49 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -87,7 +87,6 @@ static d_write_t smbwrite; static d_read_t smbread; static d_ioctl_t smbioctl; -#define CDEV_MAJOR 106 static struct cdevsw smb_cdevsw = { .d_open = smbopen, .d_close = smbclose, @@ -95,7 +94,6 @@ static struct cdevsw smb_cdevsw = { .d_write = smbwrite, .d_ioctl = smbioctl, .d_name = "smb", - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index be3ad4209310..e82ef46c9f40 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -33,14 +33,12 @@ static d_close_t spkrclose; static d_write_t spkrwrite; static d_ioctl_t spkrioctl; -#define CDEV_MAJOR 26 static struct cdevsw spkr_cdevsw = { .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"); diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index cc50c3b8e854..8e5ac5713bbd 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -101,11 +101,9 @@ static struct fileops svr4_netops = { .fo_close = svr4_soo_close }; -#define CDEV_MAJOR 103 static struct cdevsw streams_cdevsw = { .d_open = streamsopen, .d_name = "streams", - .d_maj = CDEV_MAJOR, }; struct streams_softc { diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 738431002053..a7cff80c6bfe 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #ifndef SC_NO_SYSMOUSE -#define CDEV_MAJOR 12 /* major number, shared with syscons */ #define SC_MOUSE 128 /* minor number */ static d_open_t smopen; @@ -56,7 +55,6 @@ static struct cdevsw sm_cdevsw = { .d_ioctl = smioctl, .d_poll = ttypoll, .d_name = "sysmouse", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, }; @@ -255,8 +253,7 @@ sm_attach_mouse(void *unused) /* sysmouse doesn't have scr_stat */ } -SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, - sm_attach_mouse, NULL) +SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, sm_attach_mouse, NULL) int sysmouse_event(mouse_info_t *info) diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index b57a596f8efe..dda1eb5a27eb 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -109,7 +109,6 @@ static struct cdevsw tdfx_cdev = { .d_ioctl = tdfx_ioctl, .d_mmap = tdfx_mmap, .d_name = "tdfx", - .d_maj = CDEV_MAJOR, }; static int diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h index 55bb060ea0df..67ce1319cee8 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -42,7 +42,6 @@ #include #include -#define CDEV_MAJOR 107 #define PCI_DEVICE_ALLIANCE_AT3D 0x643d1142 #define PCI_DEVICE_3DFX_VOODOO1 0x0001121a #define PCI_DEVICE_3DFX_VOODOO2 0x0002121a diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index c5f3fc032ea2..9e8c8f1165e7 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -180,7 +180,6 @@ static struct ti_type ti_devs[] = { { 0, 0, NULL } }; -#define TI_CDEV_MAJOR 153 static d_open_t ti_open; static d_close_t ti_close; @@ -191,7 +190,6 @@ static struct cdevsw ti_cdevsw = { .d_close = ti_close, .d_ioctl = ti_ioctl2, .d_name = "ti", - .d_maj = TI_CDEV_MAJOR, }; static int ti_probe (device_t); diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 6f3f02bbe9ec..6a3a8ff09db3 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -71,7 +71,6 @@ static struct cdevsw twe_cdevsw = { .d_close = twe_close, .d_ioctl = twe_ioctl_wrapper, .d_name = "twe", - .d_maj = TWE_CDEV_MAJOR, }; /******************************************************************************** diff --git a/sys/dev/twe/twevar.h b/sys/dev/twe/twevar.h index 63700daf6425..e39c88e7d75c 100644 --- a/sys/dev/twe/twevar.h +++ b/sys/dev/twe/twevar.h @@ -32,8 +32,6 @@ * ..<3ware internal release>. */ #define TWE_DRIVER_VERSION_STRING "1.50.00.000" -#define TWE_CDEV_MAJOR 146 -#define TWED_CDEV_MAJOR 147 #ifdef TWE_DEBUG #define debug(level, fmt, args...) \ diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index e42657c6f465..9298d087c18c 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -126,7 +126,6 @@ Static d_read_t ucomread; Static d_write_t ucomwrite; Static d_ioctl_t ucomioctl; -#define UCOM_CDEV_MAJOR 138 static struct cdevsw ucom_cdevsw = { .d_open = ucomopen, @@ -136,7 +135,6 @@ static struct cdevsw ucom_cdevsw = { .d_ioctl = ucomioctl, .d_poll = ttypoll, .d_name = "ucom", - .d_maj = UCOM_CDEV_MAJOR, .d_flags = D_TTY, #if __FreeBSD_version < 500014 .d_bmaj = -1, diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c index 7fcecfdbd9e4..26916f1f4f39 100644 --- a/sys/dev/usb/ufm.c +++ b/sys/dev/usb/ufm.c @@ -88,18 +88,11 @@ d_open_t ufmopen; d_close_t ufmclose; d_ioctl_t ufmioctl; -#if __FreeBSD_version >= 500000 -#define UFM_CDEV_MAJOR MAJOR_AUTO -#else -#define UFM_CDEV_MAJOR 200 -#endif - Static struct cdevsw ufm_cdevsw = { .d_open = ufmopen, .d_close = ufmclose, .d_ioctl = ufmioctl, .d_name = "ufm", - .d_maj = UFM_CDEV_MAJOR, #if (__FreeBSD_version < 500014) .d_bmaj = -1 #endif diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 8740c3d7fef0..408d14b06bdc 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -149,7 +149,6 @@ d_write_t ugenwrite; d_ioctl_t ugenioctl; d_poll_t ugenpoll; -#define UGEN_CDEV_MAJOR 114 Static struct cdevsw ugen_cdevsw = { .d_open = ugenopen, @@ -159,7 +158,6 @@ Static struct cdevsw ugen_cdevsw = { .d_ioctl = ugenioctl, .d_poll = ugenpoll, .d_name = "ugen", - .d_maj = UGEN_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 2451542f7946..ec46474a1c0b 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -154,7 +154,6 @@ d_write_t uhidwrite; d_ioctl_t uhidioctl; d_poll_t uhidpoll; -#define UHID_CDEV_MAJOR 122 Static struct cdevsw uhid_cdevsw = { .d_open = uhidopen, @@ -164,7 +163,6 @@ Static struct cdevsw uhid_cdevsw = { .d_ioctl = uhidioctl, .d_poll = uhidpoll, .d_name = "uhid", - .d_maj = UHID_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 6df5ff3a2fe3..3dadd00633f2 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -145,7 +145,6 @@ Static d_close_t ulptclose; Static d_write_t ulptwrite; Static d_ioctl_t ulptioctl; -#define ULPT_CDEV_MAJOR 113 Static struct cdevsw ulpt_cdevsw = { .d_open = ulptopen, @@ -153,7 +152,6 @@ Static struct cdevsw ulpt_cdevsw = { .d_write = ulptwrite, .d_ioctl = ulptioctl, .d_name = "ulpt", - .d_maj = ULPT_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index dea1e0b8f827..4c0d598045da 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -152,7 +152,6 @@ Static d_read_t ums_read; Static d_ioctl_t ums_ioctl; Static d_poll_t ums_poll; -#define UMS_CDEV_MAJOR 111 Static struct cdevsw ums_cdevsw = { .d_open = ums_open, @@ -161,7 +160,6 @@ Static struct cdevsw ums_cdevsw = { .d_ioctl = ums_ioctl, .d_poll = ums_poll, .d_name = "ums", - .d_maj = UMS_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 6614a33eb93e..57979cdf3f38 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -115,7 +115,6 @@ d_read_t urioread; d_write_t uriowrite; d_ioctl_t urioioctl; -#define URIO_CDEV_MAJOR 143 Static struct cdevsw urio_cdevsw = { .d_open = urioopen, @@ -124,7 +123,6 @@ Static struct cdevsw urio_cdevsw = { .d_write = uriowrite, .d_ioctl = urioioctl, .d_name = "urio", - .d_maj = URIO_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj = -1 #endif diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 4f9034a226ca..6ff8ed3e81e8 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -152,7 +152,6 @@ struct cdevsw usb_cdevsw = { .d_ioctl = usbioctl, .d_poll = usbpoll, .d_name = "usb", - .d_maj = USB_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj = -1 #endif diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 146f8caa878f..b9e1c1e19423 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -89,7 +89,6 @@ typedef void (*usbd_callback)(usbd_xfer_handle, usbd_private_handle, #define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */ #if defined(__FreeBSD__) -#define USB_CDEV_MAJOR 108 #endif usbd_status usbd_open_pipe(usbd_interface_handle iface, u_int8_t address, diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 7d83f570f4cf..ab46721c113a 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -266,7 +266,6 @@ d_read_t uscannerread; d_write_t uscannerwrite; d_poll_t uscannerpoll; -#define USCANNER_CDEV_MAJOR 156 Static struct cdevsw uscanner_cdevsw = { .d_open = uscanneropen, @@ -275,7 +274,6 @@ Static struct cdevsw uscanner_cdevsw = { .d_write = uscannerwrite, .d_poll = uscannerpoll, .d_name = "uscanner", - .d_maj = USCANNER_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index d382bc6410ad..a6c186a9a610 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -72,7 +72,6 @@ static d_write_t apmwrite; static d_ioctl_t apmioctl; static d_poll_t apmpoll; -#define CDEV_MAJOR 39 static struct cdevsw apm_cdevsw = { .d_open = apmopen, .d_close = apmclose, @@ -80,7 +79,6 @@ static struct cdevsw apm_cdevsw = { .d_ioctl = apmioctl, .d_poll = apmpoll, .d_name = "apm", - .d_maj = CDEV_MAJOR, }; static int intr_model = ACPI_INTR_PIC; diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 64337c4c9d3d..1e2371fef54a 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -107,7 +107,6 @@ static d_write_t apmwrite; static d_ioctl_t apmioctl; static d_poll_t apmpoll; -#define CDEV_MAJOR 39 static struct cdevsw apm_cdevsw = { .d_open = apmopen, .d_close = apmclose, @@ -115,7 +114,6 @@ static struct cdevsw apm_cdevsw = { .d_ioctl = apmioctl, .d_poll = apmpoll, .d_name = "apm", - .d_maj = CDEV_MAJOR, }; static int apm_suspend_delay = 1; diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c index ed1267eed6ca..200bcfc760fb 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -77,7 +77,6 @@ static d_ioctl_t smapi_ioctl; static struct cdevsw smapi_cdevsw = { .d_ioctl = smapi_ioctl, .d_name = "smapi", - .d_maj = MAJOR_AUTO, .d_flags = D_MEM, }; diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index a5cd307b55ed..3b765f49223a 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -71,13 +71,11 @@ static d_ioctl_t perfmon_ioctl; static void perfmon_init_dev(void *); 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 = { .d_open = perfmon_open, .d_close = perfmon_close, .d_ioctl = perfmon_ioctl, .d_name = "perfmon", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 23a9801da66e..8aff8c105f62 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -195,7 +195,6 @@ static d_read_t ascread; static d_ioctl_t ascioctl; static d_poll_t ascpoll; -#define CDEV_MAJOR 71 static struct cdevsw asc_cdevsw = { .d_open = ascopen, @@ -204,7 +203,6 @@ static struct cdevsw asc_cdevsw = { .d_ioctl = ascioctl, .d_poll = ascpoll, .d_name = "asc", - .d_maj = CDEV_MAJOR, }; #define STATIC static diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index db26c40ba7b2..28adedc60f48 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -141,7 +141,6 @@ static d_close_t ctxclose; static d_read_t ctxread; static d_write_t ctxwrite; static d_ioctl_t ctxioctl; -#define CDEV_MAJOR 40 static struct cdevsw ctx_cdevsw = { .d_open = ctxopen, @@ -150,7 +149,6 @@ static struct cdevsw ctx_cdevsw = { .d_write = ctxwrite, .d_ioctl = ctxioctl, .d_name = "ctx", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 203ed94c60e5..4351a3051de8 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 26102df178b3..480448a14071 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -72,14 +72,12 @@ static d_close_t gpclose; static d_write_t gpwrite; static d_ioctl_t gpioctl; -#define CDEV_MAJOR 44 static struct cdevsw gp_cdevsw = { .d_open = gpopen, .d_close = gpclose, .d_write = gpwrite, .d_ioctl = gpioctl, .d_name = "gp", - .d_maj = CDEV_MAJOR, }; #define BUFSIZE 1024 diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index a59f49345e33..d4dff76327a8 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -191,14 +191,12 @@ static d_close_t gscclose; static d_read_t gscread; static d_ioctl_t gscioctl; -#define CDEV_MAJOR 47 static struct cdevsw gsc_cdevsw = { .d_open = gscopen, .d_close = gscclose, .d_read = gscread, .d_ioctl = gscioctl, .d_name = "gsc", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index 7f27ad7e8865..e44400dc48a9 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -642,7 +642,6 @@ COMPAT_ISA_DRIVER(stli, stlidriver); * FreeBSD-2.2+ kernel linkage. */ -#define CDEV_MAJOR 75 static struct cdevsw stli_cdevsw = { .d_open = stliopen, .d_close = stliclose, @@ -651,7 +650,6 @@ static struct cdevsw stli_cdevsw = { .d_ioctl = stliioctl, .d_poll = ttypoll, .d_name = stli_drvname, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index 408bbf77c0b0..b2c821b59154 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -139,7 +139,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -147,7 +146,6 @@ static struct cdevsw mse_cdevsw = { .d_ioctl = mseioctl, .d_poll = msepoll, .d_name = "mse", - .d_maj = CDEV_MAJOR, }; static void mseintr(void *); diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 38c1ced77314..351048020351 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -93,7 +93,6 @@ static d_close_t pcvt_close; static d_ioctl_t pcvt_ioctl; static d_mmap_t pcvt_mmap; -#define CDEV_MAJOR 12 static struct cdevsw vt_cdevsw = { .d_open = pcvt_open, @@ -104,7 +103,6 @@ static struct cdevsw vt_cdevsw = { .d_poll = ttypoll, .d_mmap = pcvt_mmap, .d_name = "vt", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c index 93985e411445..e73b8b6dbc05 100644 --- a/sys/i386/isa/spic.c +++ b/sys/i386/isa/spic.c @@ -91,7 +91,6 @@ static struct cdevsw spic_cdevsw = { .d_ioctl = spicioctl, .d_poll = spicpoll, .d_name = "spic", - .d_maj = CDEV_MAJOR, }; #define SCBUFLEN 128 diff --git a/sys/i386/isa/spicreg.h b/sys/i386/isa/spicreg.h index 62a12abb761b..7657f3ea7729 100644 --- a/sys/i386/isa/spicreg.h +++ b/sys/i386/isa/spicreg.h @@ -27,7 +27,6 @@ * */ -#define CDEV_MAJOR 160 /* * Find the PCI device that holds the G10 register needed to map in the SPIC diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index 0b568f312bd0..dd23abd690d2 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -104,7 +104,6 @@ static d_write_t spigot_write; static d_ioctl_t spigot_ioctl; static d_mmap_t spigot_mmap; -#define CDEV_MAJOR 11 static struct cdevsw spigot_cdevsw = { .d_open = spigot_open, .d_close = spigot_close, @@ -113,7 +112,6 @@ static struct cdevsw spigot_cdevsw = { .d_ioctl = spigot_ioctl, .d_mmap = spigot_mmap, .d_name = "spigot", - .d_maj = CDEV_MAJOR, }; static ointhand2_t spigintr; diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index be3ad4209310..e82ef46c9f40 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -33,14 +33,12 @@ static d_close_t spkrclose; static d_write_t spkrwrite; static d_ioctl_t spkrioctl; -#define CDEV_MAJOR 26 static struct cdevsw spkr_cdevsw = { .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"); diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index 54d186d09ca4..4665491dd57d 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -536,7 +536,6 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver); * FreeBSD-2.2+ kernel linkage. */ -#define CDEV_MAJOR 72 static struct cdevsw stl_cdevsw = { .d_open = stlopen, .d_close = stlclose, @@ -545,7 +544,6 @@ static struct cdevsw stl_cdevsw = { .d_ioctl = stlioctl, .d_poll = ttypoll, .d_name = "stl", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 22257f7eb030..941fc082f403 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -184,7 +184,6 @@ static d_close_t wtclose; static d_ioctl_t wtioctl; static d_strategy_t wtstrategy; -#define CDEV_MAJOR 10 static struct cdevsw wt_cdevsw = { .d_open = wtopen, @@ -194,7 +193,6 @@ static struct cdevsw wt_cdevsw = { .d_ioctl = wtioctl, .d_strategy = wtstrategy, .d_name = "wt", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c index f71ae632fbf4..79cd1ab57fa6 100644 --- a/sys/i4b/driver/i4b_ctl.c +++ b/sys/i4b/driver/i4b_ctl.c @@ -56,7 +56,6 @@ static d_close_t i4bctlclose; static d_ioctl_t i4bctlioctl; static d_poll_t i4bctlpoll; -#define CDEV_MAJOR 55 static struct cdevsw i4bctl_cdevsw = { .d_open = i4bctlopen, @@ -64,7 +63,6 @@ static struct cdevsw i4bctl_cdevsw = { .d_ioctl = i4bctlioctl, .d_poll = i4bctlpoll, .d_name = "i4bctl", - .d_maj = CDEV_MAJOR, }; static void i4bctlattach(void *); diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c index cb68c6cd53cb..f632186d4c28 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -110,7 +110,6 @@ static d_read_t i4brbchwrite; static d_ioctl_t i4brbchioctl; static d_poll_t i4brbchpoll; -#define CDEV_MAJOR 57 static struct cdevsw i4brbch_cdevsw = { .d_open = i4brbchopen, @@ -120,7 +119,6 @@ static struct cdevsw i4brbch_cdevsw = { .d_ioctl = i4brbchioctl, .d_poll = i4brbchpoll, .d_name = "i4brbch", - .d_maj = CDEV_MAJOR, }; static void i4brbchattach(void *); diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c index de0833dac5c5..5acce731a376 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -132,7 +132,6 @@ static d_read_t i4btelwrite; static d_ioctl_t i4btelioctl; static d_poll_t i4btelpoll; -#define CDEV_MAJOR 56 static struct cdevsw i4btel_cdevsw = { .d_open = i4btelopen, @@ -142,7 +141,6 @@ static struct cdevsw i4btel_cdevsw = { .d_ioctl = i4btelioctl, .d_poll = i4btelpoll, .d_name = "i4btel", - .d_maj = CDEV_MAJOR, }; static void i4btelattach(void *); diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index ea92b18884ab..348c6dd49b22 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -73,7 +73,6 @@ static d_read_t i4btrcread; static d_ioctl_t i4btrcioctl; static d_poll_t i4btrcpoll; -#define CDEV_MAJOR 59 static struct cdevsw i4btrc_cdevsw = { .d_open = i4btrcopen, @@ -82,7 +81,6 @@ static struct cdevsw i4btrc_cdevsw = { .d_ioctl = i4btrcioctl, .d_poll = i4btrcpoll, .d_name = "i4btrc", - .d_maj = CDEV_MAJOR, }; static void i4btrcattach(void *); diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index e17ad85e3dfe..42330efdc729 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -76,7 +76,6 @@ static d_read_t i4bread; static d_ioctl_t i4bioctl; static d_poll_t i4bpoll; -#define CDEV_MAJOR 60 static struct cdevsw i4b_cdevsw = { .d_open = i4bopen, @@ -85,7 +84,6 @@ static struct cdevsw i4b_cdevsw = { .d_ioctl = i4bioctl, .d_poll = i4bpoll, .d_name = "i4b", - .d_maj = CDEV_MAJOR, }; static void i4battach(void *); diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index be746a184cb6..551ff0b55288 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -57,7 +57,6 @@ static d_open_t sscopen; static d_close_t sscclose; static d_ioctl_t sscioctl; -#define CDEV_MAJOR 97 static struct cdevsw ssc_cdevsw = { .d_open = sscopen, .d_close = sscclose, @@ -66,7 +65,6 @@ static struct cdevsw ssc_cdevsw = { .d_ioctl = sscioctl, .d_poll = ttypoll, .d_name = "ssc", - .d_maj = CDEV_MAJOR, }; static struct tty *ssc_tp = NULL; diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 5cc94086bcb5..5a506334d5c4 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -481,7 +481,6 @@ fdin_rd(fdc_p fdc) return bus_space_read_1(fdc->portt, fdc->porth, FDIN); } -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -490,7 +489,6 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 4b1277632024..e886e8cc9e4b 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -346,7 +346,6 @@ static driver_t psm_driver = { sizeof(struct psm_softc), }; -#define CDEV_MAJOR 21 static struct cdevsw psm_cdevsw = { .d_open = psmopen, @@ -355,7 +354,6 @@ static struct cdevsw psm_cdevsw = { .d_ioctl = psmioctl, .d_poll = psmpoll, .d_name = PSM_DRIVER_NAME, - .d_maj = CDEV_MAJOR, }; /* debug message level */ diff --git a/sys/net/bpf.c b/sys/net/bpf.c index f829e6260330..9a8d35a9e83d 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -126,7 +126,6 @@ static d_ioctl_t bpfioctl; static d_poll_t bpfpoll; static d_kqfilter_t bpfkqfilter; -#define CDEV_MAJOR 23 static struct cdevsw bpf_cdevsw = { .d_open = bpfopen, .d_close = bpfclose, @@ -135,7 +134,6 @@ static struct cdevsw bpf_cdevsw = { .d_ioctl = bpfioctl, .d_poll = bpfpoll, .d_name = "bpf", - .d_maj = CDEV_MAJOR, .d_kqfilter = bpfkqfilter, }; @@ -1598,7 +1596,7 @@ bpf_drvinit(unused) EVENTHANDLER_REGISTER(dev_clone, bpf_clone, 0, 1000); } -SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bpf_drvinit,NULL) +SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,bpf_drvinit,NULL) #else /* !DEV_BPF && !NETGRAPH_BPF */ /* diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index dd5ef6568f48..e353caf007fa 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -225,12 +225,6 @@ Static d_poll_t ubt_poll; Static void ubt_create_device_nodes (ubt_softc_p); Static void ubt_destroy_device_nodes (ubt_softc_p); -#if __FreeBSD_version < 500104 -#define CDEV_MAJOR 222 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif - Static struct cdevsw ubt_cdevsw = { .d_open = ubt_open, .d_close = ubt_close, @@ -239,7 +233,6 @@ Static struct cdevsw ubt_cdevsw = { .d_ioctl = ubt_ioctl, .d_poll = ubt_poll, .d_name = "ubt", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c index 8e4eeb2491d5..44e763fe73a8 100644 --- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c +++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c @@ -91,12 +91,6 @@ Static d_write_t ubtbcmfw_write; Static d_ioctl_t ubtbcmfw_ioctl; Static d_poll_t ubtbcmfw_poll; -#if __FreeBSD_version < 500104 -#define CDEV_MAJOR 223 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif - Static struct cdevsw ubtbcmfw_cdevsw = { .d_open = ubtbcmfw_open, .d_close = ubtbcmfw_close, @@ -105,7 +99,6 @@ Static struct cdevsw ubtbcmfw_cdevsw = { .d_ioctl = ubtbcmfw_ioctl, .d_poll = ubtbcmfw_poll, .d_name = "ubtbcmfw", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index b05c515b5c4b..ae3237fa33da 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -112,7 +112,6 @@ static d_write_t ngdwrite; static d_ioctl_t ngdioctl; static d_poll_t ngdpoll; -#define NGD_CDEV_MAJOR 20 static struct cdevsw ngd_cdevsw = { .d_open = ngdopen, .d_close = ngdclose, @@ -121,7 +120,6 @@ static struct cdevsw ngd_cdevsw = { .d_ioctl = ngdioctl, .d_poll = ngdpoll, .d_name = "ngd", - .d_maj = NGD_CDEV_MAJOR, }; /* diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 77961b3d8368..a2ebaa4ce381 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -622,7 +622,6 @@ fdin_rd(fdc_p fdc) } #endif /* PC98 */ -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -631,7 +630,6 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index e21e35400834..f17604617487 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -229,14 +229,12 @@ static d_close_t lptclose; static d_write_t lptwrite; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .d_open = lptopen, .d_close = lptclose, .d_write = lptwrite, .d_ioctl = lptioctl, .d_name = "lpt", - .d_maj = CDEV_MAJOR, }; static bus_addr_t lpt_iat[] = {0, 2, 4, 6}; diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 4e3467110e1c..6c865853ddb5 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -415,7 +415,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -424,7 +423,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index 77961b3d8368..a2ebaa4ce381 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -622,7 +622,6 @@ fdin_rd(fdc_p fdc) } #endif /* PC98 */ -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -631,7 +630,6 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index fe55e7f9a6b5..cc439a0b17ff 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -136,7 +136,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -144,7 +143,6 @@ static struct cdevsw mse_cdevsw = { .d_ioctl = mseioctl, .d_poll = msepoll, .d_name = "mse", - .d_maj = CDEV_MAJOR, }; static void mseintr(void *); diff --git a/sys/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c index e21e35400834..f17604617487 100644 --- a/sys/pc98/pc98/olpt.c +++ b/sys/pc98/pc98/olpt.c @@ -229,14 +229,12 @@ static d_close_t lptclose; static d_write_t lptwrite; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .d_open = lptopen, .d_close = lptclose, .d_write = lptwrite, .d_ioctl = lptioctl, .d_name = "lpt", - .d_maj = CDEV_MAJOR, }; static bus_addr_t lpt_iat[] = {0, 2, 4, 6}; diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 4e3467110e1c..6c865853ddb5 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -415,7 +415,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -424,7 +423,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c index 31a25d2633ca..878091716967 100644 --- a/sys/pc98/pc98/wd_cd.c +++ b/sys/pc98/pc98/wd_cd.c @@ -47,7 +47,6 @@ static d_close_t acdclose; static d_ioctl_t acdioctl; static d_strategy_t acdstrategy; -#define CDEV_MAJOR 69 static struct cdevsw acd_cdevsw = { .d_open = acdopen, @@ -57,7 +56,6 @@ static struct cdevsw acd_cdevsw = { .d_ioctl = acdioctl, .d_strategy = acdstrategy, .d_name = "wcd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index b1ef84a9692d..bc5f240c0ae1 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -80,11 +80,6 @@ static d_write_t crdwrite; static d_ioctl_t crdioctl; static d_poll_t crdpoll; -#if __FreeBSD_version < 500000 -#define CDEV_MAJOR 50 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif static struct cdevsw crd_cdevsw = { .d_open = crdopen, .d_close = crdclose, @@ -93,7 +88,6 @@ static struct cdevsw crd_cdevsw = { .d_ioctl = crdioctl, .d_poll = crdpoll, .d_name = "crd", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 2ae2b72e20ad..6f09660fad6a 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -63,7 +63,6 @@ MODULE_VERSION(agp, 1); MALLOC_DEFINE(M_AGP, "agp", "AGP data structures"); -#define CDEV_MAJOR 148 /* agp_drv.c */ static d_open_t agp_open; static d_close_t agp_close; @@ -76,7 +75,6 @@ static struct cdevsw agp_cdevsw = { .d_ioctl = agp_ioctl, .d_mmap = agp_mmap, .d_name = "agp", - .d_maj = CDEV_MAJOR, }; static devclass_t agp_devclass; diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index c5f3fc032ea2..9e8c8f1165e7 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -180,7 +180,6 @@ static struct ti_type ti_devs[] = { { 0, 0, NULL } }; -#define TI_CDEV_MAJOR 153 static d_open_t ti_open; static d_close_t ti_close; @@ -191,7 +190,6 @@ static struct cdevsw ti_cdevsw = { .d_close = ti_close, .d_ioctl = ti_ioctl2, .d_name = "ti", - .d_maj = TI_CDEV_MAJOR, }; static int ti_probe (device_t); -- cgit v1.3 From 8e1f1df0808acb885927a69c82d1af33e25060ad Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 21 Feb 2004 20:41:11 +0000 Subject: Device megapatch 3/6: Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. --- sys/alpha/alpha/promcons.c | 4 +--- sys/alpha/tlsb/zs_tlsb.c | 4 +--- sys/dev/cx/if_cx.c | 1 - sys/dev/cy/cy.c | 3 --- sys/dev/cy/cy_isa.c | 3 --- sys/dev/dcons/dcons.c | 4 +--- sys/dev/digi/digi.c | 2 -- sys/dev/nmdm/nmdm.c | 1 - sys/dev/ofw/ofw_console.c | 4 +--- sys/dev/rc/rc.c | 4 ---- sys/dev/rp/rp.c | 2 -- sys/dev/sab/sab.c | 4 ---- sys/dev/si/si.c | 3 --- sys/dev/sio/sio.c | 2 -- sys/dev/syscons/syscons.c | 3 --- sys/dev/syscons/sysmouse.c | 2 -- sys/dev/uart/uart_tty.c | 4 ---- sys/dev/usb/ucom.c | 2 -- sys/dev/zs/zs.c | 4 ---- sys/i386/isa/cy.c | 3 --- sys/i386/isa/istallion.c | 2 -- sys/i386/isa/pcvt/pcvt_drv.c | 4 ---- sys/i386/isa/stallion.c | 4 ---- sys/ia64/ia64/ssc.c | 4 +--- sys/kern/kern_conf.c | 8 ++++++++ sys/kern/tty.c | 19 ++++++++++++++++++- sys/kern/tty_pty.c | 3 --- sys/pc98/cbus/sio.c | 2 -- sys/pc98/pc98/sio.c | 2 -- 29 files changed, 31 insertions(+), 76 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 1800de6e624c..473f0fc515e5 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -66,11 +66,9 @@ static d_ioctl_t promioctl; static struct cdevsw prom_cdevsw = { .d_open = promopen, .d_close = promclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = promioctl, - .d_poll = ttypoll, .d_name = "prom", + .d_flags = D_TTY, }; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 55065e1f786f..035ac45678c7 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -73,11 +73,9 @@ static d_ioctl_t zsioctl; static struct cdevsw zs_cdevsw = { .d_open = zsopen, .d_close = zsclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = zsioctl, - .d_poll = ttypoll, .d_name = "zs", + .d_flags = D_TTY, }; static void zsstart(struct tty *); diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 7fb4247d6390..52fc80dcbce6 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -2555,7 +2555,6 @@ static struct cdevsw cx_cdevsw = { .d_read = cx_read, .d_write = cx_write, .d_ioctl = cx_ioctl, - .d_poll = ttypoll, .d_name = "cx", .d_maj = CDEV_MAJOR, .d_flags = D_TTY, diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 4351a3051de8..2a715c03046b 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -388,13 +388,10 @@ static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, - .d_read = ttyread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static int comconsole = -1; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 4351a3051de8..2a715c03046b 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -388,13 +388,10 @@ static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, - .d_read = ttyread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static int comconsole = -1; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 04d75494f1c6..8e6732626c09 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -90,11 +90,9 @@ static struct cdevsw dcons_cdevsw = { #if __FreeBSD_version >= 500104 .d_open = dcons_open, .d_close = dcons_close, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = dcons_ioctl, - .d_poll = ttypoll, .d_name = "dcons", + .d_flags = D_TTY, #else /* open */ dcons_open, /* close */ dcons_close, diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index f1bc67019e2a..87ebbef528c0 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -147,10 +147,8 @@ static struct cdevsw digi_sw = { .d_read = digiread, .d_write = digiwrite, .d_ioctl = digiioctl, - .d_poll = ttypoll, .d_name = driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter }; static void diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index f3440dda9f1e..27625068a08a 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -77,7 +77,6 @@ static struct cdevsw nmdm_cdevsw = { .d_read = nmdmread, .d_write = nmdmwrite, .d_ioctl = nmdmioctl, - .d_poll = ttypoll, .d_name = "nmdm", .d_flags = D_TTY | D_PSEUDO, }; diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index a4b5c8f98902..dd5537661e5e 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -55,11 +55,9 @@ static d_ioctl_t ofw_dev_ioctl; static struct cdevsw ofw_cdevsw = { .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_flags = D_TTY, }; static struct tty *ofw_tp = NULL; diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index f11537c4c82c..e519177db935 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -149,13 +149,9 @@ static d_ioctl_t rcioctl; static struct cdevsw rc_cdevsw = { .d_open = rcopen, .d_close = rcclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = rcioctl, - .d_poll = ttypoll, .d_name = "rc", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static devclass_t rc_devclass; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 98ae4a738bd3..1088de23496f 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -574,10 +574,8 @@ static d_ioctl_t rpioctl; struct cdevsw rp_cdevsw = { .d_open = rpopen, .d_close = rpclose, - .d_read = ttyread, .d_write = rpwrite, .d_ioctl = rpioctl, - .d_poll = ttypoll, .d_name = "rp", .d_flags = D_TTY, }; diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index aea2e16a0d56..36b6c1f9c53f 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -163,13 +163,9 @@ static int sabttyparam(struct tty *tp, struct termios *t); static struct cdevsw sabtty_cdevsw = { .d_open = sabttyopen, .d_close = sabttyclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = sabttyioctl, - .d_poll = ttypoll, .d_name = "sabtty", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static device_method_t sab_methods[] = { diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index a3fd213f0e65..fa0d9dba4f6d 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -120,13 +120,10 @@ static d_ioctl_t siioctl; static struct cdevsw si_cdevsw = { .d_open = siopen, .d_close = siclose, - .d_read = ttyread, .d_write = siwrite, .d_ioctl = siioctl, - .d_poll = ttypoll, .d_name = "si", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static int si_Nports; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 571265ddc65b..42c78b6fd587 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -328,10 +328,8 @@ static struct cdevsw sio_cdevsw = { .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = sio_driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; int comconsole = -1; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 88c6ade511d6..f05de849f341 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -221,14 +221,11 @@ static struct cdevsw sc_cdevsw = { .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 = ttykqfilter }; int diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index a7cff80c6bfe..08847a0dad5e 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -51,9 +51,7 @@ static d_ioctl_t smioctl; static struct cdevsw sm_cdevsw = { .d_open = smopen, .d_close = smclose, - .d_read = ttyread, .d_ioctl = smioctl, - .d_poll = ttypoll, .d_name = "sysmouse", .d_flags = D_TTY, }; diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 6724ba759624..66ce71658e25 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -69,13 +69,9 @@ static d_ioctl_t uart_tty_ioctl; static struct cdevsw uart_cdevsw = { .d_open = uart_tty_open, .d_close = uart_tty_close, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = uart_tty_ioctl, - .d_poll = ttypoll, .d_name = uart_driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static struct uart_devinfo uart_console; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 9298d087c18c..ad0a3d1ec099 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -133,13 +133,11 @@ static struct cdevsw ucom_cdevsw = { .d_read = ucomread, .d_write = ucomwrite, .d_ioctl = ucomioctl, - .d_poll = ttypoll, .d_name = "ucom", .d_flags = D_TTY, #if __FreeBSD_version < 500014 .d_bmaj = -1, #endif - .d_kqfilter = ttykqfilter, }; Static void ucom_cleanup(struct ucom_softc *); diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index a6e398f2c011..c3895a6457f2 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -154,13 +154,9 @@ static int zsttyparam(struct tty *tp, struct termios *t); static struct cdevsw zstty_cdevsw = { .d_open = zsttyopen, .d_close = zsttyclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = zsttyioctl, - .d_poll = ttypoll, .d_name = "zstty", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static struct zstty_softc *zstty_cons; diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 4351a3051de8..2a715c03046b 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -388,13 +388,10 @@ static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, - .d_read = ttyread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static int comconsole = -1; diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index e44400dc48a9..ee82892b6f14 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -648,10 +648,8 @@ static struct cdevsw stli_cdevsw = { .d_read = stliread, .d_write = stliwrite, .d_ioctl = stliioctl, - .d_poll = ttypoll, .d_name = stli_drvname, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; #endif diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 351048020351..af16af93b75c 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -97,14 +97,10 @@ static d_mmap_t pcvt_mmap; static struct cdevsw vt_cdevsw = { .d_open = pcvt_open, .d_close = pcvt_close, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = pcvt_ioctl, - .d_poll = ttypoll, .d_mmap = pcvt_mmap, .d_name = "vt", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; static int pcvt_probe(device_t dev); diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index 4665491dd57d..de0b2ccc9301 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -539,13 +539,9 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver); static struct cdevsw stl_cdevsw = { .d_open = stlopen, .d_close = stlclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = stlioctl, - .d_poll = ttypoll, .d_name = "stl", .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; #endif diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index 551ff0b55288..1f21be121773 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -60,11 +60,9 @@ static d_ioctl_t sscioctl; static struct cdevsw ssc_cdevsw = { .d_open = sscopen, .d_close = sscclose, - .d_read = ttyread, - .d_write = ttywrite, .d_ioctl = sscioctl, - .d_poll = ttypoll, .d_name = "ssc", + .d_flags = D_TTY, }; static struct tty *ssc_tp = NULL; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 62033c7e366a..19592ad56017 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage"); @@ -340,6 +341,13 @@ static void prep_cdevsw(struct cdevsw *devsw) { + if (devsw->d_flags & D_TTY) { + if (devsw->d_read == NULL) devsw->d_read = ttyread; + if (devsw->d_write == NULL) devsw->d_write = ttywrite; + if (devsw->d_kqfilter == NULL) devsw->d_kqfilter = ttykqfilter; + if (devsw->d_poll == NULL) devsw->d_poll = ttypoll; + } + if (devsw->d_open == NULL) devsw->d_open = null_open; if (devsw->d_close == NULL) devsw->d_close = null_close; if (devsw->d_read == NULL) devsw->d_read = no_read; diff --git a/sys/kern/tty.c b/sys/kern/tty.c index a3d8e3546119..65b9607f555d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1142,7 +1142,11 @@ ttypoll(dev_t dev, int events, struct thread *td) int revents = 0; struct tty *tp; + KASSERT(devsw(dev)->d_flags & D_TTY, + ("ttypoll() called on non D_TTY device (%s)", devtoname(dev))); tp = dev->si_tty; + KASSERT(tp != NULL, + ("ttypoll(): no tty pointer on device (%s)", devtoname(dev))); if (tp == NULL) /* XXX used to return ENXIO, but that means true! */ return ((events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)) | POLLHUP); @@ -1174,10 +1178,15 @@ static struct filterops ttywrite_filtops = int ttykqfilter(dev_t dev, struct knote *kn) { - struct tty *tp = dev->si_tty; + struct tty *tp; struct klist *klist; int s; + KASSERT(devsw(dev)->d_flags & D_TTY, + ("ttykqfilter() called on non D_TTY device (%s)", devtoname(dev))); + tp = dev->si_tty; + KASSERT(tp != NULL, + ("ttykqfilter(): no tty pointer on device (%s)", devtoname(dev))); switch (kn->kn_filter) { case EVFILT_READ: klist = &tp->t_rsel.si_note; @@ -2722,7 +2731,11 @@ ttyread(dev_t dev, struct uio *uio, int flag) { struct tty *tp; + KASSERT(devsw(dev)->d_flags & D_TTY, + ("ttyread() called on non D_TTY device (%s)", devtoname(dev))); tp = dev->si_tty; + KASSERT(tp != NULL, + ("ttyread(): no tty pointer on device (%s)", devtoname(dev))); if (tp == NULL) return (ENODEV); return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); @@ -2733,7 +2746,11 @@ ttywrite(dev_t dev, struct uio *uio, int flag) { struct tty *tp; + KASSERT(devsw(dev)->d_flags & D_TTY, + ("ttywrite() called on non D_TTY device (%s)", devtoname(dev))); tp = dev->si_tty; + KASSERT(tp != NULL, + ("ttywrite(): no tty pointer on device (%s)", devtoname(dev))); if (tp == NULL) return (ENODEV); return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index a01851d905e9..ab3ef5dbf1e4 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -85,11 +85,9 @@ static struct cdevsw pts_cdevsw = { .d_read = ptsread, .d_write = ptswrite, .d_ioctl = ptyioctl, - .d_poll = ttypoll, .d_name = "pts", .d_maj = CDEV_MAJOR_S, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; #define CDEV_MAJOR_C 6 @@ -103,7 +101,6 @@ static struct cdevsw ptc_cdevsw = { .d_name = "ptc", .d_maj = CDEV_MAJOR_C, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; #define BUFSIZ 100 /* Chunk size iomoved to/from user */ diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 6c865853ddb5..3c309c00a7ea 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -421,10 +421,8 @@ static struct cdevsw sio_cdevsw = { .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = sio_driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; int comconsole = -1; diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 6c865853ddb5..3c309c00a7ea 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -421,10 +421,8 @@ static struct cdevsw sio_cdevsw = { .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, - .d_poll = ttypoll, .d_name = sio_driver_name, .d_flags = D_TTY, - .d_kqfilter = ttykqfilter, }; int comconsole = -1; -- cgit v1.3 From dc08ffec870569914f44bcf26aa838310e343764 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 21 Feb 2004 21:10:55 +0000 Subject: Device megapatch 4/6: Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. --- sys/alpha/alpha/mem.c | 3 ++- sys/alpha/alpha/promcons.c | 3 ++- sys/alpha/tlsb/zs_tlsb.c | 3 ++- sys/amd64/amd64/mem.c | 3 ++- sys/cam/cam_xpt.c | 2 ++ sys/cam/scsi/scsi_ch.c | 2 ++ sys/cam/scsi/scsi_pass.c | 2 ++ sys/cam/scsi/scsi_pt.c | 2 ++ sys/cam/scsi/scsi_sa.c | 3 ++- sys/cam/scsi/scsi_ses.c | 2 ++ sys/cam/scsi/scsi_target.c | 2 ++ sys/coda/coda_fbsd.c | 2 ++ sys/contrib/ipfilter/netinet/ip_fil.c | 2 ++ sys/contrib/ipfilter/netinet/mlfk_ipl.c | 2 ++ sys/dev/aac/aac.c | 2 ++ sys/dev/acpica/acpi.c | 2 ++ sys/dev/adlink/adlink.c | 2 ++ sys/dev/agp/agp.c | 2 ++ sys/dev/amr/amr.c | 2 ++ sys/dev/asr/asr.c | 2 ++ sys/dev/ata/ata-all.c | 2 ++ sys/dev/ata/atapi-tape.c | 3 ++- sys/dev/atkbdc/psm.c | 2 ++ sys/dev/bktr/bktr_os.c | 2 ++ sys/dev/ciss/ciss.c | 3 ++- sys/dev/cx/if_cx.c | 3 ++- sys/dev/cy/cy.c | 3 ++- sys/dev/cy/cy_isa.c | 3 ++- sys/dev/dcons/dcons.c | 3 ++- sys/dev/digi/digi.c | 3 ++- sys/dev/drm/drm_drv.h | 3 ++- sys/dev/fb/fb.c | 2 ++ sys/dev/fdc/fdc.c | 3 ++- sys/dev/firewire/fwdev.c | 6 +++--- sys/dev/hfa/fore_load.c | 2 ++ sys/dev/ida/ida.c | 2 ++ sys/dev/iicbus/iic.c | 2 ++ sys/dev/iir/iir_ctrl.c | 2 ++ sys/dev/ips/ips.c | 2 ++ sys/dev/isp/isp_freebsd.c | 2 ++ sys/dev/joy/joy.c | 2 ++ sys/dev/kbd/kbd.c | 2 ++ sys/dev/led/led.c | 2 ++ sys/dev/matcd/matcd.c | 3 ++- sys/dev/mcd/mcd.c | 4 ++-- sys/dev/md/md.c | 2 ++ sys/dev/mlx/mlx.c | 3 ++- sys/dev/mly/mly.c | 3 ++- sys/dev/mse/mse.c | 2 ++ sys/dev/nmdm/nmdm.c | 5 +++-- sys/dev/null/null.c | 5 +++-- sys/dev/ofw/ofw_console.c | 4 ++-- sys/dev/ofw/openfirmio.c | 2 ++ sys/dev/ofw/openpromio.c | 2 ++ sys/dev/pci/pci_user.c | 2 ++ sys/dev/ppbus/lpt.c | 2 ++ sys/dev/ppbus/pcfclock.c | 2 ++ sys/dev/ppbus/ppi.c | 2 ++ sys/dev/ppbus/pps.c | 2 ++ sys/dev/raidframe/rf_freebsdkintf.c | 2 ++ sys/dev/random/randomdev.c | 2 ++ sys/dev/rc/rc.c | 3 ++- sys/dev/rp/rp.c | 3 ++- sys/dev/sab/sab.c | 3 ++- sys/dev/scd/scd.c | 3 ++- sys/dev/si/si.c | 3 ++- sys/dev/sio/sio.c | 3 ++- sys/dev/smbus/smb.c | 2 ++ sys/dev/snp/snp.c | 2 ++ sys/dev/sound/midi/midi.c | 2 ++ sys/dev/sound/midi/sequencer.c | 2 ++ sys/dev/sound/pcm/dsp.c | 2 ++ sys/dev/sound/pcm/mixer.c | 2 ++ sys/dev/sound/pcm/sndstat.c | 2 ++ sys/dev/speaker/spkr.c | 2 ++ sys/dev/streams/streams.c | 2 ++ sys/dev/syscons/syscons.c | 6 ++---- sys/dev/syscons/sysmouse.c | 3 ++- sys/dev/tdfx/tdfx_pci.c | 2 ++ sys/dev/tga/tga_pci.c | 2 ++ sys/dev/ti/if_ti.c | 2 ++ sys/dev/twe/twe_freebsd.c | 2 ++ sys/dev/uart/uart_tty.c | 3 ++- sys/dev/usb/ucom.c | 3 ++- sys/dev/usb/ufm.c | 2 ++ sys/dev/usb/ugen.c | 2 ++ sys/dev/usb/uhid.c | 2 ++ sys/dev/usb/ulpt.c | 2 ++ sys/dev/usb/ums.c | 2 ++ sys/dev/usb/urio.c | 2 ++ sys/dev/usb/usb.c | 2 ++ sys/dev/usb/uscanner.c | 2 ++ sys/dev/zs/zs.c | 3 ++- sys/fs/coda/coda_fbsd.c | 2 ++ sys/fs/specfs/spec_vnops.c | 16 ++++++++-------- sys/geom/geom_ctl.c | 2 ++ sys/geom/geom_dev.c | 3 ++- sys/i386/acpica/acpi_machdep.c | 2 ++ sys/i386/bios/apm.c | 2 ++ sys/i386/bios/smapi.c | 3 ++- sys/i386/i386/elan-mmcr.c | 2 ++ sys/i386/i386/mem.c | 3 ++- sys/i386/i386/perfmon.c | 2 ++ sys/i386/isa/asc.c | 2 ++ sys/i386/isa/ctx.c | 2 ++ sys/i386/isa/cy.c | 3 ++- sys/i386/isa/gpib.c | 2 ++ sys/i386/isa/gsc.c | 2 ++ sys/i386/isa/istallion.c | 3 ++- sys/i386/isa/mse.c | 2 ++ sys/i386/isa/pcvt/pcvt_drv.c | 4 ++-- sys/i386/isa/spic.c | 2 ++ sys/i386/isa/spigot.c | 2 ++ sys/i386/isa/spkr.c | 2 ++ sys/i386/isa/stallion.c | 3 ++- sys/i386/isa/wt.c | 2 ++ sys/i4b/driver/i4b_ctl.c | 2 ++ sys/i4b/driver/i4b_rbch.c | 2 ++ sys/i4b/driver/i4b_tel.c | 2 ++ sys/i4b/driver/i4b_trace.c | 2 ++ sys/i4b/layer4/i4b_i4bdrv.c | 2 ++ sys/ia64/ia64/mem.c | 3 ++- sys/ia64/ia64/ssc.c | 3 ++- sys/isa/fd.c | 3 ++- sys/isa/psm.c | 2 ++ sys/isa/vga_isa.c | 2 ++ sys/kern/kern_conf.c | 2 ++ sys/kern/kern_descrip.c | 2 ++ sys/kern/subr_bus.c | 2 ++ sys/kern/subr_devstat.c | 2 ++ sys/kern/subr_log.c | 2 ++ sys/kern/tty_cons.c | 3 ++- sys/kern/tty_pty.c | 6 ++++-- sys/kern/tty_tty.c | 3 ++- sys/net/bpf.c | 2 ++ sys/net/if.c | 2 ++ sys/net/if_tap.c | 2 ++ sys/net/if_tun.c | 2 ++ sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 2 ++ sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c | 2 ++ sys/netgraph/ng_device.c | 2 ++ sys/netncp/ncp_mod.c | 2 ++ sys/netsmb/smb_dev.c | 2 ++ sys/nfs4client/nfs4_dev.c | 2 ++ sys/opencrypto/cryptodev.c | 2 ++ sys/pc98/cbus/fdc.c | 3 ++- sys/pc98/cbus/gdc.c | 2 ++ sys/pc98/cbus/olpt.c | 2 ++ sys/pc98/cbus/sio.c | 3 ++- sys/pc98/pc98/fd.c | 3 ++- sys/pc98/pc98/mse.c | 2 ++ sys/pc98/pc98/olpt.c | 2 ++ sys/pc98/pc98/pc98gdc.c | 2 ++ sys/pc98/pc98/sio.c | 3 ++- sys/pc98/pc98/wd_cd.c | 3 ++- sys/pccard/pccard.c | 2 ++ sys/pci/agp.c | 2 ++ sys/pci/if_ti.c | 2 ++ sys/pci/xrpu.c | 2 ++ sys/sparc64/creator/creator_upa.c | 2 ++ sys/sparc64/sparc64/mem.c | 3 ++- sys/sys/conf.h | 9 ++++++++- sys/sys/linedisc.h | 9 ++++++++- 163 files changed, 349 insertions(+), 73 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/mem.c b/sys/alpha/alpha/mem.c index 7edc6f13dd92..6c30c9796603 100644 --- a/sys/alpha/alpha/mem.c +++ b/sys/alpha/alpha/mem.c @@ -83,6 +83,7 @@ static d_mmap_t memmmap; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, @@ -91,7 +92,7 @@ static struct cdevsw mem_cdevsw = { .d_mmap = memmmap, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; struct mem_range_softc mem_range_softc; diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 473f0fc515e5..4d41abced4f0 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -64,11 +64,12 @@ static d_close_t promclose; static d_ioctl_t promioctl; static struct cdevsw prom_cdevsw = { + .d_version = D_VERSION, .d_open = promopen, .d_close = promclose, .d_ioctl = promioctl, .d_name = "prom", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 035ac45678c7..749dd6da5eb8 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -71,11 +71,12 @@ static d_close_t zsclose; static d_ioctl_t zsioctl; static struct cdevsw zs_cdevsw = { + .d_version = D_VERSION, .d_open = zsopen, .d_close = zsclose, .d_ioctl = zsioctl, .d_name = "zs", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static void zsstart(struct tty *); diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index c2c702f0b464..74c6e10c1135 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -81,6 +81,7 @@ static d_mmap_t memmmap; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, @@ -89,7 +90,7 @@ static struct cdevsw mem_cdevsw = { .d_mmap = memmmap, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 03eaf544439e..7e3bfce96196 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -636,6 +636,8 @@ static d_close_t xptclose; static d_ioctl_t xptioctl; static struct cdevsw xpt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = xptopen, .d_close = xptclose, .d_ioctl = xptioctl, diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index a9ed37376c23..7caaf0a2d2a2 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -212,6 +212,8 @@ static struct periph_driver chdriver = PERIPHDRIVER_DECLARE(ch, chdriver); static struct cdevsw ch_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = chopen, .d_close = chclose, .d_ioctl = chioctl, diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index 13c1017e5ca1..67c73d9216c2 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -105,6 +105,8 @@ static struct periph_driver passdriver = PERIPHDRIVER_DECLARE(pass, passdriver); static struct cdevsw pass_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = passopen, .d_close = passclose, .d_ioctl = passioctl, diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index cc3afa6ce58c..9e053f88d09a 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -118,6 +118,8 @@ PERIPHDRIVER_DECLARE(pt, ptdriver); static struct cdevsw pt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ptopen, .d_close = ptclose, .d_read = physread, diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index c41e4166ef91..b1fbd225a74e 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -425,6 +425,7 @@ PERIPHDRIVER_DECLARE(sa, sadriver); static struct cdevsw sa_cdevsw = { + .d_version = D_VERSION, .d_open = saopen, .d_close = saclose, .d_read = physread, @@ -432,7 +433,7 @@ static struct cdevsw sa_cdevsw = { .d_ioctl = saioctl, .d_strategy = sastrategy, .d_name = "sa", - .d_flags = D_TAPE, + .d_flags = D_TAPE | D_NEEDGIANT, }; static int diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index 8f594ae2bcd5..a0a2f14b3802 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -175,10 +175,12 @@ static struct periph_driver sesdriver = { PERIPHDRIVER_DECLARE(ses, sesdriver); static struct cdevsw ses_cdevsw = { + .d_version = D_VERSION, .d_open = sesopen, .d_close = sesclose, .d_ioctl = sesioctl, .d_name = "ses", + .d_flags = D_NEEDGIANT, }; static void diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 7e0d28fbd83b..9310efe434aa 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -105,6 +105,8 @@ static struct filterops targread_filtops = { 1, NULL, targreadfiltdetach, targreadfilt }; static struct cdevsw targ_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = targopen, .d_close = targclose, .d_read = targread, diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 1c061b1ae6ef..9dc260c04ee5 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #define VC_DEV_NO 93 static struct cdevsw codadevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = vc_nb_open, .d_close = vc_nb_close, .d_read = vc_nb_read, diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 6b9bafb053da..8a36dc3aae5e 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -206,6 +206,8 @@ toid_t ipfr_slowtimer_ch; defined(_KERNEL) # include const struct cdevsw ipl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, iplopen, iplclose, iplread, nowrite, iplioctl, nostop, notty, nopoll, nommap, }; diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index f1500039bb8f..df1bb75a2cfe 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -105,6 +105,8 @@ SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW, #define CDEV_MAJOR 79 static struct cdevsw ipl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = iplopen, .d_close = iplclose, .d_read = iplread, diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 0d08883e26e8..77e18c8345ee 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -181,6 +181,8 @@ static int aac_return_aif(struct aac_softc *sc, caddr_t uptr); static int aac_query_disk(struct aac_softc *sc, caddr_t uptr); static struct cdevsw aac_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = aac_open, .d_close = aac_close, .d_ioctl = aac_ioctl, diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 3c7b038e9a85..aefd7e925dd8 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -67,6 +67,8 @@ static d_close_t acpiclose; static d_ioctl_t acpiioctl; static struct cdevsw acpi_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = acpiopen, .d_close = acpiclose, .d_ioctl = acpiioctl, diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c index 909f2ba9a28c..f8a7253f6cc3 100644 --- a/sys/dev/adlink/adlink.c +++ b/sys/dev/adlink/adlink.c @@ -393,6 +393,8 @@ adlink_intr(void *arg) } static struct cdevsw adlink_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = adlink_open, .d_ioctl = adlink_ioctl, .d_mmap = adlink_mmap, diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 6f09660fad6a..6a01e20565ed 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -70,6 +70,8 @@ static d_ioctl_t agp_ioctl; static d_mmap_t agp_mmap; static struct cdevsw agp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = agp_open, .d_close = agp_close, .d_ioctl = agp_ioctl, diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 8eece8e05b6f..0fce75505c24 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -91,6 +91,8 @@ static d_close_t amr_close; static d_ioctl_t amr_ioctl; static struct cdevsw amr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = amr_open, .d_close = amr_close, .d_ioctl = amr_ioctl, diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 481ff305d882..2d2ba205d153 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -578,6 +578,8 @@ DATA_SET (mode0_pciset, mode0_pcidev); */ #define CDEV_MAJOR 154 /* preferred default character major */ STATIC struct cdevsw asr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = asr_open, .d_close = asr_close, .d_ioctl = asr_ioctl, diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index bd59faf2b44f..27c2c1360b3e 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); /* device structures */ static d_ioctl_t ata_ioctl; static struct cdevsw ata_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = ata_ioctl, .d_name = "ata", }; diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index cd45cd0000ea..aef27a688325 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -53,6 +53,7 @@ static d_close_t ast_close; static d_ioctl_t ast_ioctl; static d_strategy_t ast_strategy; static struct cdevsw ast_cdevsw = { + .d_version = D_VERSION, .d_open = ast_open, .d_close = ast_close, .d_read = physread, @@ -61,7 +62,7 @@ static struct cdevsw ast_cdevsw = { .d_strategy = ast_strategy, .d_name = "ast", .d_maj = 119, - .d_flags = D_TAPE | D_TRACKCLOSE | D_NOGIANT, + .d_flags = D_TAPE | D_TRACKCLOSE, }; /* prototypes */ diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index e886e8cc9e4b..dd2fd7e2cc89 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -348,6 +348,8 @@ static driver_t psm_driver = { static struct cdevsw psm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = psmopen, .d_close = psmclose, .d_read = psmread, diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index 92c7fbea8d74..be2ed086d391 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -258,6 +258,8 @@ static d_mmap_t bktr_mmap; static d_poll_t bktr_poll; static struct cdevsw bktr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = bktr_open, .d_close = bktr_close, .d_read = bktr_read, diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 843577de431d..9a4603c95e14 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -212,8 +212,9 @@ static d_open_t ciss_open; static d_close_t ciss_close; static d_ioctl_t ciss_ioctl; - static struct cdevsw ciss_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ciss_open, .d_close = ciss_close, .d_ioctl = ciss_ioctl, diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 52fc80dcbce6..842348eb1f72 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -2550,6 +2550,7 @@ static struct cdevsw cx_cdevsw = { }; #else /* __FreeBSD_version > 501000 */ static struct cdevsw cx_cdevsw = { + .d_version = D_VERSION, .d_open = cx_open, .d_close = cx_close, .d_read = cx_read, @@ -2557,7 +2558,7 @@ static struct cdevsw cx_cdevsw = { .d_ioctl = cx_ioctl, .d_name = "cx", .d_maj = CDEV_MAJOR, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #endif diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 2a715c03046b..7207846b6380 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -386,12 +386,13 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int comconsole = -1; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 2a715c03046b..7207846b6380 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -386,12 +386,13 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int comconsole = -1; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 8e6732626c09..d798f84f8f11 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -88,11 +88,12 @@ static d_ioctl_t dcons_ioctl; static struct cdevsw dcons_cdevsw = { #if __FreeBSD_version >= 500104 + .d_version = D_VERSION, .d_open = dcons_open, .d_close = dcons_close, .d_ioctl = dcons_ioctl, .d_name = "dcons", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, #else /* open */ dcons_open, /* close */ dcons_close, diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 87ebbef528c0..e2cb568fe1dd 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -142,13 +142,14 @@ const struct digi_control_signals digi_normal_signals = { }; static struct cdevsw digi_sw = { + .d_version = D_VERSION, .d_open = digiopen, .d_close = digiclose, .d_read = digiread, .d_write = digiwrite, .d_ioctl = digiioctl, .d_name = driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static void diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index e0dfbccf5257..848794ae1cfc 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -212,6 +212,7 @@ const char *DRM(find_description)(int vendor, int device); #ifdef __FreeBSD__ static struct cdevsw DRM(cdevsw) = { + .d_version = D_VERSION, .d_open = DRM( open ), .d_close = DRM( close ), .d_read = DRM( read ), @@ -219,7 +220,7 @@ static struct cdevsw DRM(cdevsw) = { .d_poll = DRM( poll ), .d_mmap = DRM( mmap ), .d_name = DRIVER_NAME, - .d_flags = D_TRACKCLOSE, + .d_flags = D_TRACKCLOSE | D_NEEDGIANT, #if __FreeBSD_version < 500000 .d_bmaj = -1 #endif diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index 5ce670841029..38b967092795 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -363,6 +363,8 @@ static d_mmap_t fbmmap; static struct cdevsw fb_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = fbopen, .d_close = fbclose, .d_read = fbread, diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 5a506334d5c4..808c537e3f0f 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -482,6 +482,7 @@ fdin_rd(fdc_p fdc) } static struct cdevsw fd_cdevsw = { + .d_version = D_VERSION, .d_open = fdopen, .d_close = fdclose, .d_read = physread, @@ -489,7 +490,7 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; /* diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 9a34ff95fd3c..b5a7d5d03c41 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -73,9 +73,9 @@ static d_write_t fw_write; static d_mmap_t fw_mmap; static d_strategy_t fw_strategy; -struct cdevsw firewire_cdevsw = -{ +struct cdevsw firewire_cdevsw = { #if __FreeBSD_version >= 500104 + .d_version = D_VERSION, .d_open = fw_open, .d_close = fw_close, .d_read = fw_read, @@ -85,7 +85,7 @@ struct cdevsw firewire_cdevsw = .d_mmap = fw_mmap, .d_strategy = fw_strategy, .d_name = "fw", - .d_flags = D_MEM + .d_flags = D_MEM | D_NEEDGIANT #else fw_open, fw_close, fw_read, fw_write, fw_ioctl, fw_poll, fw_mmap, fw_strategy, "fw", CDEV_MAJOR, diff --git a/sys/dev/hfa/fore_load.c b/sys/dev/hfa/fore_load.c index fffdf654632e..77ddaaeabd4d 100644 --- a/sys/dev/hfa/fore_load.c +++ b/sys/dev/hfa/fore_load.c @@ -505,6 +505,8 @@ fore_reset(fup) * Driver entry points */ static struct cdevsw fore_cdev = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_maj = -1, }; diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index db4813eecdfb..47f27a78bd4c 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -66,6 +66,8 @@ static int ida_wait(struct ida_softc *ida, struct ida_qcb *qcb); static d_ioctl_t ida_ioctl; static struct cdevsw ida_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = ida_ioctl, .d_name = "ida", }; diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index 0951f1f5847d..7f4221a60dd5 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -93,6 +93,8 @@ static d_read_t iicread; static d_ioctl_t iicioctl; static struct cdevsw iic_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = iicopen, .d_close = iicclose, .d_read = iicread, diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c index 8417595ef427..9aeb099ecc67 100644 --- a/sys/dev/iir/iir_ctrl.c +++ b/sys/dev/iir/iir_ctrl.c @@ -70,6 +70,8 @@ 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 = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = iir_open, .d_close = iir_close, .d_read = iir_read, diff --git a/sys/dev/ips/ips.c b/sys/dev/ips/ips.c index 9b076d299d11..d735f83be97f 100644 --- a/sys/dev/ips/ips.c +++ b/sys/dev/ips/ips.c @@ -38,6 +38,8 @@ static d_close_t ips_close; static d_ioctl_t ips_ioctl; static struct cdevsw ips_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ips_open, .d_close = ips_close, .d_ioctl = ips_ioctl, diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index e7526ab94207..460d43001468 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -53,6 +53,8 @@ static void isp_action(struct cam_sim *, union ccb *); static struct cdevsw isp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = ispioctl, .d_name = "isp", }; diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 2ef286bebef9..4746e77b49a0 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -69,6 +69,8 @@ static d_read_t joyread; static d_ioctl_t joyioctl; static struct cdevsw joy_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = joyopen, .d_close = joyclose, .d_read = joyread, diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c index e7a67db70957..485ce709d6b8 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -433,6 +433,8 @@ static d_poll_t genkbdpoll; static struct cdevsw kbd_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = genkbdopen, .d_close = genkbdclose, .d_read = genkbdread, diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c index 77c68efe9ca6..7177547c39d0 100644 --- a/sys/dev/led/led.c +++ b/sys/dev/led/led.c @@ -211,6 +211,8 @@ led_write(dev_t dev, struct uio *uio, int ioflag) } static struct cdevsw led_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_write = led_write, .d_name = "LED", }; diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c index bc57012c93dc..9e28d25c7013 100644 --- a/sys/dev/matcd/matcd.c +++ b/sys/dev/matcd/matcd.c @@ -740,6 +740,7 @@ static int matcd_pitch(int ldrive, int cdrive, int controller, ---------------------------------------------------------------------------*/ static struct cdevsw matcd_cdevsw = { + .d_version = D_VERSION, .d_open = matcdopen, /* open */ .d_close = matcdclose, /* close */ .d_read = physread, /* read */ @@ -750,7 +751,7 @@ static struct cdevsw matcd_cdevsw = { .d_strategy = matcdstrategy, /* strategy */ .d_name = "matcd", /* name */ .d_maj = RAW_DEVICE, /* maj */ - .d_flags = D_DISK, /* flags */ + .d_flags = D_DISK | D_NEEDGIANT, }; diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 285d57dcbf24..ebc233e89002 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -160,15 +160,15 @@ static d_close_t mcdclose; static d_ioctl_t mcdioctl; static d_strategy_t mcdstrategy; - static struct cdevsw mcd_cdevsw = { + .d_version = D_VERSION, .d_open = mcdopen, .d_close = mcdclose, .d_read = physread, .d_ioctl = mcdioctl, .d_strategy = mcdstrategy, .d_name = "mcd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; #define MCD_RETRYS 5 diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index b0f179504d83..9b68ce291148 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -116,6 +116,8 @@ static dev_t status_dev = 0; static d_ioctl_t mdctlioctl; static struct cdevsw mdctl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = mdctlioctl, .d_name = MD_NAME, }; diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index bf9412c1e989..67d1b2b49f80 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -53,8 +53,9 @@ #include #include - static struct cdevsw mlx_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mlx_open, .d_close = mlx_close, .d_ioctl = mlx_ioctl, diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index 6dacf2778fd7..5f4c1eca06bb 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -149,8 +149,9 @@ static driver_t mly_pci_driver = { static devclass_t mly_devclass; DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0); - static struct cdevsw mly_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mly_user_open, .d_close = mly_user_close, .d_ioctl = mly_user_ioctl, diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index b2c821b59154..8cd40f1bbd03 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -140,6 +140,8 @@ static d_ioctl_t mseioctl; static d_poll_t msepoll; static struct cdevsw mse_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mseopen, .d_close = mseclose, .d_read = mseread, diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 27625068a08a..22b9b51fb768 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -72,13 +72,14 @@ static d_write_t nmdmwrite; static d_ioctl_t nmdmioctl; static struct cdevsw nmdm_cdevsw = { + .d_version = D_VERSION, .d_open = nmdmopen, .d_close = nmdmclose, .d_read = nmdmread, .d_write = nmdmwrite, .d_ioctl = nmdmioctl, - .d_name = "nmdm", - .d_flags = D_TTY | D_PSEUDO, + .d_name = "nmdn", + .d_flags = D_TTY | D_PSEUDO | D_NEEDGIANT, }; #define BUFSIZ 100 /* Chunk size iomoved to/from user */ diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 84dae3010ddf..314f460fe544 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -52,20 +52,21 @@ static d_read_t zero_read; #define ZERO_MINOR 12 static struct cdevsw null_cdevsw = { + .d_version = D_VERSION, .d_read = (d_read_t *)nullop, .d_write = null_write, .d_ioctl = null_ioctl, .d_name = "null", .d_maj = CDEV_MAJOR, - .d_flags = D_NOGIANT, }; static struct cdevsw zero_cdevsw = { + .d_version = D_VERSION, .d_read = zero_read, .d_write = null_write, .d_name = "zero", .d_maj = CDEV_MAJOR, - .d_flags = D_MMAP_ANON | D_NOGIANT, + .d_flags = D_MMAP_ANON, }; static void *zbuf; diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index dd5537661e5e..506b894aeacf 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -51,13 +51,13 @@ static d_open_t ofw_dev_open; static d_close_t ofw_dev_close; static d_ioctl_t ofw_dev_ioctl; - static struct cdevsw ofw_cdevsw = { + .d_version = D_VERSION, .d_open = ofw_dev_open, .d_close = ofw_dev_close, .d_ioctl = ofw_dev_ioctl, .d_name = "ofw", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static struct tty *ofw_tp = NULL; diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c index 37f10b5202a9..8d8302249c9f 100644 --- a/sys/dev/ofw/openfirmio.c +++ b/sys/dev/ofw/openfirmio.c @@ -67,6 +67,8 @@ static d_ioctl_t openfirm_ioctl; #define OPENFIRM_MINOR 0 static struct cdevsw openfirm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = openfirm_ioctl, .d_name = "openfirm", }; diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c index d4c98518b4ab..5bf5e698d1c6 100644 --- a/sys/dev/ofw/openpromio.c +++ b/sys/dev/ofw/openpromio.c @@ -58,6 +58,8 @@ static int openprom_node_valid(phandle_t node); static int openprom_node_search(phandle_t root, phandle_t node); static struct cdevsw openprom_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = openprom_open, .d_close = openprom_close, .d_ioctl = openprom_ioctl, diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 3c279781ed54..0ce8da9e3f4e 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -74,6 +74,8 @@ static d_ioctl_t pci_ioctl; #endif struct cdevsw pcicdev = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = pci_open, .d_close = pci_close, .d_ioctl = pci_ioctl, diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index 687e7ade284f..f0bdea72e3d0 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -190,6 +190,8 @@ static d_read_t lptread; static d_ioctl_t lptioctl; static struct cdevsw lpt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = lptopen, .d_close = lptclose, .d_read = lptread, diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c index bf0a01d64430..fd4c010d66f2 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -68,6 +68,8 @@ static d_close_t pcfclock_close; static d_read_t pcfclock_read; static struct cdevsw pcfclock_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = pcfclock_open, .d_close = pcfclock_close, .d_read = pcfclock_read, diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index c2783a66ea71..7df5851ca03a 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -91,6 +91,8 @@ static d_write_t ppiwrite; static d_read_t ppiread; static struct cdevsw ppi_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ppiopen, .d_close = ppiclose, .d_read = ppiread, diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index e7e1373ed3cd..20a8b02e7054 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -63,6 +63,8 @@ static d_close_t ppsclose; static d_ioctl_t ppsioctl; static struct cdevsw pps_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ppsopen, .d_close = ppsclose, .d_ioctl = ppsioctl, diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c index 78490f8266f3..0dfc43623e01 100644 --- a/sys/dev/raidframe/rf_freebsdkintf.c +++ b/sys/dev/raidframe/rf_freebsdkintf.c @@ -215,6 +215,8 @@ d_close_t raidctlclose; d_ioctl_t raidctlioctl; static struct cdevsw raidctl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = raidctlopen, .d_close = raidctlclose, .d_ioctl = raidctlioctl, diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index d0e272eea48b..bc5f1666b1ad 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -64,6 +64,8 @@ static d_poll_t random_poll; #define RANDOM_FIFO_MAX 256 /* How many events to queue up */ static struct cdevsw random_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_close = random_close, .d_read = random_read, .d_write = random_write, diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index e519177db935..b7a8e12298f5 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -147,11 +147,12 @@ static d_close_t rcclose; static d_ioctl_t rcioctl; static struct cdevsw rc_cdevsw = { + .d_version = D_VERSION, .d_open = rcopen, .d_close = rcclose, .d_ioctl = rcioctl, .d_name = "rc", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static devclass_t rc_devclass; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 1088de23496f..3f9f49f33ac8 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -572,12 +572,13 @@ static d_write_t rpwrite; static d_ioctl_t rpioctl; struct cdevsw rp_cdevsw = { + .d_version = D_VERSION, .d_open = rpopen, .d_close = rpclose, .d_write = rpwrite, .d_ioctl = rpioctl, .d_name = "rp", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int rp_num_ports_open = 0; diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index 36b6c1f9c53f..af1bf131278d 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -161,11 +161,12 @@ static void sabttystop(struct tty *tp, int rw); static int sabttyparam(struct tty *tp, struct termios *t); static struct cdevsw sabtty_cdevsw = { + .d_version = D_VERSION, .d_open = sabttyopen, .d_close = sabttyclose, .d_ioctl = sabttyioctl, .d_name = "sabtty", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static device_method_t sab_methods[] = { diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index d455e095902f..2a66a00189c7 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -147,13 +147,14 @@ static d_strategy_t scdstrategy; static struct cdevsw scd_cdevsw = { + .d_version = D_VERSION, .d_open = scdopen, .d_close = scdclose, .d_read = physread, .d_ioctl = scdioctl, .d_strategy = scdstrategy, .d_name = "scd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; int diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index fa0d9dba4f6d..1b76ad07abcc 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -118,12 +118,13 @@ static d_write_t siwrite; static d_ioctl_t siioctl; static struct cdevsw si_cdevsw = { + .d_version = D_VERSION, .d_open = siopen, .d_close = siclose, .d_write = siwrite, .d_ioctl = siioctl, .d_name = "si", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int si_Nports; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 42c78b6fd587..93ed290e076d 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -323,13 +323,14 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = sio_driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; int comconsole = -1; diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index 280bda52da49..85ab273b8b6a 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -88,6 +88,8 @@ static d_read_t smbread; static d_ioctl_t smbioctl; static struct cdevsw smb_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = smbopen, .d_close = smbclose, .d_read = smbread, diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 2c1c3c6fd6ba..543a7242b2b4 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -39,6 +39,8 @@ static d_ioctl_t snpioctl; static d_poll_t snppoll; static struct cdevsw snp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = snpopen, .d_close = snpclose, .d_read = snpread, diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 2da6415dee82..a9d018496bd7 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -70,6 +70,8 @@ static int midi_readstatus(char *buf, int *ptr, struct uio *uio); #define CDEV_MAJOR MIDI_CDEV_MAJOR static struct cdevsw midi_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = midiopen, .d_close = midiclose, .d_read = midiread, diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c index 17c79efaaaf2..bea493616d40 100644 --- a/sys/dev/sound/midi/sequencer.c +++ b/sys/dev/sound/midi/sequencer.c @@ -135,6 +135,8 @@ static d_poll_t seqpoll; #define CDEV_MAJOR SEQ_CDEV_MAJOR static struct cdevsw seq_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = seqopen, .d_close = seqclose, .d_read = seqread, diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index cffbe6bb1640..ac00603b8d48 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -42,6 +42,8 @@ static d_poll_t dsp_poll; static d_mmap_t dsp_mmap; struct cdevsw dsp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = dsp_open, .d_close = dsp_close, .d_read = dsp_read, diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 61d6c09003f6..b5a67edfc61f 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -73,6 +73,8 @@ static d_open_t mixer_open; static d_close_t mixer_close; static struct cdevsw mixer_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mixer_open, .d_close = mixer_close, .d_ioctl = mixer_ioctl, diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index 77c63f3eb78b..e96a8025fde5 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -41,6 +41,8 @@ static d_close_t sndstat_close; static d_read_t sndstat_read; static struct cdevsw sndstat_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = sndstat_open, .d_close = sndstat_close, .d_read = sndstat_read, diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index e82ef46c9f40..e73ab8d73324 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -34,6 +34,8 @@ static d_write_t spkrwrite; static d_ioctl_t spkrioctl; static struct cdevsw spkr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spkropen, .d_close = spkrclose, .d_write = spkrwrite, diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 8e5ac5713bbd..b67e39b83862 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -102,6 +102,8 @@ static struct fileops svr4_netops = { }; static struct cdevsw streams_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = streamsopen, .d_name = "streams", }; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index f05de849f341..69ab21ff412e 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -194,8 +194,6 @@ static int update_kbd_state(scr_stat *scp, int state, int mask); static int update_kbd_leds(scr_stat *scp, int which); static timeout_t blink_screen; -#define CDEV_MAJOR 12 - static cn_probe_t sccnprobe; static cn_init_t sccninit; static cn_getc_t sccngetc; @@ -218,14 +216,14 @@ static d_ioctl_t scioctl; static d_mmap_t scmmap; static struct cdevsw sc_cdevsw = { + .d_version = D_VERSION, .d_open = scopen, .d_close = scclose, .d_read = scread, .d_ioctl = scioctl, .d_mmap = scmmap, .d_name = "sc", - .d_maj = CDEV_MAJOR, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; int diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 08847a0dad5e..7aa72cffd31c 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -49,11 +49,12 @@ static d_close_t smclose; static d_ioctl_t smioctl; static struct cdevsw sm_cdevsw = { + .d_version = D_VERSION, .d_open = smopen, .d_close = smclose, .d_ioctl = smioctl, .d_name = "sysmouse", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; /* local variables */ diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index dda1eb5a27eb..ac07d80b27cf 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -104,6 +104,8 @@ LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX); /* Char. Dev. file operations structure */ static struct cdevsw tdfx_cdev = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = tdfx_open, .d_close = tdfx_close, .d_ioctl = tdfx_ioctl, diff --git a/sys/dev/tga/tga_pci.c b/sys/dev/tga/tga_pci.c index f6f336dfa73c..902b7daea3ae 100644 --- a/sys/dev/tga/tga_pci.c +++ b/sys/dev/tga/tga_pci.c @@ -100,6 +100,8 @@ static struct gfb_type tga_devs[] = { #ifdef FB_INSTALL_CDEV static struct cdevsw tga_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = pcigfb_open, .d_close = pcigfb_close, .d_read = pcigfb_read, diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 9e8c8f1165e7..b0118d63d982 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -186,6 +186,8 @@ static d_close_t ti_close; static d_ioctl_t ti_ioctl2; static struct cdevsw ti_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ti_open, .d_close = ti_close, .d_ioctl = ti_ioctl2, diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 6a3a8ff09db3..32175c13a379 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -67,6 +67,8 @@ static d_close_t twe_close; static d_ioctl_t twe_ioctl_wrapper; static struct cdevsw twe_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = twe_open, .d_close = twe_close, .d_ioctl = twe_ioctl_wrapper, diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 66ce71658e25..94ddb953052b 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -67,11 +67,12 @@ static d_close_t uart_tty_close; static d_ioctl_t uart_tty_ioctl; static struct cdevsw uart_cdevsw = { + .d_version = D_VERSION, .d_open = uart_tty_open, .d_close = uart_tty_close, .d_ioctl = uart_tty_ioctl, .d_name = uart_driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static struct uart_devinfo uart_console; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index ad0a3d1ec099..4bea235f68a9 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -128,13 +128,14 @@ Static d_ioctl_t ucomioctl; static struct cdevsw ucom_cdevsw = { + .d_version = D_VERSION, .d_open = ucomopen, .d_close = ucomclose, .d_read = ucomread, .d_write = ucomwrite, .d_ioctl = ucomioctl, .d_name = "ucom", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, #if __FreeBSD_version < 500014 .d_bmaj = -1, #endif diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c index 26916f1f4f39..db008ea91eb4 100644 --- a/sys/dev/usb/ufm.c +++ b/sys/dev/usb/ufm.c @@ -89,6 +89,8 @@ d_close_t ufmclose; d_ioctl_t ufmioctl; Static struct cdevsw ufm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ufmopen, .d_close = ufmclose, .d_ioctl = ufmioctl, diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 408d14b06bdc..a9074235254b 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -151,6 +151,8 @@ d_poll_t ugenpoll; Static struct cdevsw ugen_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ugenopen, .d_close = ugenclose, .d_read = ugenread, diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index ec46474a1c0b..a574d1f0279f 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -156,6 +156,8 @@ d_poll_t uhidpoll; Static struct cdevsw uhid_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = uhidopen, .d_close = uhidclose, .d_read = uhidread, diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 3dadd00633f2..48aeb0956edc 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -147,6 +147,8 @@ Static d_ioctl_t ulptioctl; Static struct cdevsw ulpt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ulptopen, .d_close = ulptclose, .d_write = ulptwrite, diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 4c0d598045da..2104ee3b1d70 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -154,6 +154,8 @@ Static d_poll_t ums_poll; Static struct cdevsw ums_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ums_open, .d_close = ums_close, .d_read = ums_read, diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 57979cdf3f38..eaec4e5b1007 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -117,6 +117,8 @@ d_ioctl_t urioioctl; Static struct cdevsw urio_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = urioopen, .d_close = urioclose, .d_read = urioread, diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 6ff8ed3e81e8..44a554449b51 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -146,6 +146,8 @@ d_ioctl_t usbioctl; d_poll_t usbpoll; struct cdevsw usb_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = usbopen, .d_close = usbclose, .d_read = usbread, diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index ab46721c113a..02b8e0e5e786 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -268,6 +268,8 @@ d_poll_t uscannerpoll; Static struct cdevsw uscanner_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = uscanneropen, .d_close = uscannerclose, .d_read = uscannerread, diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index c3895a6457f2..5f5ceb88b5af 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -152,11 +152,12 @@ static void zsttystop(struct tty *tp, int rw); static int zsttyparam(struct tty *tp, struct termios *t); static struct cdevsw zstty_cdevsw = { + .d_version = D_VERSION, .d_open = zsttyopen, .d_close = zsttyclose, .d_ioctl = zsttyioctl, .d_name = "zstty", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static struct zstty_softc *zstty_cons; diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 1c061b1ae6ef..9dc260c04ee5 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #define VC_DEV_NO 93 static struct cdevsw codadevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = vc_nb_open, .d_close = vc_nb_close, .d_read = vc_nb_read, diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 31d9bfe9f578..4682b5df6190 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -194,7 +194,7 @@ spec_open(ap) vp->v_vflag |= VV_ISTTY; VOP_UNLOCK(vp, 0, td); - if(dsw->d_flags & D_NOGIANT) { + if(!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); if (dsw->d_fdopen != NULL) error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fdidx); @@ -267,7 +267,7 @@ spec_read(ap) dsw = devsw(dev); VOP_UNLOCK(vp, 0, td); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_read(dev, uio, ap->a_ioflag); PICKUP_GIANT(); @@ -307,7 +307,7 @@ spec_write(ap) resid = uio->uio_resid; VOP_UNLOCK(vp, 0, td); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_write(dev, uio, ap->a_ioflag); PICKUP_GIANT(); @@ -342,7 +342,7 @@ spec_ioctl(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_ioctl(dev, ap->a_command, ap->a_data, ap->a_fflag, ap->a_td); @@ -371,7 +371,7 @@ spec_poll(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_poll(dev, ap->a_events, ap->a_td); PICKUP_GIANT(); @@ -394,7 +394,7 @@ spec_kqfilter(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_kqfilter(dev, ap->a_kn); PICKUP_GIANT(); @@ -509,7 +509,7 @@ spec_xstrategy(struct vnode *vp, struct buf *bp) ("No strategy on dev %s responsible for buffer %p\n", devtoname(bp->b_dev), bp)); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { /* XXX: notyet DROP_GIANT(); */ DEV_STRATEGY(bp); /* XXX: notyet PICKUP_GIANT(); */ @@ -631,7 +631,7 @@ spec_close(ap) return (0); } VI_UNLOCK(vp); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_close(dev, ap->a_fflag, S_IFCHR, td); PICKUP_GIANT(); diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index 43a03135cd30..3e50eb350889 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); static d_ioctl_t g_ctl_ioctl; static struct cdevsw g_ctl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = g_ctl_ioctl, .d_name = "g_ctl", }; diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 97abc2a893d9..9ad3f70b0f0e 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -58,6 +58,7 @@ static d_strategy_t g_dev_strategy; static d_ioctl_t g_dev_ioctl; static struct cdevsw g_dev_cdevsw = { + .d_version = D_VERSION, .d_open = g_dev_open, .d_close = g_dev_close, .d_read = physread, @@ -66,7 +67,7 @@ static struct cdevsw g_dev_cdevsw = { .d_strategy = g_dev_strategy, .d_name = "g_dev", .d_maj = GEOM_MAJOR, - .d_flags = D_DISK | D_TRACKCLOSE | D_NOGIANT, + .d_flags = D_DISK | D_TRACKCLOSE, }; static g_taste_t g_dev_taste; diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index a6c186a9a610..5d4f0a4eb400 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -73,6 +73,8 @@ static d_ioctl_t apmioctl; static d_poll_t apmpoll; static struct cdevsw apm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = apmopen, .d_close = apmclose, .d_write = apmwrite, diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 1e2371fef54a..6145d9f71e98 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -108,6 +108,8 @@ static d_ioctl_t apmioctl; static d_poll_t apmpoll; static struct cdevsw apm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = apmopen, .d_close = apmclose, .d_write = apmwrite, diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c index 200bcfc760fb..3e9aab8189f7 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -75,9 +75,10 @@ devclass_t smapi_devclass; static d_ioctl_t smapi_ioctl; static struct cdevsw smapi_cdevsw = { + .d_version = D_VERSION, .d_ioctl = smapi_ioctl, .d_name = "smapi", - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; static void smapi_identify (driver_t *, device_t); diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c index 9e3de8f5ef41..80d8759b3cce 100644 --- a/sys/i386/i386/elan-mmcr.c +++ b/sys/i386/i386/elan-mmcr.c @@ -327,6 +327,8 @@ static d_ioctl_t elan_ioctl; static d_mmap_t elan_mmap; static struct cdevsw elan_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = elan_ioctl, .d_mmap = elan_mmap, .d_name = "elan", diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 85011671e288..342ced5fad7e 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -80,6 +80,7 @@ static d_mmap_t memmmap; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, @@ -88,7 +89,7 @@ static struct cdevsw mem_cdevsw = { .d_mmap = memmmap, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index 3b765f49223a..eaccb5a6ba1b 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -72,6 +72,8 @@ static void perfmon_init_dev(void *); SYSINIT(cpu, SI_SUB_DRIVERS, SI_ORDER_ANY, perfmon_init_dev, NULL); static struct cdevsw perfmon_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = perfmon_open, .d_close = perfmon_close, .d_ioctl = perfmon_ioctl, diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 8aff8c105f62..140ae5a060e1 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -197,6 +197,8 @@ static d_poll_t ascpoll; static struct cdevsw asc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ascopen, .d_close = ascclose, .d_read = ascread, diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 28adedc60f48..5d18a7beed9e 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -143,6 +143,8 @@ static d_write_t ctxwrite; static d_ioctl_t ctxioctl; static struct cdevsw ctx_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ctxopen, .d_close = ctxclose, .d_read = ctxread, diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 2a715c03046b..7207846b6380 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -386,12 +386,13 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int comconsole = -1; diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 480448a14071..0a653fe1c239 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -73,6 +73,8 @@ static d_write_t gpwrite; static d_ioctl_t gpioctl; static struct cdevsw gp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gpopen, .d_close = gpclose, .d_write = gpwrite, diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index d4dff76327a8..6cd11227914e 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -192,6 +192,8 @@ static d_read_t gscread; static d_ioctl_t gscioctl; static struct cdevsw gsc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gscopen, .d_close = gscclose, .d_read = gscread, diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index ee82892b6f14..f6f10b180eb4 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -643,13 +643,14 @@ COMPAT_ISA_DRIVER(stli, stlidriver); */ static struct cdevsw stli_cdevsw = { + .d_version = D_VERSION, .d_open = stliopen, .d_close = stliclose, .d_read = stliread, .d_write = stliwrite, .d_ioctl = stliioctl, .d_name = stli_drvname, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #endif diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index b2c821b59154..8cd40f1bbd03 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -140,6 +140,8 @@ static d_ioctl_t mseioctl; static d_poll_t msepoll; static struct cdevsw mse_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mseopen, .d_close = mseclose, .d_read = mseread, diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index af16af93b75c..0b4fdc04d0fd 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -93,14 +93,14 @@ static d_close_t pcvt_close; static d_ioctl_t pcvt_ioctl; static d_mmap_t pcvt_mmap; - static struct cdevsw vt_cdevsw = { + .d_version = D_VERSION, .d_open = pcvt_open, .d_close = pcvt_close, .d_ioctl = pcvt_ioctl, .d_mmap = pcvt_mmap, .d_name = "vt", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int pcvt_probe(device_t dev); diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c index e73b8b6dbc05..a649f13e1003 100644 --- a/sys/i386/isa/spic.c +++ b/sys/i386/isa/spic.c @@ -85,6 +85,8 @@ static d_ioctl_t spicioctl; static d_poll_t spicpoll; static struct cdevsw spic_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spicopen, .d_close = spicclose, .d_read = spicread, diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index dd23abd690d2..b94233a92a2a 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -105,6 +105,8 @@ static d_ioctl_t spigot_ioctl; static d_mmap_t spigot_mmap; static struct cdevsw spigot_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spigot_open, .d_close = spigot_close, .d_read = spigot_read, diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index e82ef46c9f40..e73ab8d73324 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -34,6 +34,8 @@ static d_write_t spkrwrite; static d_ioctl_t spkrioctl; static struct cdevsw spkr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spkropen, .d_close = spkrclose, .d_write = spkrwrite, diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index de0b2ccc9301..9a99f74aec03 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -537,11 +537,12 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver); */ static struct cdevsw stl_cdevsw = { + .d_version = D_VERSION, .d_open = stlopen, .d_close = stlclose, .d_ioctl = stlioctl, .d_name = "stl", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #endif diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 941fc082f403..9ca1e2535d15 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -186,6 +186,8 @@ static d_strategy_t wtstrategy; static struct cdevsw wt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = wtopen, .d_close = wtclose, .d_read = physread, diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c index 79cd1ab57fa6..630c064f537a 100644 --- a/sys/i4b/driver/i4b_ctl.c +++ b/sys/i4b/driver/i4b_ctl.c @@ -58,6 +58,8 @@ static d_poll_t i4bctlpoll; static struct cdevsw i4bctl_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = i4bctlopen, .d_close = i4bctlclose, .d_ioctl = i4bctlioctl, diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c index f632186d4c28..5738335e3ddb 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -112,6 +112,8 @@ static d_poll_t i4brbchpoll; static struct cdevsw i4brbch_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = i4brbchopen, .d_close = i4brbchclose, .d_read = i4brbchread, diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c index 5acce731a376..703bfc1688b2 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -134,6 +134,8 @@ static d_poll_t i4btelpoll; static struct cdevsw i4btel_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = i4btelopen, .d_close = i4btelclose, .d_read = i4btelread, diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index 348c6dd49b22..c5c3832d116a 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -75,6 +75,8 @@ static d_poll_t i4btrcpoll; static struct cdevsw i4btrc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = i4btrcopen, .d_close = i4btrcclose, .d_read = i4btrcread, diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index 42330efdc729..7b19aec6a460 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -78,6 +78,8 @@ static d_poll_t i4bpoll; static struct cdevsw i4b_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = i4bopen, .d_close = i4bclose, .d_read = i4bread, diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c index a904172bb14c..c1a2872fb497 100644 --- a/sys/ia64/ia64/mem.c +++ b/sys/ia64/ia64/mem.c @@ -82,6 +82,7 @@ static d_mmap_t memmmap; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, @@ -90,7 +91,7 @@ static struct cdevsw mem_cdevsw = { .d_mmap = memmmap, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; struct mem_range_softc mem_range_softc; diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index 1f21be121773..68f4727efe42 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -58,11 +58,12 @@ static d_close_t sscclose; static d_ioctl_t sscioctl; static struct cdevsw ssc_cdevsw = { + .d_version = D_VERSION, .d_open = sscopen, .d_close = sscclose, .d_ioctl = sscioctl, .d_name = "ssc", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static struct tty *ssc_tp = NULL; diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 5a506334d5c4..808c537e3f0f 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -482,6 +482,7 @@ fdin_rd(fdc_p fdc) } static struct cdevsw fd_cdevsw = { + .d_version = D_VERSION, .d_open = fdopen, .d_close = fdclose, .d_read = physread, @@ -489,7 +490,7 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; /* diff --git a/sys/isa/psm.c b/sys/isa/psm.c index e886e8cc9e4b..dd2fd7e2cc89 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -348,6 +348,8 @@ static driver_t psm_driver = { static struct cdevsw psm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = psmopen, .d_close = psmclose, .d_read = psmread, diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c index c820be21ce55..ce330f8ec919 100644 --- a/sys/isa/vga_isa.c +++ b/sys/isa/vga_isa.c @@ -72,6 +72,8 @@ static d_ioctl_t isavga_ioctl; static d_mmap_t isavga_mmap; static struct cdevsw isavga_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = isavga_open, .d_close = isavga_close, .d_read = isavga_read, diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 19592ad56017..85f5ba27ec42 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -115,6 +115,8 @@ dead_strategy(struct bio *bp) #define dead_kqfilter (d_kqfilter_t *)enxio static struct cdevsw dead_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, /* XXX: does dead_strategy need this ? */ .d_open = dead_open, .d_close = dead_close, .d_read = dead_read, diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c5e005bc2a15..3b534730e108 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -87,6 +87,8 @@ static d_open_t fdopen; #define CDEV_MAJOR 22 static struct cdevsw fildesc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = fdopen, .d_name = "FD", .d_maj = CDEV_MAJOR, diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 092f410d4d0f..4f2f836414a2 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -220,6 +220,8 @@ static d_poll_t devpoll; #define CDEV_MAJOR 173 static struct cdevsw dev_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = devopen, .d_close = devclose, .d_read = devread, diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index f33aeb03d40f..04abe89494c3 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -437,6 +437,8 @@ SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD, static d_mmap_t devstat_mmap; static struct cdevsw devstat_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_mmap = devstat_mmap, .d_name = "devstat", }; diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index b2ece2d3e9e7..48b4d58178a3 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -69,6 +69,8 @@ static void logtimeout(void *arg); #define CDEV_MAJOR 7 static struct cdevsw log_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = logopen, .d_close = logclose, .d_read = logread, diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index 272cc4aed4bf..5791978e21ba 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -78,6 +78,7 @@ static d_kqfilter_t cnkqfilter; * XXX: kern_conf.c knows what to do when it sees 256. */ static struct cdevsw cn_cdevsw = { + .d_version = D_VERSION, .d_open = cnopen, .d_close = cnclose, .d_read = cnread, @@ -86,7 +87,7 @@ static struct cdevsw cn_cdevsw = { .d_poll = cnpoll, .d_name = "console", .d_maj = 256, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, .d_kqfilter = cnkqfilter, }; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index ab3ef5dbf1e4..5648e7218836 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -80,6 +80,7 @@ static d_poll_t ptcpoll; #define CDEV_MAJOR_S 5 static struct cdevsw pts_cdevsw = { + .d_version = D_VERSION, .d_open = ptsopen, .d_close = ptsclose, .d_read = ptsread, @@ -87,11 +88,12 @@ static struct cdevsw pts_cdevsw = { .d_ioctl = ptyioctl, .d_name = "pts", .d_maj = CDEV_MAJOR_S, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #define CDEV_MAJOR_C 6 static struct cdevsw ptc_cdevsw = { + .d_version = D_VERSION, .d_open = ptcopen, .d_close = ptcclose, .d_read = ptcread, @@ -100,7 +102,7 @@ static struct cdevsw ptc_cdevsw = { .d_poll = ptcpoll, .d_name = "ptc", .d_maj = CDEV_MAJOR_C, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #define BUFSIZ 100 /* Chunk size iomoved to/from user */ diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 985a87750a71..96fa84ba27fb 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -38,10 +38,11 @@ static d_open_t cttyopen; #define CDEV_MAJOR 1 static struct cdevsw ctty_cdevsw = { + .d_version = D_VERSION, .d_open = cttyopen, .d_name = "ctty", .d_maj = CDEV_MAJOR, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static dev_t ctty; diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 9a8d35a9e83d..a24cce97ac4b 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -127,6 +127,8 @@ static d_poll_t bpfpoll; static d_kqfilter_t bpfkqfilter; static struct cdevsw bpf_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = bpfopen, .d_close = bpfclose, .d_read = bpfread, diff --git a/sys/net/if.c b/sys/net/if.c index 303166181136..8cea0c4fe5d4 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -134,6 +134,8 @@ static d_ioctl_t netioctl; static d_kqfilter_t netkqfilter; static struct cdevsw net_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = netopen, .d_close = netclose, .d_ioctl = netioctl, diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index f83243b39998..c7d380ec1c40 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -97,6 +97,8 @@ static d_ioctl_t tapioctl; static d_poll_t tappoll; static struct cdevsw tap_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = tapopen, .d_close = tapclose, .d_read = tapread, diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 4a64da456072..3c297c6a13a4 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -104,6 +104,8 @@ static d_ioctl_t tunioctl; static d_poll_t tunpoll; static struct cdevsw tun_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = tunopen, .d_close = tunclose, .d_read = tunread, diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index e353caf007fa..1e2013247fc3 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -226,6 +226,8 @@ Static void ubt_create_device_nodes (ubt_softc_p); Static void ubt_destroy_device_nodes (ubt_softc_p); Static struct cdevsw ubt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ubt_open, .d_close = ubt_close, .d_read = ubt_read, diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c index 44e763fe73a8..7f6b6c16d852 100644 --- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c +++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c @@ -92,6 +92,8 @@ Static d_ioctl_t ubtbcmfw_ioctl; Static d_poll_t ubtbcmfw_poll; Static struct cdevsw ubtbcmfw_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ubtbcmfw_open, .d_close = ubtbcmfw_close, .d_read = ubtbcmfw_read, diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index ae3237fa33da..7bd1ed0be6b0 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -113,6 +113,8 @@ static d_ioctl_t ngdioctl; static d_poll_t ngdpoll; static struct cdevsw ngd_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ngdopen, .d_close = ngdclose, .d_read = ngdread, diff --git a/sys/netncp/ncp_mod.c b/sys/netncp/ncp_mod.c index e56495d6a2c8..6594b52e5a5b 100644 --- a/sys/netncp/ncp_mod.c +++ b/sys/netncp/ncp_mod.c @@ -66,6 +66,8 @@ static dev_t ncp_dev; static d_ioctl_t ncp_ioctl; static struct cdevsw ncp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = ncp_ioctl, .d_name = "ncp", }; diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c index debf080ff58e..258a37a9cdc5 100644 --- a/sys/netsmb/smb_dev.c +++ b/sys/netsmb/smb_dev.c @@ -87,6 +87,8 @@ int smb_dev_queue(struct smb_dev *ndp, struct smb_rq *rqp, int prio); */ static struct cdevsw nsmb_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = nsmb_dev_open, .d_close = nsmb_dev_close, .d_ioctl = nsmb_dev_ioctl, diff --git a/sys/nfs4client/nfs4_dev.c b/sys/nfs4client/nfs4_dev.c index f9a84d879031..4a318e2fb5fc 100644 --- a/sys/nfs4client/nfs4_dev.c +++ b/sys/nfs4client/nfs4_dev.c @@ -94,6 +94,8 @@ static d_ioctl_t nfs4dev_ioctl; static d_poll_t nfs4dev_poll; static struct cdevsw nfs4dev_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = nfs4dev_open, .d_close = nfs4dev_close, .d_ioctl = nfs4dev_ioctl, diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 1d2398f1a31f..4ad2797c1a8c 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -765,6 +765,8 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) #define CRYPTO_MAJOR 70 /* from openbsd */ static struct cdevsw crypto_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = cryptoopen, .d_read = cryptoread, .d_write = cryptowrite, diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index a2ebaa4ce381..df37273b74c0 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -623,6 +623,7 @@ fdin_rd(fdc_p fdc) #endif /* PC98 */ static struct cdevsw fd_cdevsw = { + .d_version = D_VERSION, .d_open = fdopen, .d_close = fdclose, .d_read = physread, @@ -630,7 +631,7 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; /* diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c index 5a232829c604..0307f6cf8ae2 100644 --- a/sys/pc98/cbus/gdc.c +++ b/sys/pc98/cbus/gdc.c @@ -102,6 +102,8 @@ static d_ioctl_t gdcioctl; static d_mmap_t gdcmmap; static struct cdevsw gdc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gdcopen, .d_close = gdcclose, .d_read = gdcread, diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index f17604617487..0ebd84c479ce 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -230,6 +230,8 @@ static d_write_t lptwrite; static d_ioctl_t lptioctl; static struct cdevsw lpt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = lptopen, .d_close = lptclose, .d_write = lptwrite, diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 3c309c00a7ea..39269ea261b5 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -416,13 +416,14 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = sio_driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; int comconsole = -1; diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index a2ebaa4ce381..df37273b74c0 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -623,6 +623,7 @@ fdin_rd(fdc_p fdc) #endif /* PC98 */ static struct cdevsw fd_cdevsw = { + .d_version = D_VERSION, .d_open = fdopen, .d_close = fdclose, .d_read = physread, @@ -630,7 +631,7 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; /* diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index cc439a0b17ff..4ddeb63b8d9b 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -137,6 +137,8 @@ static d_ioctl_t mseioctl; static d_poll_t msepoll; static struct cdevsw mse_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mseopen, .d_close = mseclose, .d_read = mseread, diff --git a/sys/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c index f17604617487..0ebd84c479ce 100644 --- a/sys/pc98/pc98/olpt.c +++ b/sys/pc98/pc98/olpt.c @@ -230,6 +230,8 @@ static d_write_t lptwrite; static d_ioctl_t lptioctl; static struct cdevsw lpt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = lptopen, .d_close = lptclose, .d_write = lptwrite, diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c index 5a232829c604..0307f6cf8ae2 100644 --- a/sys/pc98/pc98/pc98gdc.c +++ b/sys/pc98/pc98/pc98gdc.c @@ -102,6 +102,8 @@ static d_ioctl_t gdcioctl; static d_mmap_t gdcmmap; static struct cdevsw gdc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gdcopen, .d_close = gdcclose, .d_read = gdcread, diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 3c309c00a7ea..39269ea261b5 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -416,13 +416,14 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_read = sioread, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = sio_driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; int comconsole = -1; diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c index 878091716967..ef508c0394e8 100644 --- a/sys/pc98/pc98/wd_cd.c +++ b/sys/pc98/pc98/wd_cd.c @@ -49,6 +49,7 @@ static d_strategy_t acdstrategy; static struct cdevsw acd_cdevsw = { + .d_version = D_VERSION, .d_open = acdopen, .d_close = acdclose, .d_read = physread, @@ -56,7 +57,7 @@ static struct cdevsw acd_cdevsw = { .d_ioctl = acdioctl, .d_strategy = acdstrategy, .d_name = "wcd", - .d_flags = D_DISK, + .d_flags = D_DISK | D_NEEDGIANT, }; #define NUNIT 16 /* Max # of devices */ diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index bc5f240c0ae1..b4d15ffdd23f 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -81,6 +81,8 @@ static d_ioctl_t crdioctl; static d_poll_t crdpoll; static struct cdevsw crd_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = crdopen, .d_close = crdclose, .d_read = crdread, diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 6f09660fad6a..6a01e20565ed 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -70,6 +70,8 @@ static d_ioctl_t agp_ioctl; static d_mmap_t agp_mmap; static struct cdevsw agp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = agp_open, .d_close = agp_close, .d_ioctl = agp_ioctl, diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index 9e8c8f1165e7..b0118d63d982 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -186,6 +186,8 @@ static d_close_t ti_close; static d_ioctl_t ti_ioctl2; static struct cdevsw ti_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ti_open, .d_close = ti_close, .d_ioctl = ti_ioctl2, diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index d6c6cd336ef0..6c1d8fda2837 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -43,6 +43,8 @@ static d_ioctl_t xrpu_ioctl; static d_mmap_t xrpu_mmap; static struct cdevsw xrpu_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = xrpu_open, .d_close = xrpu_close, .d_ioctl = xrpu_ioctl, diff --git a/sys/sparc64/creator/creator_upa.c b/sys/sparc64/creator/creator_upa.c index cb4762d09d06..ee7384214587 100644 --- a/sys/sparc64/creator/creator_upa.c +++ b/sys/sparc64/creator/creator_upa.c @@ -74,6 +74,8 @@ static driver_t creator_upa_driver = { static devclass_t creator_upa_devclass; static struct cdevsw creator_devsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = creator_open, .d_close = creator_close, .d_ioctl = creator_ioctl, diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c index a099f4ada326..cee4c0fd645e 100644 --- a/sys/sparc64/sparc64/mem.c +++ b/sys/sparc64/sparc64/mem.c @@ -83,13 +83,14 @@ static d_read_t mmrw; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, .d_write = mmrw, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; static int diff --git a/sys/sys/conf.h b/sys/sys/conf.h index a203c11fd0c8..2a2b984f4e94 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -202,12 +202,19 @@ typedef int dumper_t( #define D_TRACKCLOSE 0x00080000 /* track all closes */ #define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */ #define D_PSEUDO 0x00200000 /* make_dev() can return NULL */ -#define D_NOGIANT 0x00400000 /* Doesn't want Giant */ +#define D_NEEDGIANT 0x00400000 /* driver want Giant */ + +/* + * Version numbers. + */ +#define D_VERSION_00 0x20011966 +#define D_VERSION D_VERSION_00 /* * Character device switch table */ struct cdevsw { + int d_version; int d_maj; u_int d_flags; const char *d_name; diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index a203c11fd0c8..2a2b984f4e94 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -202,12 +202,19 @@ typedef int dumper_t( #define D_TRACKCLOSE 0x00080000 /* track all closes */ #define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */ #define D_PSEUDO 0x00200000 /* make_dev() can return NULL */ -#define D_NOGIANT 0x00400000 /* Doesn't want Giant */ +#define D_NEEDGIANT 0x00400000 /* driver want Giant */ + +/* + * Version numbers. + */ +#define D_VERSION_00 0x20011966 +#define D_VERSION D_VERSION_00 /* * Character device switch table */ struct cdevsw { + int d_version; int d_maj; u_int d_flags; const char *d_name; -- cgit v1.3 From fe12f24bb098d8d2a6c35394a53a65b3e64f83d9 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 30 May 2004 20:08:47 +0000 Subject: Add missing includes --- sys/dev/aac/aac_cam.c | 1 + sys/dev/aac/aac_disk.c | 1 + sys/dev/aac/aac_linux.c | 1 + sys/dev/aac/aac_pci.c | 1 + sys/dev/acpica/acpi.c | 1 + sys/dev/acpica/acpi_acad.c | 1 + sys/dev/acpica/acpi_button.c | 1 + sys/dev/acpica/acpi_cmbat.c | 1 + sys/dev/acpica/acpi_cpu.c | 1 + sys/dev/acpica/acpi_ec.c | 1 + sys/dev/acpica/acpi_isab.c | 1 + sys/dev/acpica/acpi_lid.c | 1 + sys/dev/acpica/acpi_pcib_acpi.c | 1 + sys/dev/acpica/acpi_pcib_pci.c | 1 + sys/dev/acpica/acpi_resource.c | 1 + sys/dev/acpica/acpi_thermal.c | 1 + sys/dev/acpica/acpi_timer.c | 1 + sys/dev/acpica/acpi_video.c | 1 + sys/dev/advansys/adv_isa.c | 1 + sys/dev/advansys/adv_pci.c | 1 + sys/dev/aic7xxx/aic79xx_osm.h | 1 + sys/dev/aic7xxx/aic7xxx_osm.h | 1 + sys/dev/amd/amd.c | 1 + sys/dev/amr/amr_disk.c | 1 + sys/dev/amr/amr_pci.c | 1 + sys/dev/ar/if_ar_pci.c | 1 + sys/dev/asr/asr.c | 1 + sys/dev/bfe/if_bfe.c | 1 + sys/dev/bge/if_bge.c | 1 + sys/dev/bktr/bktr_mem.c | 1 + sys/dev/bktr/bktr_os.c | 1 + sys/dev/buslogic/bt_pci.c | 1 + sys/dev/cp/if_cp.c | 1 + sys/dev/ctau/if_ct.c | 1 + sys/dev/cx/if_cx.c | 1 + sys/dev/cy/cy_isa.c | 1 + sys/dev/cy/cy_pci.c | 1 + sys/dev/dcons/dcons.c | 1 + sys/dev/dcons/dcons_crom.c | 1 + sys/dev/digi/digi.c | 1 + sys/dev/digi/digi_isa.c | 1 + sys/dev/digi/digi_pci.c | 1 + sys/dev/em/if_em.h | 1 + sys/dev/en/if_en_pci.c | 1 + sys/dev/fb/splash.c | 1 + sys/dev/firewire/firewire.c | 1 + sys/dev/fxp/if_fxp.c | 1 + sys/dev/gx/if_gx.c | 1 + sys/dev/hifn/hifn7751.c | 1 + sys/dev/ichsmb/ichsmb_pci.c | 1 + sys/dev/ichwd/ichwd.c | 1 + sys/dev/ida/ida_disk.c | 1 + sys/dev/ida/ida_eisa.c | 1 + sys/dev/ida/ida_pci.c | 1 + sys/dev/ips/ips.h | 1 + sys/dev/ispfw/ispfw.c | 1 + sys/dev/lge/if_lge.c | 1 + sys/dev/lnc/if_lnc_isa.c | 1 + sys/dev/lnc/if_lnc_pci.c | 1 + sys/dev/mlx/mlx_disk.c | 1 + sys/dev/mlx/mlx_pci.c | 1 + sys/dev/nge/if_nge.c | 1 + sys/dev/nmdm/nmdm.c | 1 + sys/dev/pci/eisa_pci.c | 1 + sys/dev/ppbus/pcfclock.c | 1 + sys/dev/ppc/ppc.c | 1 + sys/dev/ppc/ppc_puc.c | 1 + sys/dev/puc/puc_pccard.c | 1 + sys/dev/puc/puc_pci.c | 1 + sys/dev/ray/if_ray.c | 1 + sys/dev/rc/rc.c | 1 + sys/dev/re/if_re.c | 1 + sys/dev/rp/rp_isa.c | 1 + sys/dev/rp/rp_pci.c | 1 + sys/dev/safe/safe.c | 1 + sys/dev/sbsh/if_sbsh.c | 1 + sys/dev/si/si_eisa.c | 1 + sys/dev/si/si_isa.c | 1 + sys/dev/si/si_pci.c | 1 + sys/dev/sn/if_sn_pccard.c | 1 + sys/dev/snp/snp.c | 1 + sys/dev/sr/if_sr.c | 1 + sys/dev/sr/if_sr_pci.c | 1 + sys/dev/sx/sx_pci.c | 1 + sys/dev/syscons/scterm-sc.c | 1 + sys/dev/syscons/scvgarndr.c | 1 + sys/dev/tdfx/tdfx_pci.c | 3 ++- sys/dev/trm/trm.c | 1 + sys/dev/twa/twa_includes.h | 1 + sys/dev/twe/twe_compat.h | 1 + sys/dev/tx/if_tx.c | 1 + sys/dev/txp/if_txp.c | 1 + sys/dev/ubsec/ubsec.c | 1 + sys/dev/usb/if_aue.c | 1 + sys/dev/usb/if_axe.c | 1 + sys/dev/usb/if_cue.c | 1 + sys/dev/usb/if_kue.c | 1 + sys/dev/usb/if_rue.c | 1 + sys/dev/usb/if_udav.c | 1 + sys/dev/usb/ubsa.c | 1 + sys/dev/usb/ubser.c | 1 + sys/dev/usb/ucom.c | 1 + sys/dev/usb/uftdi.c | 1 + sys/dev/usb/umct.c | 1 + sys/dev/usb/umodem.c | 1 + sys/dev/usb/uplcom.c | 1 + sys/dev/usb/usbdi_util.c | 1 + sys/dev/usb/uvisor.c | 1 + sys/dev/usb/uvscom.c | 1 + sys/dev/utopia/utopia.c | 1 + sys/dev/vx/if_vx_pci.c | 1 + sys/dev/wl/if_wl.c | 1 + sys/dev/xe/if_xe_pccard.c | 1 + 113 files changed, 114 insertions(+), 1 deletion(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c index 018fde0b5a19..d82439edbf9b 100644 --- a/sys/dev/aac/aac_cam.c +++ b/sys/dev/aac/aac_cam.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c index 2231a0e0d7c6..9316a4f1bff3 100644 --- a/sys/dev/aac/aac_disk.c +++ b/sys/dev/aac/aac_disk.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/aac/aac_linux.c b/sys/dev/aac/aac_linux.c index 375123cfaa43..21c944b05732 100644 --- a/sys/dev/aac/aac_linux.c +++ b/sys/dev/aac/aac_linux.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index 88edac67c60f..aebeeb61503e 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 98b93e9f8691..0bebf284c704 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c index d6b2e20aad7f..d5c7439840ef 100644 --- a/sys/dev/acpica/acpi_acad.c +++ b/sys/dev/acpica/acpi_acad.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c index 056c3d01a38b..83144862c101 100644 --- a/sys/dev/acpica/acpi_button.c +++ b/sys/dev/acpica/acpi_button.c @@ -31,6 +31,7 @@ #include "opt_acpi.h" #include #include +#include #include #include "acpi.h" diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c index 5a3d94871af7..2636f0b563a3 100644 --- a/sys/dev/acpica/acpi_cmbat.c +++ b/sys/dev/acpica/acpi_cmbat.c @@ -31,6 +31,7 @@ #include "opt_acpi.h" #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index f92c4b1fed74..7977c7b2b277 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 474f132533eb..03f719a04099 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -142,6 +142,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_isab.c b/sys/dev/acpica/acpi_isab.c index 3d97653b302b..61e9a1fae512 100644 --- a/sys/dev/acpica/acpi_isab.c +++ b/sys/dev/acpica/acpi_isab.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "acpi.h" #include diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c index 4fc4491c2e52..82beb464b134 100644 --- a/sys/dev/acpica/acpi_lid.c +++ b/sys/dev/acpica/acpi_lid.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 8092b3378392..47c8949c1f2a 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "acpi.h" #include diff --git a/sys/dev/acpica/acpi_pcib_pci.c b/sys/dev/acpica/acpi_pcib_pci.c index 7350829c55f6..9df0cb807b14 100644 --- a/sys/dev/acpica/acpi_pcib_pci.c +++ b/sys/dev/acpica/acpi_pcib_pci.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "acpi.h" #include diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index c441d8726a8a..ffc2c984e422 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index ccaaa16411f1..9efbddb11e5e 100644 --- a/sys/dev/acpica/acpi_thermal.c +++ b/sys/dev/acpica/acpi_thermal.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c index 2de78107c3f5..e3426bc23fd8 100644 --- a/sys/dev/acpica/acpi_timer.c +++ b/sys/dev/acpica/acpi_timer.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c index a01ed2be035b..258818183a91 100644 --- a/sys/dev/acpica/acpi_video.c +++ b/sys/dev/acpica/acpi_video.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c index 5b51ce1fa4ce..96bdc7c77ea7 100644 --- a/sys/dev/advansys/adv_isa.c +++ b/sys/dev/advansys/adv_isa.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c index fd704b3adf0e..9ac61f394fa9 100644 --- a/sys/dev/advansys/adv_pci.c +++ b/sys/dev/advansys/adv_pci.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h index 4299ec8a526c..924ef1bb4689 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.h +++ b/sys/dev/aic7xxx/aic79xx_osm.h @@ -49,6 +49,7 @@ #include #include #include +#include #include #define AIC_PCI_CONFIG 1 diff --git a/sys/dev/aic7xxx/aic7xxx_osm.h b/sys/dev/aic7xxx/aic7xxx_osm.h index e47498f0dfee..69cb3f0cab81 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.h +++ b/sys/dev/aic7xxx/aic7xxx_osm.h @@ -48,6 +48,7 @@ #include #include #include +#include #include #if __FreeBSD_version < 500000 diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c index 101c9f13c60e..b885bf44464e 100644 --- a/sys/dev/amd/amd.c +++ b/sys/dev/amd/amd.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c index fef49190f69a..8c520adc5a47 100644 --- a/sys/dev/amr/amr_disk.c +++ b/sys/dev/amr/amr_disk.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 85ffaaa26ed4..73b4d7579f70 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/ar/if_ar_pci.c b/sys/dev/ar/if_ar_pci.c index 2d0be9518686..0815d5e8f7d9 100644 --- a/sys/dev/ar/if_ar_pci.c +++ b/sys/dev/ar/if_ar_pci.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 06184aea9115..fa29dd8fa8f6 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -112,6 +112,7 @@ #include #include /* TRUE=1 and FALSE=0 defined here */ #include +#include #include #include #include diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index e7fe9e42be8a..a3a44dc73a19 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index c2de4a5b1bf9..835e84e2a2e3 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/bktr/bktr_mem.c b/sys/dev/bktr/bktr_mem.c index 21a1f41d8a2f..23afc8b24ce8 100644 --- a/sys/dev/bktr/bktr_mem.c +++ b/sys/dev/bktr/bktr_mem.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index baa30589efae..d7bd9ba6d146 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/buslogic/bt_pci.c b/sys/dev/buslogic/bt_pci.c index 121bb259d907..fe9d3f02ba1d 100644 --- a/sys/dev/buslogic/bt_pci.c +++ b/sys/dev/buslogic/bt_pci.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index d8d6268ad85c..945c8634e28c 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index bd6c97157586..cc5887adc922 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 8d63fa854ef2..b22e84a8328b 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #if NCX > 0 #include #include +#include #include #include #include diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 495b0744a35a..8d6df24127a0 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/cy/cy_pci.c b/sys/dev/cy/cy_pci.c index 304d48b2f972..98c21973b3a2 100644 --- a/sys/dev/cy/cy_pci.c +++ b/sys/dev/cy/cy_pci.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index d798f84f8f11..f72bb79f4103 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index 3d79ad588554..f2518fd52c11 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index e2cb568fe1dd..27b6268ab9f6 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/digi/digi_isa.c b/sys/dev/digi/digi_isa.c index 682989bbbc45..f1f4a5f9ab45 100644 --- a/sys/dev/digi/digi_isa.c +++ b/sys/dev/digi/digi_isa.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include diff --git a/sys/dev/digi/digi_pci.c b/sys/dev/digi/digi_pci.c index d80150de933e..fafa5a1fbf08 100644 --- a/sys/dev/digi/digi_pci.c +++ b/sys/dev/digi/digi_pci.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include diff --git a/sys/dev/em/if_em.h b/sys/dev/em/if_em.h index f3128f0e0449..34be8fd8c183 100644 --- a/sys/dev/em/if_em.h +++ b/sys/dev/em/if_em.h @@ -44,6 +44,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include diff --git a/sys/dev/en/if_en_pci.c b/sys/dev/en/if_en_pci.c index 19c0a483e4c9..1ca6e35a2ed0 100644 --- a/sys/dev/en/if_en_pci.c +++ b/sys/dev/en/if_en_pci.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include diff --git a/sys/dev/fb/splash.c b/sys/dev/fb/splash.c index daa0e5a96212..ec25d1cf03a4 100644 --- a/sys/dev/fb/splash.c +++ b/sys/dev/fb/splash.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 89ada479a572..03d28de3ab31 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 1161fd8412f0..2257a64cc985 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include /* #include */ #include +#include #include #include diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c index bd7088c123ae..797227225561 100644 --- a/sys/dev/gx/if_gx.c +++ b/sys/dev/gx/if_gx.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index 43cf54a246f8..4116453237f2 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index 7ce696e408ce..4a8ccd7f6c4b 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c index b3016cd5997d..d97397d33311 100644 --- a/sys/dev/ichwd/ichwd.c +++ b/sys/dev/ichwd/ichwd.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index 31769e70357f..794cb90b90c3 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index 7bf0036d571b..be247864ab96 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index d1cdc4ec6b71..692211d0eb65 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/ips/ips.h b/sys/dev/ips/ips.h index 5ebc548dddbe..5fd7514956b5 100644 --- a/sys/dev/ips/ips.h +++ b/sys/dev/ips/ips.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/ispfw/ispfw.c b/sys/dev/ispfw/ispfw.c index edad406d218b..f0b0a4d20944 100644 --- a/sys/dev/ispfw/ispfw.c +++ b/sys/dev/ispfw/ispfw.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index 7bd7192c1baf..689ab6a08e93 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/lnc/if_lnc_isa.c b/sys/dev/lnc/if_lnc_isa.c index 3669571d9bbf..5f6ed66abb36 100644 --- a/sys/dev/lnc/if_lnc_isa.c +++ b/sys/dev/lnc/if_lnc_isa.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/lnc/if_lnc_pci.c b/sys/dev/lnc/if_lnc_pci.c index e35ae61bb7ae..eee9277eb09e 100644 --- a/sys/dev/lnc/if_lnc_pci.c +++ b/sys/dev/lnc/if_lnc_pci.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 2ad0bc6ba533..8b19fa86b154 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 0a4548b7901e..f3309277fb63 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 0aa8b851ce95..739209cfc383 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 47d1be85b709..888cda419ecd 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/pci/eisa_pci.c b/sys/dev/pci/eisa_pci.c index c579493086f5..61027a1cbc67 100644 --- a/sys/dev/pci/eisa_pci.c +++ b/sys/dev/pci/eisa_pci.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c index a47f304b5ecb..599d2554ed5f 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 6cc0bca34404..05952263588a 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/ppc/ppc_puc.c b/sys/dev/ppc/ppc_puc.c index 11d830d7795d..2b41bfebca1d 100644 --- a/sys/dev/ppc/ppc_puc.c +++ b/sys/dev/ppc/ppc_puc.c @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/sys/dev/puc/puc_pccard.c b/sys/dev/puc/puc_pccard.c index b36dbc0fe98f..c01db42e6537 100644 --- a/sys/dev/puc/puc_pccard.c +++ b/sys/dev/puc/puc_pccard.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/puc/puc_pci.c b/sys/dev/puc/puc_pci.c index 74d7a2ef0eb2..b4c0cf4ecc69 100644 --- a/sys/dev/puc/puc_pci.c +++ b/sys/dev/puc/puc_pci.c @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c index 7376f4468318..3dcab630c875 100644 --- a/sys/dev/ray/if_ray.c +++ b/sys/dev/ray/if_ray.c @@ -248,6 +248,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 967b06bd09b8..96ea9face241 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 84d925f0bea5..dffd173700f2 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -114,6 +114,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/rp/rp_isa.c b/sys/dev/rp/rp_isa.c index 7277195480f0..9cb567786afb 100644 --- a/sys/dev/rp/rp_isa.c +++ b/sys/dev/rp/rp_isa.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/rp/rp_pci.c b/sys/dev/rp/rp_pci.c index 9994804d4353..ca7494b7add6 100644 --- a/sys/dev/rp/rp_pci.c +++ b/sys/dev/rp/rp_pci.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index 77beb5168e79..828d67d78a4d 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/sbsh/if_sbsh.c b/sys/dev/sbsh/if_sbsh.c index e225ec9922c0..19292b1d3013 100644 --- a/sys/dev/sbsh/if_sbsh.c +++ b/sys/dev/sbsh/if_sbsh.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/si/si_eisa.c b/sys/dev/si/si_eisa.c index f86f534c27ec..6be3c87af6be 100644 --- a/sys/dev/si/si_eisa.c +++ b/sys/dev/si/si_eisa.c @@ -25,6 +25,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/si/si_isa.c b/sys/dev/si/si_isa.c index e9974a892b72..91cc6e869a9c 100644 --- a/sys/dev/si/si_isa.c +++ b/sys/dev/si/si_isa.c @@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/si/si_pci.c b/sys/dev/si/si_pci.c index c72b94dc9393..f6e2486b9f72 100644 --- a/sys/dev/si/si_pci.c +++ b/sys/dev/si/si_pci.c @@ -24,6 +24,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 09c944a95e0f..48978a04dac3 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index ebf888e44481..7288a56744cd 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -25,6 +25,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c index 19e21b78d5f1..45eaf5060050 100644 --- a/sys/dev/sr/if_sr.c +++ b/sys/dev/sr/if_sr.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/sr/if_sr_pci.c b/sys/dev/sr/if_sr_pci.c index b7e1c5911ae9..dd41d74bcf58 100644 --- a/sys/dev/sr/if_sr_pci.c +++ b/sys/dev/sr/if_sr_pci.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/sx/sx_pci.c b/sys/dev/sx/sx_pci.c index 70be4c4e98c0..3187caf682ca 100644 --- a/sys/dev/sx/sx_pci.c +++ b/sys/dev/sx/sx_pci.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c index 0f279359ff8c..96059d482948 100644 --- a/sys/dev/syscons/scterm-sc.c +++ b/sys/dev/syscons/scterm-sc.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #if __sparc64__ || __powerpc__ diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 94628ee3d406..b26aa3d1aabc 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index eff6382742f9..1ba4ed7394cc 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -50,7 +50,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include +#include #include #include #include diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index 9edbe9b70ba4..2319828b8d0c 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/twa/twa_includes.h b/sys/dev/twa/twa_includes.h index 0dfdab87d1ec..22cae2e8a46f 100644 --- a/sys/dev/twa/twa_includes.h +++ b/sys/dev/twa/twa_includes.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/dev/twe/twe_compat.h b/sys/dev/twe/twe_compat.h index 78922a6b15cc..5cdad8384c3a 100644 --- a/sys/dev/twe/twe_compat.h +++ b/sys/dev/twe/twe_compat.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c index 2b58cb146618..e5652f4173b3 100644 --- a/sys/dev/tx/if_tx.c +++ b/sys/dev/tx/if_tx.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index 4e5b85d996d1..22fdecdf2bab 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index afc95811d03a..db3e96c0b2c2 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 17191e233b68..36bf5fabd432 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index e459a5cc3855..51eb4dcb2087 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 1996802194e4..3ea95960b3c3 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 484cc4117d30..5038ac476794 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/usb/if_rue.c b/sys/dev/usb/if_rue.c index 5d70e8a53479..da7cebcb9ffe 100644 --- a/sys/dev/usb/if_rue.c +++ b/sys/dev/usb/if_rue.c @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index fa33bcabeb4e..cb661bdffd44 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #if defined(__FreeBSD__) #include diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index 57c94f2984d6..b00df1ed35a6 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 4d0d6f3f9049..653e2e646d45 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 4bea235f68a9..e6bcd8278375 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c index 09eaff87361c..6578046d6287 100644 --- a/sys/dev/usb/uftdi.c +++ b/sys/dev/usb/uftdi.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c index f5b08586faff..8e001f2c0313 100644 --- a/sys/dev/usb/umct.c +++ b/sys/dev/usb/umct.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index c28dfbc06b7f..a351da324184 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index 86a0e4fa290d..6ac54d14789b 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 636e99317843..8fdd1cc8f7a9 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #if defined(__NetBSD__) || defined(__OpenBSD__) #include diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index b818271dec10..66f5fc10bbdd 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -61,6 +61,7 @@ #if defined(__NetBSD__) || defined(__OpenBSD__) #include #elif defined(__FreeBSD__) +#include #include #endif #include diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index c60e032ac59a..22738d6c15b0 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c index 447b980bbe2b..c648349dfe16 100644 --- a/sys/dev/utopia/utopia.c +++ b/sys/dev/utopia/utopia.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index 42b95727d317..7e22bd496ea8 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index 977c8a667f63..25296b5968c1 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -195,6 +195,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index 1425bb9d6e5f..9dc7cbcb4cce 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -- cgit v1.3 From bda4474a591fa1287709d059699e5a0505511c24 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Jun 2004 10:15:56 +0000 Subject: ttyclose() increments t_gen. Remove redundant increments in drivers. --- sys/dev/dcons/dcons.c | 1 - sys/dev/sio/sio.c | 1 - sys/dev/usb/ubser.c | 2 -- sys/dev/usb/ucom.c | 1 - sys/pc98/cbus/sio.c | 1 - sys/pc98/pc98/sio.c | 1 - 6 files changed, 7 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index f72bb79f4103..ecdbadb1cb68 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -586,7 +586,6 @@ dcons_detach(int port) if (tp->t_state & TS_ISOPEN) { printf("dcons: still opened\n"); (*linesw[tp->t_line].l_close)(tp, 0); - tp->t_gen++; ttyclose(tp); ttwakeup(tp); ttwwakeup(tp); diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 192973d8061a..dcbaedf8fc1b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -455,7 +455,6 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); - com->tp->t_gen++; ttyclose(com->tp); ttwakeup(com->tp); ttwwakeup(com->tp); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 653e2e646d45..4432f7a9648a 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -441,7 +441,6 @@ bad: if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); - tp->t_gen++; ttyclose(tp); ttwakeup(tp); ttwwakeup(tp); @@ -478,7 +477,6 @@ USB_DETACH(ubser) if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); - tp->t_gen++; ttyclose(tp); ttwakeup(tp); ttwwakeup(tp); diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index e6bcd8278375..f713a32f153e 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -214,7 +214,6 @@ ucom_detach(struct ucom_softc *sc) device_printf(sc->sc_dev, "still open, forcing close\n"); (*linesw[tp->t_line].l_close)(tp, 0); - tp->t_gen++; ttyclose(tp); ttwakeup(tp); ttwwakeup(tp); diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index ba3df52e161c..cf72607a1821 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -783,7 +783,6 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); - com->tp->t_gen++; ttyclose(com->tp); ttwakeup(com->tp); ttwwakeup(com->tp); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index ba3df52e161c..cf72607a1821 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -783,7 +783,6 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); - com->tp->t_gen++; ttyclose(com->tp); ttwakeup(com->tp); ttwwakeup(com->tp); -- cgit v1.3 From a1cda79464588cd8489700574b2e8608c1914f95 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Jun 2004 11:38:06 +0000 Subject: There is no need to explicitly call ttwakeup() and ttwwakeup() after ttyclose() has been called. It's already been done once by ttyclose, and probably once by the line-discipline too. --- sys/dev/dcons/dcons.c | 2 -- sys/dev/sio/sio.c | 2 -- sys/dev/usb/ubser.c | 4 ---- sys/dev/usb/ucom.c | 2 -- sys/pc98/cbus/sio.c | 2 -- sys/pc98/pc98/sio.c | 2 -- 6 files changed, 14 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index ecdbadb1cb68..cb983e4669fc 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -587,8 +587,6 @@ dcons_detach(int port) printf("dcons: still opened\n"); (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } /* XXX * must wait until all device are closed. diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index dcbaedf8fc1b..f4c63ef75154 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -456,8 +456,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 4432f7a9648a..b3edce89fca4 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -442,8 +442,6 @@ bad: if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } destroy_dev(sc->dev[i]); @@ -478,8 +476,6 @@ USB_DETACH(ubser) if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } destroy_dev(sc->dev[i]); diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index f713a32f153e..0a33937fa39f 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -215,8 +215,6 @@ ucom_detach(struct ucom_softc *sc) "still open, forcing close\n"); (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } else { DPRINTF(("ucom_detach: no tty\n")); diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index cf72607a1821..51b811bfc3de 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -784,8 +784,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index cf72607a1821..51b811bfc3de 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -784,8 +784,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); -- cgit v1.3 From 138fbf675a8d3c305b3d759c28ee54d566e29721 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Jun 2004 13:49:28 +0000 Subject: Gainfully employ the new ttyioctl in the trivial cases. --- sys/alpha/alpha/promcons.c | 27 --------------------------- sys/alpha/tlsb/zs_tlsb.c | 27 --------------------------- sys/dev/dcons/dcons.c | 25 ------------------------- sys/dev/ofw/ofw_console.c | 28 ---------------------------- sys/dev/syscons/syscons.c | 8 +------- sys/dev/syscons/sysmouse.c | 8 +------- sys/i386/isa/pcvt/pcvt_drv.c | 9 +-------- sys/ia64/ia64/ssc.c | 22 ---------------------- 8 files changed, 3 insertions(+), 151 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index e556c0f90e2a..c968d28992fc 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -61,13 +61,11 @@ __FBSDID("$FreeBSD$"); static d_open_t promopen; static d_close_t promclose; -static d_ioctl_t promioctl; static struct cdevsw prom_cdevsw = { .d_version = D_VERSION, .d_open = promopen, .d_close = promclose, - .d_ioctl = promioctl, .d_name = "prom", .d_flags = D_TTY | D_NEEDGIANT, }; @@ -155,31 +153,6 @@ promclose(dev, flag, mode, td) return 0; } -int -promioctl(dev, cmd, data, flag, td) - dev_t dev; - u_long cmd; - caddr_t data; - int flag; - struct thread *td; -{ - int unit = minor(dev); - struct tty *tp = prom_tp; - int error; - - if (unit != 0) - return ENXIO; - - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return error; - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return error; - - return ENOTTY; -} - int promparam(tp, t) struct tty *tp; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 749dd6da5eb8..59d989c11532 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -68,13 +68,11 @@ struct zs_softc { static d_open_t zsopen; static d_close_t zsclose; -static d_ioctl_t zsioctl; static struct cdevsw zs_cdevsw = { .d_version = D_VERSION, .d_open = zsopen, .d_close = zsclose, - .d_ioctl = zsioctl, .d_name = "zs", .d_flags = D_TTY | D_NEEDGIANT, }; @@ -327,31 +325,6 @@ zsclose(dev_t dev, int flag, int mode, struct thread *td) return (0); } -static int -zsioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) -{ - struct zs_softc *sc = ZS_SOFTC(minor(dev)); - struct tty *tp; - int error; - - if (sc == NULL) - return (ENXIO); - - tp = ZS_SOFTC(minor(dev))->tp; - - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - - if (error != ENOIOCTL) - return (error); - - error = ttioctl(tp, cmd, data, flag); - - if (error != ENOIOCTL) - return (error); - else - return (ENOTTY); -} - static int zsparam(struct tty *tp, struct termios *t) { diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index cb983e4669fc..173446623d53 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -85,14 +85,12 @@ static struct consdev gdbconsdev; static d_open_t dcons_open; static d_close_t dcons_close; -static d_ioctl_t dcons_ioctl; static struct cdevsw dcons_cdevsw = { #if __FreeBSD_version >= 500104 .d_version = D_VERSION, .d_open = dcons_open, .d_close = dcons_close, - .d_ioctl = dcons_ioctl, .d_name = "dcons", .d_flags = D_TTY | D_NEEDGIANT, #else @@ -218,29 +216,6 @@ dcons_close(dev_t dev, int flag, int mode, struct THREAD *td) return (0); } -static int -dcons_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct THREAD *td) -{ - int unit; - struct tty *tp; - int error; - - unit = minor(dev); - if (unit != 0) - return (ENXIO); - - tp = dev->si_tty; - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return (error); - - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return (error); - - return (ENOTTY); -} - static int dcons_tty_param(struct tty *tp, struct termios *t) { diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 506b894aeacf..04ba580fa9bd 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -49,13 +49,11 @@ __FBSDID("$FreeBSD$"); static d_open_t ofw_dev_open; static d_close_t ofw_dev_close; -static d_ioctl_t ofw_dev_ioctl; static struct cdevsw ofw_cdevsw = { .d_version = D_VERSION, .d_open = ofw_dev_open, .d_close = ofw_dev_close, - .d_ioctl = ofw_dev_ioctl, .d_name = "ofw", .d_flags = D_TTY | D_NEEDGIANT, }; @@ -173,32 +171,6 @@ ofw_dev_close(dev_t dev, int flag, int mode, struct thread *td) return (0); } -static int -ofw_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) -{ - int unit; - struct tty *tp; - int error; - - unit = minor(dev); - tp = ofw_tp; - - if (unit != 0) { - return (ENXIO); - } - - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) { - return (error); - } - - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) { - return (error); - } - - return (ENOTTY); -} static int ofw_tty_param(struct tty *tp, struct termios *t) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 7a81f3f0690e..eb685cffefff 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1344,13 +1344,7 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) break; } - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return(error); - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return(error); - return(ENOTTY); + return (ttyioctl(dev, cmd, data, flag, td)); } static void diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 7aa72cffd31c..af36098dfb51 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -233,13 +233,7 @@ smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) return ENODEV; } - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return error; - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return error; - return ENOTTY; + return(ttyioctl(dev, cmd, data, flag, td)); } static void diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 0b4fdc04d0fd..dcadcdbfeede 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -397,14 +397,7 @@ pcvt_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) if((error = vgaioctl(dev,cmd,data,flag)) >= 0) return error; - if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td)) - != ENOIOCTL) - return (error); - - if((error = ttioctl(tp, cmd, data, flag)) != ENOIOCTL) - return (error); - - return (ENOTTY); + return (ttyioctl(dev, cmd, data, flag, td)); } /*---------------------------------------------------------------------------* diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index 68f4727efe42..d483aeb1b536 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -55,13 +55,11 @@ static d_open_t sscopen; static d_close_t sscclose; -static d_ioctl_t sscioctl; static struct cdevsw ssc_cdevsw = { .d_version = D_VERSION, .d_open = sscopen, .d_close = sscclose, - .d_ioctl = sscioctl, .d_name = "ssc", .d_flags = D_TTY | D_NEEDGIANT, }; @@ -192,26 +190,6 @@ sscclose(dev_t dev, int flag, int mode, struct thread *td) return 0; } -static int -sscioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) -{ - int unit = minor(dev); - struct tty *tp = ssc_tp; - int error; - - if (unit != 0) - return ENXIO; - - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return error; - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return error; - - return ENOTTY; -} - static int sscparam(struct tty *tp, struct termios *t) { -- cgit v1.3 From 2140d01b277fa2ab698e66dda69e434f0be7bd13 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 4 Jun 2004 16:02:56 +0000 Subject: Machine generated patch which changes linedisc calls from accessing linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. --- sys/alpha/alpha/promcons.c | 6 +++--- sys/alpha/tlsb/zs_tlsb.c | 8 ++++---- sys/dev/cy/cy.c | 12 ++++++------ sys/dev/dcons/dcons.c | 8 ++++---- sys/dev/digi/digi.c | 26 +++++++++++++------------- sys/dev/nmdm/nmdm.c | 8 ++++---- sys/dev/ofw/ofw_console.c | 6 +++--- sys/dev/rc/rc.c | 10 +++++----- sys/dev/rp/rp.c | 20 ++++++++++---------- sys/dev/sab/sab.c | 8 ++++---- sys/dev/si/si.c | 20 ++++++++++---------- sys/dev/sio/sio.c | 16 ++++++++-------- sys/dev/sx/sx.c | 18 +++++++++--------- sys/dev/syscons/syscons.c | 22 +++++++++++----------- sys/dev/syscons/sysmouse.c | 8 ++++---- sys/dev/uart/uart_tty.c | 16 ++++++++-------- sys/dev/usb/ubser.c | 14 +++++++------- sys/dev/usb/ucom.c | 16 ++++++++-------- sys/dev/zs/zs.c | 8 ++++---- sys/i386/isa/pcvt/pcvt_drv.c | 10 +++++----- sys/ia64/ia64/ssc.c | 6 +++--- sys/kern/tty.c | 10 +++++----- sys/kern/tty_pty.c | 16 ++++++++-------- sys/pc98/cbus/sio.c | 22 +++++++++++----------- sys/pc98/pc98/sio.c | 22 +++++++++++----------- 25 files changed, 168 insertions(+), 168 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index c968d28992fc..3a127ead0490 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -124,7 +124,7 @@ promopen(dev, flag, mode, td) splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error == 0 && setuptimeout) { polltime = hz / PROM_POLL_HZ; @@ -148,7 +148,7 @@ promclose(dev, flag, mode, td) return ENXIO; untimeout(promtimeout, tp, promtimeouthandle); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); return 0; } @@ -211,7 +211,7 @@ promtimeout(v) while ((c = promcncheckc(NULL)) != -1) { if (tp->t_state & TS_ISOPEN) - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); } promtimeouthandle = timeout(promtimeout, tp, polltime); } diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 59d989c11532..1387f9713949 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -291,7 +291,7 @@ zsopen(dev_t dev, int flag, int mode, struct thread *td) splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error == 0 && setuptimeout) { zspolltime = hz / 50; @@ -318,7 +318,7 @@ zsclose(dev_t dev, int flag, int mode, struct thread *td) s = spltty(); untimeout(zs_poll_intr, sc, sc->zst); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); splx(s); @@ -502,7 +502,7 @@ zsc_tlsb_intr(void *arg) Debugger("manual escape to debugger"); #endif if (tp && (tp->t_state & TS_ISOPEN)) - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); DELAY(5); } } @@ -517,7 +517,7 @@ zsc_tlsb_intr(void *arg) Debugger("manual escape to debugger"); #endif if (tp && (tp->t_state & TS_ISOPEN)) - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); DELAY(5); } } diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index c6e72205f9d8..8e1a56cdc1c7 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -748,7 +748,7 @@ open_top: * the true carrier. */ if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } /* * Wait for DCD if necessary. @@ -762,7 +762,7 @@ open_top: goto out; goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); disc_optim(tp, &tp->t_termios, com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; @@ -793,7 +793,7 @@ sioclose(dev, flag, mode, td) tp = com->tp; s = spltty(); cd_etc(com, CD1400_ETC_STOPBREAK); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, com); comhardclose(com); ttyclose(tp); @@ -919,7 +919,7 @@ siowrite(dev, uio, flag) * sessions are raw anyhow. */ #else - return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); + return (ttyld_write(tp, uio, flag)); #endif } @@ -1018,7 +1018,7 @@ sioinput(com) if (line_status & LSR_PE) recv_data |= TTY_PE; } - (*linesw[tp->t_line].l_rint)(recv_data, tp); + ttyld_rint(tp, recv_data); critical_enter(); COM_LOCK(); } while (buf < com->iptr); @@ -1772,7 +1772,7 @@ repeat: com->state &= ~CS_ODONE; COM_UNLOCK(); critical_exit(); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } if (com_events == 0) break; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 173446623d53..3a5e302c7843 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -192,7 +192,7 @@ dcons_open(dev_t dev, int flag, int mode, struct THREAD *td) } splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); return (error); } @@ -209,7 +209,7 @@ dcons_close(dev_t dev, int flag, int mode, struct THREAD *td) tp = dev->si_tty; if (tp->t_state & TS_ISOPEN) { - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); } @@ -259,7 +259,7 @@ dcons_timeout(void *v) tp = dc->dev->si_tty; while ((c = dcons_checkc(dc)) != -1) if (tp->t_state & TS_ISOPEN) - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); } polltime = hz / poll_hz; if (polltime < 1) @@ -560,7 +560,7 @@ dcons_detach(int port) if (tp->t_state & TS_ISOPEN) { printf("dcons: still opened\n"); - (*linesw[tp->t_line].l_close)(tp, 0); + ttyld_close(tp, 0); ttyclose(tp); } /* XXX diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 06d8d18a4fc2..122fc2f7bd8b 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -832,7 +832,7 @@ open_top: /* handle fake and initial DCD for callout devices */ if (bc->mstat & port->cd || mynor & CALLOUT_MASK) - linesw[tp->t_line].l_modem(tp, 1); + ttyld_modem(tp, 1); } /* Wait for DCD if necessary */ @@ -849,7 +849,7 @@ open_top: } goto open_top; } - error = linesw[tp->t_line].l_open(dev, tp); + error = ttyld_open(tp, dev); DLOG(DIGIDB_OPEN, (sc->dev, "port %d: l_open error = %d\n", pnum, error)); @@ -900,7 +900,7 @@ digiclose(dev_t dev, int flag, int mode, struct thread *td) DLOG(DIGIDB_CLOSE, (sc->dev, "port %d: closing\n", pnum)); s = spltty(); - linesw[tp->t_line].l_close(tp, flag); + ttyld_close(tp, flag); digi_disc_optim(tp, &tp->t_termios, port); digihardclose(port); ttyclose(tp); @@ -970,7 +970,7 @@ digiread(dev_t dev, struct uio *uio, int flag) KASSERT(sc, ("digi%d: softc not allocated in digiclose\n", unit)); tp = &sc->ttys[pnum]; - error = linesw[tp->t_line].l_read(tp, uio, flag); + error = ttyld_read(tp, uio, flag); DLOG(DIGIDB_READ, (sc->dev, "port %d: read() returns %d\n", pnum, error)); @@ -996,7 +996,7 @@ digiwrite(dev_t dev, struct uio *uio, int flag) KASSERT(sc, ("digi%d: softc not allocated in digiclose\n", unit)); tp = &sc->ttys[pnum]; - error = linesw[tp->t_line].l_write(tp, uio, flag); + error = ttyld_write(tp, uio, flag); DLOG(DIGIDB_WRITE, (sc->dev, "port %d: write() returns %d\n", pnum, error)); @@ -1651,26 +1651,26 @@ end_of_data: DLOG(DIGIDB_RI, (sc->dev, "port %d: RING\n", event.pnum)); if (port->send_ring) { - linesw[tp->t_line].l_rint('R', tp); - linesw[tp->t_line].l_rint('I', tp); - linesw[tp->t_line].l_rint('N', tp); - linesw[tp->t_line].l_rint('G', tp); - linesw[tp->t_line].l_rint('\r', tp); - linesw[tp->t_line].l_rint('\n', tp); + ttyld_rint(tp, 'R'); + ttyld_rint(tp, 'I'); + ttyld_rint(tp, 'N'); + ttyld_rint(tp, 'G'); + ttyld_rint(tp, '\r'); + ttyld_rint(tp, '\n'); } } } if (event.event & BREAK_IND) { DLOG(DIGIDB_MODEM, (sc->dev, "port %d: BREAK_IND\n", event.pnum)); - linesw[tp->t_line].l_rint(TTY_BI, tp); + ttyld_rint(tp, TTY_BI); } if (event.event & (LOWTX_IND | EMPTYTX_IND)) { DLOG(DIGIDB_IRQ, (sc->dev, "port %d:%s%s\n", event.pnum, event.event & LOWTX_IND ? " LOWTX" : "", event.event & EMPTYTX_IND ? " EMPTYTX" : "")); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } sc->gdata->eout = etail; diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 8855a27ff006..cb25ecb0b694 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -154,12 +154,12 @@ nmdm_task_tty(void *arg, int pending __unused) if (sp->other->dcd) { if (!(tp->t_state & TS_ISOPEN)) { sp->other->dcd = 0; - (void)(*linesw[otp->t_line].l_modem)(otp, 0); + (void)ttyld_modem(otp, 0); } } else { if (tp->t_state & TS_ISOPEN) { sp->other->dcd = 1; - (void)(*linesw[otp->t_line].l_modem)(otp, 1); + (void)ttyld_modem(otp, 1); } } if (tp->t_state & TS_TTSTOP) @@ -169,7 +169,7 @@ nmdm_task_tty(void *arg, int pending __unused) return; c = getc(&tp->t_outq); if (otp->t_state & TS_ISOPEN) - (*linesw[otp->t_line].l_rint)(c, otp); + ttyld_rint(otp, c); } if (tp->t_outq.c_cc == 0) ttwwakeup(tp); @@ -255,7 +255,7 @@ nmdmopen(dev_t dev, int flag, int devtype, struct thread *td) return (EBUSY); } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); return (error); } diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 04ba580fa9bd..fde41e6f3612 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -138,7 +138,7 @@ ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td) return (EBUSY); } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error == 0 && setuptimeout) { polltime = hz / OFW_POLL_HZ; @@ -165,7 +165,7 @@ ofw_dev_close(dev_t dev, int flag, int mode, struct thread *td) return (ENXIO); } - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); return (0); @@ -218,7 +218,7 @@ ofw_timeout(void *v) while ((c = ofw_cons_checkc(NULL)) != -1) { if (tp->t_state & TS_ISOPEN) { - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); } } diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 14b3c96d0649..319fa1dea58b 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -738,7 +738,7 @@ rc_pollcard(void *arg) rc->rc_flags &= ~RC_MODCHG; sc->sc_scheduled_event -= LOTS_OF_EVENTS; critical_exit(); - (*linesw[tp->t_line].l_modem)(tp, !!(rc->rc_msvr & MSVR_CD)); + ttyld_modem(tp, !!(rc->rc_msvr & MSVR_CD)); } if (rc->rc_flags & RC_DORXFER) { critical_enter(); @@ -810,7 +810,7 @@ done1: ; rc->rc_flags &= ~RC_DOXXFER; rc->rc_tp.t_state &= ~TS_BUSY; critical_exit(); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } if (sc->sc_scheduled_event == 0) break; @@ -920,7 +920,7 @@ again: (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET); if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev)) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev) && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) { @@ -931,7 +931,7 @@ again: goto out; goto again; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); disc_optim(tp, &tp->t_termios, rc); if ((tp->t_state & TS_ISOPEN) && CALLOUT(dev)) rc->rc_flags |= RC_ACTOUT; @@ -960,7 +960,7 @@ rcclose(dev_t dev, int flag, int mode, d_thread_t *td) rc->rc_chan, dev); #endif s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, rc); rc_hardclose(rc); ttyclose(tp); diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index feff480ebd21..f99f403709ad 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -660,7 +660,7 @@ static void rp_do_receive(struct rp_port *rp, struct tty *tp, else if (CharNStat & STMRCVROVRH) rp->rp_overflows++; - (*linesw[tp->t_line].l_rint)(ch, tp); + ttyld_rint(tp, ch); ToRecv--; } /* @@ -702,7 +702,7 @@ static void rp_do_receive(struct rp_port *rp, struct tty *tp, } ch = (u_char) rp_readch1(cp,sGetTxRxDataIO(cp)); spl = spltty(); - (*linesw[tp->t_line].l_rint)(ch, tp); + ttyld_rint(tp, ch); splx(spl); ToRecv--; } @@ -731,12 +731,12 @@ static void rp_handle_port(struct rp_port *rp) if(IntMask & DELTA_CD) { if(ChanStatus & CD_ACT) { if(!(tp->t_state & TS_CARR_ON) ) { - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); } } else { if((tp->t_state & TS_CARR_ON)) { - (void)(*linesw[tp->t_line].l_modem)(tp, 0); - if((*linesw[tp->t_line].l_modem)(tp, 0) == 0) { + (void)ttyld_modem(tp, 0); + if(ttyld_modem(tp, 0) == 0) { rphardclose(rp); } } @@ -784,7 +784,7 @@ static void rp_do_poll(void *not_used) tp->t_state &= ~(TS_BUSY); if(!(tp->t_state & TS_TTSTOP) && (count <= rp->rp_restart)) { - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } } @@ -1068,7 +1068,7 @@ open_top: ChanStatus = sGetChanStatus(&rp->rp_channel); if((IntMask & DELTA_CD) || IS_CALLOUT(dev)) { if((ChanStatus & CD_ACT) || IS_CALLOUT(dev)) { - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); } } @@ -1087,7 +1087,7 @@ open_top: goto out; goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); rp_disc_optim(tp, &tp->t_termios); if(tp->t_state & TS_ISOPEN && IS_CALLOUT(dev)) @@ -1130,7 +1130,7 @@ rpclose(dev, flag, mode, td) tp = rp->rp_tty; oldspl = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); rp_disc_optim(tp, &tp->t_termios); rphardclose(rp); @@ -1207,7 +1207,7 @@ rpwrite(dev, uio, flag) return(error); } - error = (*linesw[tp->t_line].l_write)(tp, uio, flag); + error = ttyld_write(tp, uio, flag); return error; } diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index e546e24a4bc1..0193431b9051 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -622,13 +622,13 @@ sabtty_softintr(struct sabtty_softc *sc) if (sc->sc_iget == sc->sc_ibuf + sizeof(sc->sc_ibuf)) sc->sc_iget = sc->sc_ibuf; - (*linesw[tp->t_line].l_rint)(data, tp); + ttyld_rint(tp, data); } if (sc->sc_tx_done != 0) { sc->sc_tx_done = 0; tp->t_state &= ~TS_BUSY; - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } @@ -698,7 +698,7 @@ sabttyopen(dev_t dev, int flags, int mode, struct thread *td) if (error != 0) return (error); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error != 0) return (error); @@ -715,7 +715,7 @@ sabttyclose(dev_t dev, int flags, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) return (0); - (*linesw[tp->t_line].l_close)(tp, flags); + ttyld_close(tp, flags); ttyclose(tp); return (0); diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index b4f8f0703ca6..4411d21db20f 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -714,7 +714,7 @@ open_top: /* set initial DCD state */ pp->sp_last_hi_ip = ccbp->hi_ip; if ((pp->sp_last_hi_ip & IP_DCD) || IS_CALLOUT(mynor)) { - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } } @@ -740,7 +740,7 @@ open_top: goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); si_disc_optim(tp, &tp->t_termios, pp); if (tp->t_state & TS_ISOPEN && IS_CALLOUT(mynor)) pp->sp_active_out = TRUE; @@ -790,7 +790,7 @@ siclose(dev_t dev, int flag, int mode, struct thread *td) si_write_enable(pp, 0); /* block writes for ttywait() */ /* THIS MAY SLEEP IN TTYWAIT!!! */ - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); si_write_enable(pp, 1); @@ -900,7 +900,7 @@ siwrite(dev_t dev, struct uio *uio, int flag) } } - error = (*linesw[tp->t_line].l_write)(tp, uio, flag); + error = ttyld_write(tp, uio, flag); out: splx(oldspl); return (error); @@ -1466,12 +1466,12 @@ si_modem_state(struct si_port *pp, struct tty *tp, int hi_ip) if (!(pp->sp_last_hi_ip & IP_DCD)) { DPRINT((pp, DBG_INTR, "modem carr on t_line %d\n", tp->t_line)); - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); } } else { if (pp->sp_last_hi_ip & IP_DCD) { DPRINT((pp, DBG_INTR, "modem carr off\n")); - if ((*linesw[tp->t_line].l_modem)(tp, 0)) + if (ttyld_modem(tp, 0)) (void) si_modem(pp, SET, 0); } } @@ -1679,7 +1679,7 @@ si_intr(void *arg) */ if (ccbp->hi_state & ST_BREAK) { if (isopen) { - (*linesw[tp->t_line].l_rint)(TTY_BI, tp); + ttyld_rint(tp, TTY_BI); } ccbp->hi_state &= ~ST_BREAK; /* A Bit iffy this */ DPRINT((pp, DBG_INTR, "si_intr break\n")); @@ -1808,7 +1808,7 @@ si_intr(void *arg) */ for(x = 0; x < n; x++) { i = si_rxbuf[x]; - if ((*linesw[tp->t_line].l_rint)(i, tp) + if (ttyld_rint(tp, i) == -1) { pp->sp_delta_overflows++; } @@ -1821,7 +1821,7 @@ si_intr(void *arg) /* * Do TX stuff */ - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } /* end of for (all ports on this controller) */ } /* end of for (all controllers) */ @@ -1963,7 +1963,7 @@ si_lstart(void *arg) ttwwakeup(tp); /* nudge protocols - eg: ppp */ - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); pp->sp_state &= ~SS_INLSTART; splx(oldspl); diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index ce064c4a5f6d..63883875bf29 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -454,7 +454,7 @@ siodetach(dev) com->ioportres); if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); - (*linesw[com->tp->t_line].l_close)(com->tp, 0); + ttyld_close(com->tp, 0); ttyclose(com->tp); } else { if (com->ibuf != NULL) @@ -1335,7 +1335,7 @@ open_top: * the true carrier. */ if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } /* * Wait for DCD if necessary. @@ -1351,7 +1351,7 @@ open_top: goto out; goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); disc_optim(tp, &tp->t_termios, com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; @@ -1383,7 +1383,7 @@ sioclose(dev, flag, mode, td) return (ENODEV); tp = com->tp; s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, com); comhardclose(com); ttyclose(tp); @@ -1475,7 +1475,7 @@ sioread(dev, uio, flag) com = com_addr(MINOR_TO_UNIT(mynor)); if (com == NULL || com->gone) return (ENODEV); - return ((*linesw[com->tp->t_line].l_read)(com->tp, uio, flag)); + return (ttyld_read(com->tp, uio, flag)); } static int @@ -1504,7 +1504,7 @@ siowrite(dev, uio, flag) */ if (constty != NULL && unit == comconsole) constty = NULL; - return ((*linesw[com->tp->t_line].l_write)(com->tp, uio, flag)); + return (ttyld_write(com->tp, uio, flag)); } static void @@ -1657,7 +1657,7 @@ sioinput(com) if (line_status & LSR_PE) recv_data |= TTY_PE; } - (*linesw[tp->t_line].l_rint)(recv_data, tp); + ttyld_rint(tp, recv_data); mtx_lock_spin(&sio_lock); } while (buf < com->iptr); } @@ -2176,7 +2176,7 @@ repeat: timeout(siobusycheck, com, hz / 100); com->extra_state |= CSE_BUSYCHECK; } - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } if (com_events == 0) break; diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index b3e1cf2061ef..68266bd6382d 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -453,7 +453,7 @@ open_top: /* set initial DCD state */ if (DEV_IS_CALLOUT(mynor) || (sx_modem(sc, pp, GET, 0) & TIOCM_CD)) { - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } } /* whoops! we beat the close! */ @@ -475,7 +475,7 @@ open_top: goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); sx_disc_optim(tp, &tp->t_termios, pp); if (tp->t_state & TS_ISOPEN && DEV_IS_CALLOUT(mynor)) pp->sp_active_out = TRUE; @@ -536,7 +536,7 @@ sxclose( sx_write_enable(pp, 0); /* block writes for ttywait() */ /* THIS MAY SLEEP IN TTYWAIT!!! */ - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); sx_write_enable(pp, 1); @@ -675,7 +675,7 @@ sxwrite( goto out; } } - error = (*linesw[tp->t_line].l_write)(tp, uio, flag); + error = ttyld_write(tp, uio, flag); out: splx(oldspl); DPRINT((pp, DBG_WRITE, "sxwrite out\n")); return (error); @@ -1313,7 +1313,7 @@ sx_transmit( * discipline to send more. */ if (flags & CD1865_IER_TXRDY) { - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); pp->sp_state &= ~SX_SS_IXMIT; DPRINT((pp, DBG_TRANSMIT, "sx_xmit TXRDY out\n")); return; @@ -1365,11 +1365,11 @@ sx_modem_state( if ((sx_cd1865_in(sc, CD1865_MSVR) & CD1865_MSVR_CD) == 0) { DPRINT((pp, DBG_INTR, "modem carr on t_line %d\n", tp->t_line)); - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); } else { /* CD went down. */ DPRINT((pp, DBG_INTR, "modem carr off\n")); - if ((*linesw[tp->t_line].l_modem)(tp, 0)) + if (ttyld_modem(tp, 0)) (void)sx_modem(sc, pp, SET, 0); } } @@ -1496,7 +1496,7 @@ sx_receive( */ for (x = 0; x < count; x++) { i = sx_rxbuf[x]; - if ((*linesw[tp->t_line].l_rint)(i, tp) == -1) + if (ttyld_rint(tp, i) == -1) pp->sp_delta_overflows++; } } @@ -1561,7 +1561,7 @@ sx_receive_exception( ch |= TTY_FE; else if (st & CD1865_RCSR_OE) ch |= TTY_OE; - (*linesw[tp->t_line].l_rint)(ch, tp); + ttyld_rint(tp, ch); pp->sp_state &= ~SX_SS_IRCVEXC; } diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index eb685cffefff..0608ce5df25d 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -495,13 +495,13 @@ scopen(dev_t dev, int flag, int mode, struct thread *td) tp->t_lflag = TTYDEF_LFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; scparam(tp, &tp->t_termios); - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } else if (tp->t_state & TS_XCLUDE && suser(td)) return(EBUSY); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); scp = sc_get_stat(dev); if (scp == NULL) { @@ -561,7 +561,7 @@ scclose(dev_t dev, int flag, int mode, struct thread *td) DPRINTF(5, ("done.\n")); } spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); spl0(); return(0); @@ -618,23 +618,23 @@ sckbdevent(keyboard_t *thiskbd, int event, void *arg) switch (KEYFLAGS(c)) { case 0x0000: /* normal key */ - (*linesw[cur_tty->t_line].l_rint)(KEYCHAR(c), cur_tty); + ttyld_rint(cur_tty, KEYCHAR(c)); break; case FKEY: /* function key, return string */ cp = kbd_get_fkeystr(thiskbd, KEYCHAR(c), &len); if (cp != NULL) { while (len-- > 0) - (*linesw[cur_tty->t_line].l_rint)(*cp++, cur_tty); + ttyld_rint(cur_tty, *cp++); } break; case MKEY: /* meta is active, prepend ESC */ - (*linesw[cur_tty->t_line].l_rint)(0x1b, cur_tty); - (*linesw[cur_tty->t_line].l_rint)(KEYCHAR(c), cur_tty); + ttyld_rint(cur_tty, 0x1b); + ttyld_rint(cur_tty, KEYCHAR(c)); break; case BKEY: /* backtab fixed sequence (esc [ Z) */ - (*linesw[cur_tty->t_line].l_rint)(0x1b, cur_tty); - (*linesw[cur_tty->t_line].l_rint)('[', cur_tty); - (*linesw[cur_tty->t_line].l_rint)('Z', cur_tty); + ttyld_rint(cur_tty, 0x1b); + ttyld_rint(cur_tty, '['); + ttyld_rint(cur_tty, 'Z'); break; } } @@ -3571,7 +3571,7 @@ sc_paste(scr_stat *scp, u_char *p, int count) return; rmap = scp->sc->scr_rmap; for (; count > 0; --count) - (*linesw[tp->t_line].l_rint)(rmap[*p++], tp); + ttyld_rint(tp, rmap[*p++]); } void diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index b5135001a954..69c0ef3a4105 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -92,12 +92,12 @@ smopen(dev_t dev, int flag, int mode, struct thread *td) tp->t_lflag = TTYDEF_LFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; smparam(tp, &tp->t_termios); - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } else if (tp->t_state & TS_XCLUDE && suser(td)) { return EBUSY; } - return (*linesw[tp->t_line].l_open)(dev, tp); + return ttyld_open(tp, dev); } static int @@ -109,7 +109,7 @@ smclose(dev_t dev, int flag, int mode, struct thread *td) tp = dev->si_tty; s = spltty(); mouse_level = 0; - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); splx(s); @@ -306,7 +306,7 @@ sysmouse_event(mouse_info_t *info) buf[2] = y >> 1; buf[4] = y - buf[2]; for (i = 0; i < MOUSE_MSC_PACKETSIZE; ++i) - (*linesw[sysmouse_tty->t_line].l_rint)(buf[i], sysmouse_tty); + ttyld_rint(sysmouse_tty, buf[i]); if (mouse_level >= 1) { /* extended part */ z = imax(imin(z, 127), -128); diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 6867299a1ec3..f42a7dc16f59 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -286,24 +286,24 @@ uart_tty_intr(void *arg) c |= TTY_FE; if (xc & UART_STAT_PARERR) c |= TTY_PE; - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); } } if (pend & UART_IPEND_BREAK) { if (tp != NULL && !(tp->t_iflag & IGNBRK)) - (*linesw[tp->t_line].l_rint)(0, tp); + ttyld_rint(tp, 0); } if (pend & UART_IPEND_SIGCHG) { sig = pend & UART_IPEND_SIGMASK; if (sig & UART_SIG_DDCD) - (*linesw[tp->t_line].l_modem)(tp, sig & UART_SIG_DCD); + ttyld_modem(tp, sig & UART_SIG_DCD); if ((sig & UART_SIG_DCTS) && (tp->t_cflag & CCTS_OFLOW) && !sc->sc_hwoflow) { if (sig & UART_SIG_CTS) { tp->t_state &= ~TS_TTSTOP; - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } else tp->t_state |= TS_TTSTOP; } @@ -311,7 +311,7 @@ uart_tty_intr(void *arg) if (pend & UART_IPEND_TXIDLE) { tp->t_state &= ~TS_BUSY; - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } @@ -422,7 +422,7 @@ uart_tty_open(dev_t dev, int flags, int mode, struct thread *td) * Handle initial DCD. */ if ((sc->sc_hwsig & UART_SIG_DCD) || sc->sc_callout) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } /* * Wait for DCD if necessary. @@ -440,7 +440,7 @@ uart_tty_open(dev_t dev, int flags, int mode, struct thread *td) error = ttyopen(dev, tp); if (error) return (error); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error) return (error); @@ -475,7 +475,7 @@ uart_tty_close(dev_t dev, int flags, int mode, struct thread *td) /* Disable pulse capturing. */ sc->sc_pps.ppsparam.mode = 0; - (*linesw[tp->t_line].l_close)(tp, flags); + ttyld_close(tp, flags); ttyclose(tp); wakeup(sc); wakeup(TSA_CARR_ON(tp)); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 59ad8d5a6f68..f64fd0e3eb24 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -440,7 +440,7 @@ bad: tp = sc->dev[i]->si_tty; if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { - (*linesw[tp->t_line].l_close)(tp, 0); + ttyld_close(tp, 0); ttyclose(tp); } } @@ -474,7 +474,7 @@ USB_DETACH(ubser) tp = sc->dev[i]->si_tty; if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { - (*linesw[tp->t_line].l_close)(tp, 0); + ttyld_close(tp, 0); ttyclose(tp); } } @@ -694,7 +694,7 @@ ubserwritecb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) CLR(tp->t_state, TS_FLUSH); else ndflush(&tp->t_outq, cc); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); splx(s); return; @@ -900,7 +900,7 @@ ubser_open(dev_t dev, int flag, int mode, usb_proc_ptr p) /* * Handle initial DCD. */ - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); } sc->sc_refcnt++; /* XXX: wrong refcnt on error later on */ @@ -912,7 +912,7 @@ ubser_open(dev_t dev, int flag, int mode, usb_proc_ptr p) if (error) goto bad; - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error) goto bad; @@ -1013,7 +1013,7 @@ ubser_read(dev_t dev, struct uio *uio, int flag) if (sc->sc_dying) return (EIO); - error = (*linesw[tp->t_line].l_read)(tp, uio, flag); + error = ttyld_read(tp, uio, flag); DPRINTF(("ubser_read: error = %d\n", error)); @@ -1035,7 +1035,7 @@ ubser_write(dev_t dev, struct uio *uio, int flag) if (sc->sc_dying) return (EIO); - error = (*linesw[tp->t_line].l_write)(tp, uio, flag); + error = ttyld_write(tp, uio, flag); DPRINTF(("ubser_write: error = %d\n", error)); diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index e3cf7b6366de..07d4496c32a5 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -213,7 +213,7 @@ ucom_detach(struct ucom_softc *sc) if (tp->t_state & TS_ISOPEN) { device_printf(sc->sc_dev, "still open, forcing close\n"); - (*linesw[tp->t_line].l_close)(tp, 0); + ttyld_close(tp, 0); ttyclose(tp); } } else { @@ -385,7 +385,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p) */ if (ISSET(sc->sc_msr, UMSR_DCD) || (minor(dev) & UCOM_CALLOUT_MASK)) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); ucomstartread(sc); } @@ -398,7 +398,7 @@ ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p) if (error) goto bad; - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error) goto bad; @@ -461,7 +461,7 @@ ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p) goto quit; s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, sc); ttyclose(tp); splx(s); @@ -503,7 +503,7 @@ ucomread(dev_t dev, struct uio *uio, int flag) if (sc->sc_dying) return (EIO); - error = (*linesw[tp->t_line].l_read)(tp, uio, flag); + error = ttyld_read(tp, uio, flag); DPRINTF(("ucomread: error = %d\n", error)); @@ -525,7 +525,7 @@ ucomwrite(dev_t dev, struct uio *uio, int flag) if (sc->sc_dying) return (EIO); - error = (*linesw[tp->t_line].l_write)(tp, uio, flag); + error = ttyld_write(tp, uio, flag); DPRINTF(("ucomwrite: error = %d\n", error)); @@ -762,7 +762,7 @@ ucom_status_change(struct ucom_softc *sc) return; onoff = ISSET(sc->sc_msr, UMSR_DCD) ? 1 : 0; DPRINTF(("ucom_status_change: DCD changed to %d\n", onoff)); - (*linesw[tp->t_line].l_modem)(tp, onoff); + ttyld_modem(tp, onoff); } } @@ -993,7 +993,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) CLR(tp->t_state, TS_FLUSH); else ndflush(&tp->t_outq, cc); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); splx(s); return; diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 6de28ed13152..46955261771b 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -436,13 +436,13 @@ zstty_softintr(struct zstty_softc *sc) if (sc->sc_iget == sc->sc_ibuf + sizeof(sc->sc_ibuf)) sc->sc_iget = sc->sc_ibuf; - (*linesw[tp->t_line].l_rint)(data, tp); + ttyld_rint(tp, data); } if (sc->sc_tx_done != 0) { sc->sc_tx_done = 0; tp->t_state &= ~TS_BUSY; - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } @@ -495,7 +495,7 @@ zsttyopen(dev_t dev, int flags, int mode, struct thread *td) if (error != 0) return (error); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error != 0) return (error); @@ -512,7 +512,7 @@ zsttyclose(dev_t dev, int flags, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) return (0); - (*linesw[tp->t_line].l_close)(tp, flags); + ttyld_close(tp, flags); ttyclose(tp); return (0); diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index d7d56d04390e..39c7b837ebdc 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -304,7 +304,7 @@ pcvt_open(dev_t dev, int flag, int mode, struct thread *td) tp->t_lflag = TTYDEF_LFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; pcvt_param(tp, &tp->t_termios); - (*linesw[tp->t_line].l_modem)(tp, 1); /* fake connection */ + ttyld_modem(tp, 1); /* fake connection */ winsz = 1; /* set winsize later */ } else if (tp->t_state & TS_XCLUDE && suser(td)) @@ -312,7 +312,7 @@ pcvt_open(dev_t dev, int flag, int mode, struct thread *td) return (EBUSY); } - retval = ((*linesw[tp->t_line].l_open)(dev, tp)); + retval = (ttyld_open(tp, dev)); if(winsz == 1) { @@ -352,7 +352,7 @@ pcvt_close(dev_t dev, int flag, int mode, struct thread *td) tp = pcvt_tty[i]; - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); @@ -442,13 +442,13 @@ pcvt_timeout(void *arg) if(*cp == '\0') { /* pass a NULL character */ - (*linesw[tp->t_line].l_rint)('\0', tp); + ttyld_rint(tp, '\0'); } /* XXX */ else #endif /* PCVT_NULLCHARS */ while (*cp) - (*linesw[tp->t_line].l_rint)(*cp++ & 0xff, tp); + ttyld_rint(tp, *cp++ & 0xff); } PCVT_DISABLE_INTR (); diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index d483aeb1b536..d87aa7609448 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -164,7 +164,7 @@ sscopen(dev_t dev, int flag, int mode, struct thread *td) splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error == 0 && setuptimeout) { polltime = hz / SSC_POLL_HZ; @@ -185,7 +185,7 @@ sscclose(dev_t dev, int flag, int mode, struct thread *td) return ENXIO; untimeout(ssctimeout, tp, ssctimeouthandle); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); ttyclose(tp); return 0; } @@ -242,7 +242,7 @@ ssctimeout(void *v) while ((c = ssccncheckc(NULL)) != -1) { if (tp->t_state & TS_ISOPEN) - (*linesw[tp->t_line].l_rint)(c, tp); + ttyld_rint(tp, c); } ssctimeouthandle = timeout(ssctimeout, tp, polltime); } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index a49583e24a46..f43dd2f3b2a1 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1014,10 +1014,10 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) return (ENXIO); if (t != tp->t_line) { s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); error = (*linesw[t].l_open)(device, tp); if (error) { - (void)(*linesw[tp->t_line].l_open)(device, tp); + (void)ttyld_open(tp, device); splx(s); return (error); } @@ -1042,7 +1042,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) if (!isctty(p, tp) && suser(td)) return (EACCES); s = spltty(); - (*linesw[tp->t_line].l_rint)(*(u_char *)data, tp); + ttyld_rint(tp, *(u_char *)data); splx(s); break; case TIOCSTOP: /* stop output, like ^S */ @@ -2728,7 +2728,7 @@ ttyread(dev_t dev, struct uio *uio, int flag) ("ttyread(): no tty pointer on device (%s)", devtoname(dev))); if (tp == NULL) return (ENODEV); - return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); + return (ttyld_read(tp, uio, flag)); } int @@ -2743,7 +2743,7 @@ ttywrite(dev_t dev, struct uio *uio, int flag) ("ttywrite(): no tty pointer on device (%s)", devtoname(dev))); if (tp == NULL) return (ENODEV); - return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); + return (ttyld_write(tp, uio, flag)); } int diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 4542bbe53684..599b0b09ddd2 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -182,7 +182,7 @@ ptsopen(dev, flag, devtype, td) else if (pti->pt_prison != td->td_ucred->cr_prison) return (EBUSY); if (tp->t_oproc) /* Ctrlr still around. */ - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); while ((tp->t_state & TS_CARR_ON) == 0) { if (flag&FNONBLOCK) break; @@ -191,7 +191,7 @@ ptsopen(dev, flag, devtype, td) if (error) return (error); } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); if (error == 0) ptcwakeup(tp, FREAD|FWRITE); return (error); @@ -207,7 +207,7 @@ ptsclose(dev, flag, mode, td) int err; tp = dev->si_tty; - err = (*linesw[tp->t_line].l_close)(tp, flag); + err = ttyld_close(tp, flag); (void) ttyclose(tp); return (err); } @@ -268,7 +268,7 @@ again: return (error); } else if (tp->t_oproc) - error = (*linesw[tp->t_line].l_read)(tp, uio, flag); + error = ttyld_read(tp, uio, flag); ptcwakeup(tp, FWRITE); return (error); } @@ -289,7 +289,7 @@ ptswrite(dev, uio, flag) tp = dev->si_tty; if (tp->t_oproc == 0) return (EIO); - return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); + return (ttyld_write(tp, uio, flag)); } /* @@ -347,7 +347,7 @@ ptcopen(dev, flag, devtype, td) tp->t_timeout = -1; tp->t_oproc = ptsstart; tp->t_stop = ptsstop; - (void)(*linesw[tp->t_line].l_modem)(tp, 1); + (void)ttyld_modem(tp, 1); tp->t_lflag &= ~EXTPROC; pti = dev->si_drv1; pti->pt_prison = td->td_ucred->cr_prison; @@ -367,7 +367,7 @@ ptcclose(dev, flags, fmt, td) struct tty *tp; tp = dev->si_tty; - (void)(*linesw[tp->t_line].l_modem)(tp, 0); + (void)ttyld_modem(tp, 0); /* * XXX MDMBUF makes no sense for ptys but would inhibit the above @@ -600,7 +600,7 @@ again: wakeup(TSA_HUP_OR_INPUT(tp)); goto block; } - (*linesw[tp->t_line].l_rint)(*cp++, tp); + ttyld_rint(tp, *cp++); cnt++; cc--; } diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index ba1a15f29aff..1416b276d829 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -782,7 +782,7 @@ siodetach(dev) com->ioportres); if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); - (*linesw[com->tp->t_line].l_close)(com->tp, 0); + ttyld_close(com->tp, 0); ttyclose(com->tp); } else { if (com->ibuf != NULL) @@ -2048,10 +2048,10 @@ open_top: (!IS_8251(com->pc98_if_type) && (com->prev_modem_status & MSR_DCD)) || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); #else if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); #endif } /* @@ -2068,7 +2068,7 @@ open_top: goto out; goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); disc_optim(tp, &tp->t_termios, com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; @@ -2100,7 +2100,7 @@ sioclose(dev, flag, mode, td) return (ENODEV); tp = com->tp; s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); #ifdef PC98 com->modem_checking = 0; #endif @@ -2236,7 +2236,7 @@ sioread(dev, uio, flag) com = com_addr(MINOR_TO_UNIT(mynor)); if (com == NULL || com->gone) return (ENODEV); - return ((*linesw[com->tp->t_line].l_read)(com->tp, uio, flag)); + return (ttyld_read(com->tp, uio, flag)); } static int @@ -2265,7 +2265,7 @@ siowrite(dev, uio, flag) */ if (constty != NULL && unit == comconsole) constty = NULL; - return ((*linesw[com->tp->t_line].l_write)(com->tp, uio, flag)); + return (ttyld_write(com->tp, uio, flag)); } static void @@ -2430,7 +2430,7 @@ sioinput(com) if (line_status & LSR_PE) recv_data |= TTY_PE; } - (*linesw[tp->t_line].l_rint)(recv_data, tp); + ttyld_rint(tp, recv_data); mtx_lock_spin(&sio_lock); } while (buf < com->iptr); } @@ -3218,7 +3218,7 @@ repeat: timeout(siobusycheck, com, hz / 100); com->extra_state |= CSE_BUSYCHECK; } - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } if (com_events == 0) break; @@ -3886,8 +3886,8 @@ commint(dev_t dev) } if ((delta & TIOCM_CAR) && (mynor & CALLOUT_MASK) == 0) { if (stat & TIOCM_CAR ) - (void)(*linesw[tp->t_line].l_modem)(tp, 1); - else if ((*linesw[tp->t_line].l_modem)(tp, 0) == 0) { + (void)ttyld_modem(tp, 1); + else if (ttyld_modem(tp, 0) == 0) { /* negate DTR, RTS */ com_tiocm_bic(com, (tp->t_cflag & HUPCL) ? TIOCM_DTR|TIOCM_RTS|TIOCM_LE : TIOCM_LE ); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index ba1a15f29aff..1416b276d829 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -782,7 +782,7 @@ siodetach(dev) com->ioportres); if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); - (*linesw[com->tp->t_line].l_close)(com->tp, 0); + ttyld_close(com->tp, 0); ttyclose(com->tp); } else { if (com->ibuf != NULL) @@ -2048,10 +2048,10 @@ open_top: (!IS_8251(com->pc98_if_type) && (com->prev_modem_status & MSR_DCD)) || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); #else if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) - (*linesw[tp->t_line].l_modem)(tp, 1); + ttyld_modem(tp, 1); #endif } /* @@ -2068,7 +2068,7 @@ open_top: goto out; goto open_top; } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = ttyld_open(tp, dev); disc_optim(tp, &tp->t_termios, com); if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) com->active_out = TRUE; @@ -2100,7 +2100,7 @@ sioclose(dev, flag, mode, td) return (ENODEV); tp = com->tp; s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); + ttyld_close(tp, flag); #ifdef PC98 com->modem_checking = 0; #endif @@ -2236,7 +2236,7 @@ sioread(dev, uio, flag) com = com_addr(MINOR_TO_UNIT(mynor)); if (com == NULL || com->gone) return (ENODEV); - return ((*linesw[com->tp->t_line].l_read)(com->tp, uio, flag)); + return (ttyld_read(com->tp, uio, flag)); } static int @@ -2265,7 +2265,7 @@ siowrite(dev, uio, flag) */ if (constty != NULL && unit == comconsole) constty = NULL; - return ((*linesw[com->tp->t_line].l_write)(com->tp, uio, flag)); + return (ttyld_write(com->tp, uio, flag)); } static void @@ -2430,7 +2430,7 @@ sioinput(com) if (line_status & LSR_PE) recv_data |= TTY_PE; } - (*linesw[tp->t_line].l_rint)(recv_data, tp); + ttyld_rint(tp, recv_data); mtx_lock_spin(&sio_lock); } while (buf < com->iptr); } @@ -3218,7 +3218,7 @@ repeat: timeout(siobusycheck, com, hz / 100); com->extra_state |= CSE_BUSYCHECK; } - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } if (com_events == 0) break; @@ -3886,8 +3886,8 @@ commint(dev_t dev) } if ((delta & TIOCM_CAR) && (mynor & CALLOUT_MASK) == 0) { if (stat & TIOCM_CAR ) - (void)(*linesw[tp->t_line].l_modem)(tp, 1); - else if ((*linesw[tp->t_line].l_modem)(tp, 0) == 0) { + (void)ttyld_modem(tp, 1); + else if (ttyld_modem(tp, 0) == 0) { /* negate DTR, RTS */ com_tiocm_bic(com, (tp->t_cflag & HUPCL) ? TIOCM_DTR|TIOCM_RTS|TIOCM_LE : TIOCM_LE ); -- cgit v1.3 From 89c9c53da05197f657dfe8e0bdda6941a2e9a0d4 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 16 Jun 2004 09:47:26 +0000 Subject: Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly. --- sys/alpha/alpha/mem.c | 14 ++-- sys/alpha/alpha/promcons.c | 4 +- sys/alpha/include/cpu.h | 2 +- sys/alpha/tlsb/zs_tlsb.c | 4 +- sys/amd64/amd64/mem.c | 12 ++-- sys/amd64/include/cpu.h | 2 +- sys/arm/arm/nexus_io.c | 2 +- sys/arm/include/bus.h | 4 +- sys/arm/sa11x0/sa11x0_io.c | 2 +- sys/boot/i386/libi386/bioscd.c | 4 +- sys/boot/i386/libi386/biosdisk.c | 2 +- sys/boot/i386/libi386/libi386.h | 4 +- sys/boot/pc98/boot2/dinode.h | 2 +- sys/boot/pc98/boot2/inode.h | 2 +- sys/boot/pc98/libpc98/biosdisk.c | 2 +- sys/cam/cam_xpt.c | 6 +- sys/cam/scsi/scsi_ch.c | 8 +-- sys/cam/scsi/scsi_pass.c | 8 +-- sys/cam/scsi/scsi_pt.c | 8 +-- sys/cam/scsi/scsi_sa.c | 20 +++--- sys/cam/scsi/scsi_ses.c | 8 +-- sys/cam/scsi/scsi_target.c | 18 ++--- sys/coda/cnode.h | 6 +- sys/coda/coda.h | 2 +- sys/coda/coda_fbsd.c | 4 +- sys/coda/coda_psdev.c | 12 ++-- sys/coda/coda_psdev.h | 12 ++-- sys/coda/coda_venus.c | 2 +- sys/coda/coda_venus.h | 2 +- sys/coda/coda_vfsops.c | 6 +- sys/coda/coda_vnops.c | 4 +- sys/coda/coda_vnops.h | 2 +- sys/compat/linux/linux_stats.c | 12 ++-- sys/contrib/dev/fla/fla.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.c | 10 ++- sys/contrib/ipfilter/netinet/ip_fil.h | 8 +-- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 2 +- sys/contrib/pf/net/pf_ioctl.c | 18 ++--- sys/dev/aac/aac.c | 8 +-- sys/dev/aac/aacvar.h | 2 +- sys/dev/acpi_support/acpi_asus.c | 6 +- sys/dev/acpica/acpi.c | 6 +- sys/dev/acpica/acpivar.h | 2 +- sys/dev/adlink/adlink.c | 8 +-- sys/dev/agp/agp.c | 8 +-- sys/dev/agp/agppriv.h | 2 +- sys/dev/amr/amr.c | 8 +-- sys/dev/amr/amrvar.h | 2 +- sys/dev/asr/asr.c | 14 ++-- sys/dev/ata/ata-all.c | 2 +- sys/dev/ata/atapi-tape.c | 8 +-- sys/dev/ata/atapi-tape.h | 2 +- sys/dev/atkbdc/psm.c | 14 ++-- sys/dev/bktr/bktr_core.c | 2 +- sys/dev/bktr/bktr_core.h | 2 +- sys/dev/bktr/bktr_os.c | 14 ++-- sys/dev/bktr/bktr_reg.h | 12 ++-- sys/dev/ciss/ciss.c | 6 +- sys/dev/ciss/cissvar.h | 2 +- sys/dev/cp/if_cp.c | 10 +-- sys/dev/ctau/if_ct.c | 10 +-- sys/dev/cx/if_cx.c | 14 ++-- sys/dev/cy/cy.c | 8 +-- sys/dev/dcons/dcons.c | 12 ++-- sys/dev/digi/digi.c | 10 +-- sys/dev/digi/digi.h | 4 +- sys/dev/drm/drmP.h | 2 +- sys/dev/drm/drm_drv.h | 6 +- sys/dev/drm/drm_fops.h | 6 +- sys/dev/drm/drm_os_freebsd.h | 4 +- sys/dev/drm/drm_vm.h | 4 +- sys/dev/fb/creatorreg.h | 2 +- sys/dev/fb/gfb.h | 2 +- sys/dev/fb/vga.c | 12 ++-- sys/dev/fb/vgareg.h | 12 ++-- sys/dev/fdc/fdc.c | 16 ++--- sys/dev/firewire/firewirereg.h | 6 +- sys/dev/firewire/fwdev.c | 22 +++---- sys/dev/firewire/fwmem.c | 14 ++-- sys/dev/firewire/fwohci.c | 2 +- sys/dev/gfb/gfb_pci.c | 12 ++-- sys/dev/ida/ida.c | 2 +- sys/dev/ida/idavar.h | 2 +- sys/dev/iicbus/iic.c | 12 ++-- sys/dev/iir/iir.h | 6 +- sys/dev/iir/iir_ctrl.c | 16 ++--- sys/dev/ips/ips.c | 6 +- sys/dev/ips/ips.h | 2 +- sys/dev/isp/isp_freebsd.c | 2 +- sys/dev/joy/joy.c | 8 +-- sys/dev/joy/joyvar.h | 2 +- sys/dev/kbd/kbd.c | 12 ++-- sys/dev/kbd/kbdreg.h | 2 +- sys/dev/led/led.c | 8 +-- sys/dev/led/led.h | 4 +- sys/dev/matcd/matcd.c | 18 ++--- sys/dev/matcd/matcd_data.h | 2 +- sys/dev/mcd/mcd.c | 10 +-- sys/dev/mcd/mcdvar.h | 2 +- sys/dev/md/md.c | 6 +- sys/dev/mlx/mlx.c | 8 +-- sys/dev/mlx/mlxvar.h | 2 +- sys/dev/mly/mly.c | 6 +- sys/dev/mly/mlyvar.h | 2 +- sys/dev/mse/mse.c | 18 ++--- sys/dev/nmdm/nmdm.c | 16 ++--- sys/dev/null/null.c | 10 +-- sys/dev/ofw/ofw_console.c | 6 +- sys/dev/ofw/openfirmio.c | 4 +- sys/dev/ofw/openpromio.c | 8 +-- sys/dev/pci/pci.c | 2 +- sys/dev/pci/pci_user.c | 6 +- sys/dev/ppbus/lpt.c | 10 +-- sys/dev/ppbus/pcfclock.c | 14 ++-- sys/dev/ppbus/ppi.c | 10 +-- sys/dev/ppbus/pps.c | 10 +-- sys/dev/random/randomdev.c | 12 ++-- sys/dev/rc/rc.c | 12 ++-- sys/dev/rp/rp.c | 10 +-- sys/dev/rp/rpreg.h | 2 +- sys/dev/sab/sab.c | 8 +-- sys/dev/scd/scd.c | 6 +- sys/dev/scd/scdvar.h | 2 +- sys/dev/si/si.c | 12 ++-- sys/dev/sio/sio.c | 12 ++-- sys/dev/smbus/smb.c | 8 +-- sys/dev/snp/snp.c | 24 +++---- sys/dev/sound/pcm/dsp.c | 30 ++++----- sys/dev/sound/pcm/mixer.c | 22 +++---- sys/dev/sound/pcm/mixer.h | 2 +- sys/dev/sound/pcm/sndstat.c | 8 +-- sys/dev/sound/pcm/sound.h | 10 +-- sys/dev/speaker/spkr.c | 10 +-- sys/dev/streams/streams.c | 6 +- sys/dev/sx/sx.c | 8 +-- sys/dev/syscons/scvesactl.c | 2 +- sys/dev/syscons/syscons.c | 26 ++++---- sys/dev/syscons/syscons.h | 4 +- sys/dev/syscons/sysmouse.c | 8 +-- sys/dev/tdfx/tdfx_pci.c | 8 +-- sys/dev/tdfx/tdfx_vars.h | 2 +- sys/dev/ti/if_ti.c | 6 +- sys/dev/ti/if_tireg.h | 2 +- sys/dev/twa/twa.h | 2 +- sys/dev/twa/twa_freebsd.c | 8 +-- sys/dev/twe/twe_compat.h | 2 +- sys/dev/twe/twe_freebsd.c | 8 +-- sys/dev/uart/uart_bus.h | 2 +- sys/dev/uart/uart_tty.c | 6 +- sys/dev/usb/ubser.c | 12 ++-- sys/dev/usb/ucom.c | 10 +-- sys/dev/usb/ucomvar.h | 2 +- sys/dev/usb/ufm.c | 8 +-- sys/dev/usb/ugen.c | 20 +++--- sys/dev/usb/uhid.c | 14 ++-- sys/dev/usb/ulpt.c | 12 ++-- sys/dev/usb/ums.c | 12 ++-- sys/dev/usb/urio.c | 14 ++-- sys/dev/usb/usb.c | 10 +-- sys/dev/usb/uscanner.c | 12 ++-- sys/dev/vinum/vinum.c | 12 ++-- sys/dev/vinum/vinumext.h | 10 +-- sys/dev/vinum/vinumioctl.c | 4 +- sys/dev/vinum/vinumobj.h | 8 +-- sys/dev/vinum/vinumutil.c | 11 +++- sys/dev/watchdog/watchdog.c | 4 +- sys/dev/zs/z8530var.h | 2 +- sys/dev/zs/zs.c | 6 +- sys/fs/cd9660/cd9660_node.c | 2 +- sys/fs/cd9660/cd9660_node.h | 2 +- sys/fs/cd9660/cd9660_vfsops.c | 8 +-- sys/fs/cd9660/iso.h | 2 +- sys/fs/coda/cnode.h | 6 +- sys/fs/coda/coda.h | 2 +- sys/fs/coda/coda_fbsd.c | 4 +- sys/fs/coda/coda_psdev.c | 12 ++-- sys/fs/coda/coda_psdev.h | 12 ++-- sys/fs/coda/coda_venus.c | 2 +- sys/fs/coda/coda_venus.h | 2 +- sys/fs/coda/coda_vfsops.c | 6 +- sys/fs/coda/coda_vnops.c | 4 +- sys/fs/coda/coda_vnops.h | 2 +- sys/fs/devfs/devfs.h | 2 +- sys/fs/devfs/devfs_devs.c | 22 +++---- sys/fs/devfs/devfs_rule.c | 20 +++--- sys/fs/devfs/devfs_vnops.c | 6 +- sys/fs/hpfs/hpfs.h | 10 +-- sys/fs/hpfs/hpfs_hash.c | 6 +- sys/fs/hpfs/hpfs_vfsops.c | 2 +- sys/fs/msdosfs/msdosfs_denode.c | 6 +- sys/fs/msdosfs/msdosfs_vfsops.c | 2 +- sys/fs/msdosfs/msdosfsmount.h | 2 +- sys/fs/ntfs/ntfs.h | 2 +- sys/fs/ntfs/ntfs_ihash.c | 2 +- sys/fs/ntfs/ntfs_ihash.h | 4 +- sys/fs/ntfs/ntfs_inode.h | 2 +- sys/fs/ntfs/ntfs_vfsops.c | 2 +- sys/fs/specfs/spec_vnops.c | 26 ++++---- sys/fs/udf/udf.h | 4 +- sys/geom/gate/g_gate.c | 4 +- sys/geom/geom.h | 3 +- sys/geom/geom_ctl.c | 4 +- sys/geom/geom_dev.c | 20 +++--- sys/gnu/ext2fs/ext2_extern.h | 4 +- sys/gnu/ext2fs/ext2_ihash.c | 4 +- sys/gnu/ext2fs/ext2_mount.h | 2 +- sys/gnu/ext2fs/ext2_vfsops.c | 8 +-- sys/gnu/ext2fs/inode.h | 4 +- sys/gnu/fs/ext2fs/ext2_extern.h | 4 +- sys/gnu/fs/ext2fs/ext2_mount.h | 2 +- sys/gnu/fs/ext2fs/ext2_vfsops.c | 8 +-- sys/gnu/fs/ext2fs/inode.h | 4 +- sys/i386/acpica/acpi_asus.c | 6 +- sys/i386/acpica/acpi_machdep.c | 10 +-- sys/i386/bios/apm.c | 10 +-- sys/i386/bios/smapi.c | 4 +- sys/i386/i386/elan-mmcr.c | 6 +- sys/i386/i386/geode.c | 2 +- sys/i386/i386/machdep.c | 4 +- sys/i386/i386/mem.c | 12 ++-- sys/i386/i386/perfmon.c | 6 +- sys/i386/include/cpu.h | 2 +- sys/i386/isa/mse.c | 18 ++--- sys/i386/isa/pcvt/pcvt_drv.c | 8 +-- sys/i386/isa/pcvt/pcvt_ext.c | 2 +- sys/i386/isa/pcvt/pcvt_hdr.h | 6 +- sys/i386/isa/pcvt/pcvt_kbd.c | 2 +- sys/i386/isa/pcvt/pcvt_sup.c | 18 ++--- sys/i386/isa/spic.c | 10 +-- sys/i386/isa/spkr.c | 10 +-- sys/i4b/driver/i4b_ctl.c | 8 +-- sys/i4b/driver/i4b_rbch.c | 12 ++-- sys/i4b/driver/i4b_tel.c | 12 ++-- sys/i4b/driver/i4b_trace.c | 10 +-- sys/i4b/layer4/i4b_i4bdrv.c | 10 +-- sys/ia64/ia64/mem.c | 14 ++-- sys/ia64/ia64/ssc.c | 4 +- sys/ia64/ia64/sscdisk.c | 2 +- sys/ia64/include/cpu.h | 2 +- sys/isa/psm.c | 14 ++-- sys/isa/vga_isa.c | 12 ++-- sys/isofs/cd9660/cd9660_node.c | 2 +- sys/isofs/cd9660/cd9660_node.h | 2 +- sys/isofs/cd9660/cd9660_vfsops.c | 8 +-- sys/isofs/cd9660/iso.h | 2 +- sys/kern/kern_conf.c | 76 +++++++++++----------- sys/kern/kern_descrip.c | 4 +- sys/kern/kern_physio.c | 2 +- sys/kern/subr_bus.c | 12 ++-- sys/kern/subr_devstat.c | 2 +- sys/kern/subr_log.c | 10 +-- sys/kern/tty.c | 22 +++---- sys/kern/tty_conf.c | 2 +- sys/kern/tty_cons.c | 18 ++--- sys/kern/tty_pty.c | 32 ++++----- sys/kern/tty_tty.c | 6 +- sys/kern/vfs_bio.c | 2 +- sys/kern/vfs_mount.c | 16 ++--- sys/kern/vfs_subr.c | 24 +++---- sys/net/bpf.c | 18 ++--- sys/net/if.c | 8 +-- sys/net/if_sl.c | 4 +- sys/net/if_tap.c | 20 +++--- sys/net/if_tapvar.h | 2 +- sys/net/if_tun.c | 26 ++++---- sys/net/if_var.h | 2 +- sys/net/ppp_tty.c | 4 +- sys/netgraph/bluetooth/drivers/h4/ng_h4.c | 4 +- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 12 ++-- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h | 6 +- sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c | 18 ++--- sys/netgraph/ng_device.c | 14 ++-- sys/netgraph/ng_tty.c | 4 +- sys/netncp/ncp_mod.c | 4 +- sys/netsmb/smb_dev.c | 10 +-- sys/nfs4client/nfs4_dev.c | 10 +-- sys/opencrypto/cryptodev.c | 10 +-- sys/pc98/cbus/fdc.c | 16 ++--- sys/pc98/cbus/gdc.c | 12 ++-- sys/pc98/cbus/olpt.c | 8 +-- sys/pc98/cbus/sio.c | 24 +++---- sys/pc98/i386/machdep.c | 4 +- sys/pc98/pc98/fd.c | 16 ++--- sys/pc98/pc98/machdep.c | 4 +- sys/pc98/pc98/mse.c | 18 ++--- sys/pc98/pc98/olpt.c | 8 +-- sys/pc98/pc98/pc98gdc.c | 12 ++-- sys/pc98/pc98/sio.c | 24 +++---- sys/pc98/pc98/wd_cd.c | 8 +-- sys/pccard/pccard.c | 12 ++-- sys/pccard/slot.h | 2 +- sys/pci/agp.c | 8 +-- sys/pci/agppriv.h | 2 +- sys/pci/if_ti.c | 6 +- sys/pci/if_tireg.h | 2 +- sys/pci/xrpu.c | 8 +-- sys/powerpc/ofw/ofw_syscons.h | 2 +- sys/security/mac/mac_framework.h | 3 +- sys/security/mac/mac_policy.h | 2 +- sys/security/mac/mac_vfs.c | 2 +- sys/security/mac_biba/mac_biba.c | 2 +- sys/security/mac_lomac/mac_lomac.c | 2 +- sys/security/mac_mls/mac_mls.c | 2 +- sys/security/mac_stub/mac_stub.c | 2 +- sys/security/mac_test/mac_test.c | 2 +- sys/sparc64/creator/creator.h | 2 +- sys/sparc64/creator/creator_upa.c | 8 +-- sys/sparc64/include/cpu.h | 2 +- sys/sparc64/sparc64/mem.c | 8 +-- sys/sys/_types.h | 7 +- sys/sys/bio.h | 4 +- sys/sys/conf.h | 56 ++++++++-------- sys/sys/linedisc.h | 4 +- sys/sys/mac.h | 3 +- sys/sys/mac_policy.h | 2 +- sys/sys/mount.h | 2 +- sys/sys/param.h | 2 +- sys/sys/stat.h | 2 + sys/sys/sysctl.h | 2 +- sys/sys/systm.h | 14 ++-- sys/sys/tty.h | 4 +- sys/sys/types.h | 2 + sys/sys/vnode.h | 6 +- sys/ufs/ffs/ffs_alloc.c | 4 +- sys/ufs/ffs/ffs_vfsops.c | 4 +- sys/ufs/ufs/dinode.h | 2 +- sys/ufs/ufs/ufs_extern.h | 4 +- sys/ufs/ufs/ufs_ihash.c | 4 +- sys/ufs/ufs/ufsmount.h | 2 +- sys/vm/device_pager.c | 4 +- sys/vm/swap_pager.c | 2 +- 331 files changed, 1290 insertions(+), 1279 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/mem.c b/sys/alpha/alpha/mem.c index 4cd0bdb7b58a..a64ea2aadf4a 100644 --- a/sys/alpha/alpha/mem.c +++ b/sys/alpha/alpha/mem.c @@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$"); #include #include -static dev_t memdev, kmemdev; +static struct cdev *memdev, *kmemdev; #ifdef PERFMON -static dev_t perfdev; +static struct cdev *perfdev; #endif /* PERFMON */ static d_open_t mmopen; @@ -95,7 +95,7 @@ static struct cdevsw mem_cdevsw = { struct mem_range_softc mem_range_softc; static int -mmclose(dev_t dev, int flags, int fmt, struct thread *td) +mmclose(struct cdev *dev, int flags, int fmt, struct thread *td) { switch (minor(dev)) { #ifdef PERFMON @@ -109,7 +109,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -mmopen(dev_t dev, int flags, int fmt, struct thread *td) +mmopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int error; @@ -136,7 +136,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) /*ARGSUSED*/ static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(struct cdev *dev, struct uio *uio, int flags) { vm_offset_t o, v; int c = 0; @@ -219,7 +219,7 @@ kmemphys: * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { /* * /dev/mem is the only one that makes sense through this @@ -240,7 +240,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) } static int -mmioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td) +mmioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td) { switch(minor(dev)) { #ifdef PERFMON diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 3a127ead0490..6ced298effd4 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -86,7 +86,7 @@ void promcons_delayed_makedev(void); int promopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag, mode; struct thread *td; { @@ -137,7 +137,7 @@ promopen(dev, flag, mode, td) int promclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag, mode; struct thread *td; { diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h index 9db2b9aad497..1edf6bebab64 100644 --- a/sys/alpha/include/cpu.h +++ b/sys/alpha/include/cpu.h @@ -66,7 +66,7 @@ struct clockframe { /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */ #define CPU_ROOT_DEVICE 2 /* string: root device name */ #define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */ #define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */ diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 1387f9713949..d4504d330d70 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -258,7 +258,7 @@ zs_cnputc(struct consdev *cp, int c) static int -zsopen(dev_t dev, int flag, int mode, struct thread *td) +zsopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct zs_softc *sc = ZS_SOFTC(minor(dev)); struct tty *tp; @@ -305,7 +305,7 @@ zsopen(dev_t dev, int flag, int mode, struct thread *td) } static int -zsclose(dev_t dev, int flag, int mode, struct thread *td) +zsclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct zs_softc *sc = ZS_SOFTC(minor(dev)); struct tty *tp; diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index d4cf7823caeb..739ae6deb655 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include -static dev_t memdev, kmemdev, iodev; +static struct cdev *memdev, *kmemdev, *iodev; static d_open_t mmopen; static d_close_t mmclose; @@ -95,7 +95,7 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); struct mem_range_softc mem_range_softc; static int -mmclose(dev_t dev, int flags, int fmt, struct thread *td) +mmclose(struct cdev *dev, int flags, int fmt, struct thread *td) { switch (minor(dev)) { case 14: @@ -105,7 +105,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -mmopen(dev_t dev, int flags, int fmt, struct thread *td) +mmopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int error; @@ -133,7 +133,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) /*ARGSUSED*/ static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(struct cdev *dev, struct uio *uio, int flags) { int o; u_long c = 0, v; @@ -214,7 +214,7 @@ kmemphys: * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { switch (minor(dev)) { @@ -242,7 +242,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) * and mem_range_attr_set. */ static int -mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +mmioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int nd, error = 0; struct mem_range_op *mo = (struct mem_range_op *)data; diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index f8a2ee3fef0e..2aeda85bccab 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -65,7 +65,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */ diff --git a/sys/arm/arm/nexus_io.c b/sys/arm/arm/nexus_io.c index 0a93a75b68b8..969c30e95baf 100644 --- a/sys/arm/arm/nexus_io.c +++ b/sys/arm/arm/nexus_io.c @@ -190,7 +190,7 @@ nexus_bs_subregion(t, bsh, offset, size, nbshp) } int -nexus_bs_mmap(dev_t dev, vm_offset_t off, vm_paddr_t *addr, int prot) +nexus_bs_mmap(struct cdev *dev, vm_offset_t off, vm_paddr_t *addr, int prot) { *addr = off; return (0); diff --git a/sys/arm/include/bus.h b/sys/arm/include/bus.h index 798f42539e87..60660506e77a 100644 --- a/sys/arm/include/bus.h +++ b/sys/arm/include/bus.h @@ -118,7 +118,7 @@ struct bus_space { void * (*bs_vaddr) (void *, bus_space_handle_t); /* mmap bus space for user */ - int (*bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int); + int (*bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int); /* barrier */ void (*bs_barrier) (void *, bus_space_handle_t, @@ -411,7 +411,7 @@ void __bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh, \ void * __bs_c(f,_bs_vaddr) (void *t, bus_space_handle_t bsh); #define bs_mmap_proto(f) \ -int __bs_c(f,_bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int); +int __bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int); #define bs_barrier_proto(f) \ void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \ diff --git a/sys/arm/sa11x0/sa11x0_io.c b/sys/arm/sa11x0/sa11x0_io.c index 7b91d5f94ee0..0fe03751d674 100644 --- a/sys/arm/sa11x0/sa11x0_io.c +++ b/sys/arm/sa11x0/sa11x0_io.c @@ -225,7 +225,7 @@ sa11x0_bs_subregion(t, bsh, offset, size, nbshp) } int -sa11x0_bs_mmap(dev_t t, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +sa11x0_bs_mmap(struct cdev *t, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { *paddr = offset; return (0); diff --git a/sys/boot/i386/libi386/bioscd.c b/sys/boot/i386/libi386/bioscd.c index 7259ff59ec04..ad0d40987744 100644 --- a/sys/boot/i386/libi386/bioscd.c +++ b/sys/boot/i386/libi386/bioscd.c @@ -325,7 +325,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable struct cdev *value for (dev). */ int bc_getdev(struct i386_devdesc *dev) @@ -344,7 +344,7 @@ bc_getdev(struct i386_devdesc *dev) * XXX: Need to examine device spec here to figure out if SCSI or * ATAPI. No idea on how to figure out device number. All we can * really pass to the kernel is what bus and device on which bus we - * were booted from, which dev_t isn't well suited to since those + * were booted from, which struct cdev *isn't well suited to since those * number don't match to unit numbers very well. We may just need * to engage in a hack where we pass -C to the boot args if we are * the boot device. diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index aeac2e38904c..42906ba45269 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -1165,7 +1165,7 @@ bd_getbigeom(int bunit) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable struct cdev *value for (dev). * * In the case where it looks like (dev) is a SCSI disk, we allow the number of * IDE disks to be specified in $num_ide_disks. There should be a Better Way. diff --git a/sys/boot/i386/libi386/libi386.h b/sys/boot/i386/libi386/libi386.h index f2696e0a360d..b3feaccc20ba 100644 --- a/sys/boot/i386/libi386/libi386.h +++ b/sys/boot/i386/libi386/libi386.h @@ -72,13 +72,13 @@ extern struct devsw pxedisk; extern struct fs_ops pxe_fsops; int bc_add(int biosdev); /* Register CD booted from. */ -int bc_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bc_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */ int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */ int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */ u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */ int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ -int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bd_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */ ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len); ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len); diff --git a/sys/boot/pc98/boot2/dinode.h b/sys/boot/pc98/boot2/dinode.h index 2a78f344d40c..e5fa7e6a4f89 100644 --- a/sys/boot/pc98/boot2/dinode.h +++ b/sys/boot/pc98/boot2/dinode.h @@ -94,7 +94,7 @@ struct dinode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * struct cdev *value. Short symbolic links place their path in the * di_db area. */ #define di_inumber di_u.inumber diff --git a/sys/boot/pc98/boot2/inode.h b/sys/boot/pc98/boot2/inode.h index 9a59f99bc77b..facc1222217e 100644 --- a/sys/boot/pc98/boot2/inode.h +++ b/sys/boot/pc98/boot2/inode.h @@ -69,7 +69,7 @@ struct inode { struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ u_int32_t i_flag; /* flags, see below */ - dev_t i_dev; /* Device associated with the inode. */ + struct cdev *i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ int i_effnlink; /* i_nlink when I/O completes */ diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index 9b2a535055f0..ec0dffa135a1 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -1481,7 +1481,7 @@ bd_getbigeom(int bunit) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable struct cdev *value for (dev). * * In the case where it looks like (dev) is a SCSI disk, we allow the number of * IDE disks to be specified in $num_ide_disks. There should be a Better Way. diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 3cd6a8bc7c88..592809f19b0e 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -936,7 +936,7 @@ xptdone(struct cam_periph *periph, union ccb *done_ccb) } static int -xptopen(dev_t dev, int flags, int fmt, struct thread *td) +xptopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit; @@ -973,7 +973,7 @@ xptopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -xptclose(dev_t dev, int flag, int fmt, struct thread *td) +xptclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit; @@ -996,7 +996,7 @@ xptclose(dev_t dev, int flag, int fmt, struct thread *td) } static int -xptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { int unit, error; diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index 7caaf0a2d2a2..1cf3b1fb5c72 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -145,7 +145,7 @@ struct ch_softc { ch_quirks quirks; union ccb saved_ccb; struct devstat *device_stats; - dev_t dev; + struct cdev *dev; int sc_picker; /* current picker */ @@ -405,7 +405,7 @@ chregister(struct cam_periph *periph, void *arg) } static int -chopen(dev_t dev, int flags, int fmt, struct thread *td) +chopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct cam_periph *periph; struct ch_softc *softc; @@ -453,7 +453,7 @@ chopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -chclose(dev_t dev, int flag, int fmt, struct thread *td) +chclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; struct ch_softc *softc; @@ -702,7 +702,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) } static int -chioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +chioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct cam_periph *periph; struct ch_softc *softc; diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c index 67c73d9216c2..ec98f42591ac 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -74,7 +74,7 @@ struct pass_softc { u_int8_t pd_type; union ccb saved_ccb; struct devstat *device_stats; - dev_t dev; + struct cdev *dev; }; @@ -317,7 +317,7 @@ passregister(struct cam_periph *periph, void *arg) } static int -passopen(dev_t dev, int flags, int fmt, struct thread *td) +passopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct cam_periph *periph; struct pass_softc *softc; @@ -384,7 +384,7 @@ passopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -passclose(dev_t dev, int flag, int fmt, struct thread *td) +passclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; struct pass_softc *softc; @@ -446,7 +446,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb) } static int -passioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct cam_periph *periph; struct pass_softc *softc; diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c index 9e053f88d09a..94653b524c96 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -83,7 +83,7 @@ struct pt_softc { pt_flags flags; union ccb saved_ccb; int io_timeout; - dev_t dev; + struct cdev *dev; }; static d_open_t ptopen; @@ -134,7 +134,7 @@ static struct cdevsw pt_cdevsw = { #endif static int -ptopen(dev_t dev, int flags, int fmt, struct thread *td) +ptopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct cam_periph *periph; struct pt_softc *softc; @@ -178,7 +178,7 @@ ptopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -ptclose(dev_t dev, int flag, int fmt, struct thread *td) +ptclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; struct pt_softc *softc; @@ -645,7 +645,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) } static int -ptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct cam_periph *periph; struct pt_softc *softc; diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index b1fbd225a74e..4836b8ade116 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -192,11 +192,11 @@ typedef enum { #define SA_NUM_MODES 4 struct sa_devs { - dev_t ctl_dev; + struct cdev *ctl_dev; struct sa_mode_devs { - dev_t r_dev; - dev_t nr_dev; - dev_t er_dev; + struct cdev *r_dev; + struct cdev *nr_dev; + struct cdev *er_dev; } mode_devs[SA_NUM_MODES]; }; @@ -398,7 +398,7 @@ static void saprevent(struct cam_periph *periph, int action); static int sarewind(struct cam_periph *periph); static int saspace(struct cam_periph *periph, int count, scsi_space_code code); -static int samount(struct cam_periph *, int, dev_t); +static int samount(struct cam_periph *, int, struct cdev *); static int saretension(struct cam_periph *periph); static int sareservereleaseunit(struct cam_periph *periph, int reserve); @@ -437,7 +437,7 @@ static struct cdevsw sa_cdevsw = { }; static int -saopen(dev_t dev, int flags, int fmt, struct thread *td) +saopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct cam_periph *periph; struct sa_softc *softc; @@ -497,7 +497,7 @@ saopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -saclose(dev_t dev, int flag, int fmt, struct thread *td) +saclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; struct sa_softc *softc; @@ -756,7 +756,7 @@ sastrategy(struct bio *bp) } static int -saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { struct cam_periph *periph; struct sa_softc *softc; @@ -1473,7 +1473,7 @@ saregister(struct cam_periph *periph, void *arg) * Make the (well known) aliases for the first mode. */ if (i == 0) { - dev_t alias; + struct cdev *alias; alias = make_dev_alias(softc->devs.mode_devs[i].r_dev, "%s%d", periph->periph_name, periph->unit_number); @@ -1777,7 +1777,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb) * Mount the tape (make sure it's ready for I/O). */ static int -samount(struct cam_periph *periph, int oflags, dev_t dev) +samount(struct cam_periph *periph, int oflags, struct cdev *dev) { struct sa_softc *softc; union ccb *ccb; diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index a0a2f14b3802..25b94892ae16 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -145,7 +145,7 @@ struct ses_softc { ses_encstat ses_encstat; /* overall status */ u_int8_t ses_flags; union ccb ses_saved_ccb; - dev_t ses_dev; + struct cdev *ses_dev; struct cam_periph *periph; }; #define SES_FLAG_INVALID 0x01 @@ -405,7 +405,7 @@ sesregister(struct cam_periph *periph, void *arg) } static int -sesopen(dev_t dev, int flags, int fmt, struct thread *td) +sesopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct cam_periph *periph; struct ses_softc *softc; @@ -461,7 +461,7 @@ out: } static int -sesclose(dev_t dev, int flag, int fmt, struct thread *td) +sesclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; struct ses_softc *softc; @@ -517,7 +517,7 @@ seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags) } static int -sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td) +sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td) { struct cam_periph *periph; ses_encstat tmp; diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 9310efe434aa..f3739ea4b4ea 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -142,7 +142,7 @@ static struct targ_cmd_descr * targgetdescr(struct targ_softc *softc); static periph_init_t targinit; static void targclone(void *arg, char *name, int namelen, - dev_t *dev); + struct cdev **dev); static void targasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg); static void abort_all_pending(struct targ_softc *softc); @@ -165,7 +165,7 @@ static MALLOC_DEFINE(M_TARG, "TARG", "TARG data"); /* Create softc and initialize it. Only one proc can open each targ device. */ static int -targopen(dev_t dev, int flags, int fmt, struct thread *td) +targopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct targ_softc *softc; @@ -202,7 +202,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td) /* Disable LUN if enabled and teardown softc */ static int -targclose(dev_t dev, int flag, int fmt, struct thread *td) +targclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct targ_softc *softc; int error; @@ -230,7 +230,7 @@ targclose(dev_t dev, int flag, int fmt, struct thread *td) /* Enable/disable LUNs, set debugging level */ static int -targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct targ_softc *softc; cam_status status; @@ -303,7 +303,7 @@ targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) /* Writes are always ready, reads wait for user_ccb_queue or abort_queue */ static int -targpoll(dev_t dev, int poll_events, struct thread *td) +targpoll(struct cdev *dev, int poll_events, struct thread *td) { struct targ_softc *softc; int revents; @@ -329,7 +329,7 @@ targpoll(dev_t dev, int poll_events, struct thread *td) } static int -targkqfilter(dev_t dev, struct knote *kn) +targkqfilter(struct cdev *dev, struct knote *kn) { struct targ_softc *softc; @@ -534,7 +534,7 @@ targdtor(struct cam_periph *periph) /* Receive CCBs from user mode proc and send them to the HBA */ static int -targwrite(dev_t dev, struct uio *uio, int ioflag) +targwrite(struct cdev *dev, struct uio *uio, int ioflag) { union ccb *user_ccb; struct targ_softc *softc; @@ -835,7 +835,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb) /* Return CCBs to the user from the user queue and abort queue */ static int -targread(dev_t dev, struct uio *uio, int ioflag) +targread(struct cdev *dev, struct uio *uio, int ioflag) { struct descr_queue *abort_queue; struct targ_cmd_descr *user_descr; @@ -1031,7 +1031,7 @@ targinit(void) } static void -targclone(void *arg, char *name, int namelen, dev_t *dev) +targclone(void *arg, char *name, int namelen, struct cdev **dev) { int u; diff --git a/sys/coda/cnode.h b/sys/coda/cnode.h index 540831c719b0..be7e848bbea6 100644 --- a/sys/coda/cnode.h +++ b/sys/coda/cnode.h @@ -109,7 +109,7 @@ struct cnode { struct vattr c_vattr; /* attributes */ char *c_symlink; /* pointer to symbolic link */ u_short c_symlen; /* length of symbolic link */ - dev_t c_device; /* associated vnode device */ + struct cdev *c_device; /* associated vnode device */ ino_t c_inode; /* associated vnode inode */ struct cnode *c_next; /* links if on NetBSD machine */ }; @@ -153,7 +153,7 @@ struct coda_mntinfo { struct vnode *mi_rootvp; struct mount *mi_vfsp; struct vcomm mi_vcomm; - dev_t dev; + struct cdev *dev; int mi_started; }; extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */ @@ -201,7 +201,7 @@ extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type extern int coda_vnodeopstats_init(void); /* coda_vfsops.h */ -extern struct mount *devtomp(dev_t dev); +extern struct mount *devtomp(struct cdev *dev); /* sigh */ #define CODA_RDWR ((u_long) 31) diff --git a/sys/coda/coda.h b/sys/coda/coda.h index e7f1e0d2566b..90e7e2ae7202 100644 --- a/sys/coda/coda.h +++ b/sys/coda/coda.h @@ -58,7 +58,7 @@ typedef unsigned long u_long; typedef unsigned int u_int; typedef unsigned short u_short; typedef u_long ino_t; -typedef u_long dev_t; +typedef u_long struct cdev *; typedef void * caddr_t; #ifdef DOS typedef unsigned __int64 u_quad_t; diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 784962c19e66..0ce6e466e87e 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -174,7 +174,7 @@ printf("error = %d\n", error); /* for DEVFS, using bpf & tun drivers as examples*/ static void coda_fbsd_drvinit(void *unused); static void coda_fbsd_drvuninit(void *unused); -static void coda_fbsd_clone(void *arg, char *name, int namelen, dev_t *dev); +static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev); static eventhandler_tag clonetag; @@ -182,7 +182,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; int namelen; - dev_t *dev; + struct cdev **dev; { int u; diff --git a/sys/coda/coda_psdev.c b/sys/coda/coda_psdev.c index 133d0fdb1579..03e408da63d6 100644 --- a/sys/coda/coda_psdev.c +++ b/sys/coda/coda_psdev.c @@ -117,7 +117,7 @@ vcodaattach(n) int vc_nb_open(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; /* NetBSD only */ @@ -149,7 +149,7 @@ vc_nb_open(dev, flag, mode, td) int vc_nb_close (dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -233,7 +233,7 @@ vc_nb_close (dev, flag, mode, td) int vc_nb_read(dev, uiop, flag) - dev_t dev; + struct cdev *dev; struct uio *uiop; int flag; { @@ -287,7 +287,7 @@ vc_nb_read(dev, uiop, flag) int vc_nb_write(dev, uiop, flag) - dev_t dev; + struct cdev *dev; struct uio *uiop; int flag; { @@ -387,7 +387,7 @@ vc_nb_write(dev, uiop, flag) int vc_nb_ioctl(dev, cmd, addr, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flag; @@ -441,7 +441,7 @@ vc_nb_ioctl(dev, cmd, addr, flag, td) int vc_nb_poll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { diff --git a/sys/coda/coda_psdev.h b/sys/coda/coda_psdev.h index c6ecf7f435e2..f135b3441208 100644 --- a/sys/coda/coda_psdev.h +++ b/sys/coda/coda_psdev.h @@ -31,9 +31,9 @@ * */ -int vc_nb_open(dev_t dev, int flag, int mode, struct thread *p); -int vc_nb_close (dev_t dev, int flag, int mode, struct thread *p); -int vc_nb_read(dev_t dev, struct uio *uiop, int flag); -int vc_nb_write(dev_t dev, struct uio *uiop, int flag); -int vc_nb_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *p); -int vc_nb_poll(dev_t dev, int events, struct thread *p); +int vc_nb_open(struct cdev *dev, int flag, int mode, struct thread *p); +int vc_nb_close (struct cdev *dev, int flag, int mode, struct thread *p); +int vc_nb_read(struct cdev *dev, struct uio *uiop, int flag); +int vc_nb_write(struct cdev *dev, struct uio *uiop, int flag); +int vc_nb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p); +int vc_nb_poll(struct cdev *dev, int events, struct thread *p); diff --git a/sys/coda/coda_venus.c b/sys/coda/coda_venus.c index 5105c0b882bc..f0bc3c296bdf 100644 --- a/sys/coda/coda_venus.c +++ b/sys/coda/coda_venus.c @@ -198,7 +198,7 @@ venus_root(void *mdp, int venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, struct proc *p, -/*out*/ dev_t *dev, ino_t *inode) +/*out*/ struct cdev **dev, ino_t *inode) { int cflag; DECL(coda_open); /* sets Isize & Osize */ diff --git a/sys/coda/coda_venus.h b/sys/coda/coda_venus.h index b506b5ba0277..473b84d30092 100644 --- a/sys/coda/coda_venus.h +++ b/sys/coda/coda_venus.h @@ -39,7 +39,7 @@ venus_root(void *mdp, int venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, struct proc *p, -/*out*/ dev_t *dev, ino_t *inode); +/*out*/ struct cdev **dev, ino_t *inode); int venus_close(void *mdp, CodaFid *fid, int flag, diff --git a/sys/coda/coda_vfsops.c b/sys/coda/coda_vfsops.c index ff6442932037..e7290e770807 100644 --- a/sys/coda/coda_vfsops.c +++ b/sys/coda/coda_vfsops.c @@ -81,7 +81,7 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE]; #define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++) extern int coda_nc_initialized; /* Set if cache has been initialized */ -extern int vc_nb_open(dev_t, int, int, struct thread *); +extern int vc_nb_open(struct cdev *, int, int, struct thread *); int coda_vfsopstats_init(void) @@ -114,7 +114,7 @@ coda_mount(vfsp, path, data, ndp, td) { struct vnode *dvp; struct cnode *cp; - dev_t dev; + struct cdev *dev; struct coda_mntinfo *mi; struct vnode *rootvp; CodaFid rootfid = INVAL_FID; @@ -528,7 +528,7 @@ getNewVnode(vpp) * device corresponds to a UFS. Return NULL if no device is found. */ struct mount *devtomp(dev) - dev_t dev; + struct cdev *dev; { struct mount *mp; diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index a1d24e930f77..a8666cc6f2f7 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -238,7 +238,7 @@ coda_open(v) /* locals */ int error; struct vnode *vp; - dev_t dev; + struct cdev *dev; ino_t inode; MARK_ENTRY(CODA_OPEN_STATS); @@ -1806,7 +1806,7 @@ coda_islocked(v) /* How one looks up a vnode given a device/inode pair: */ int -coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp) +coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp) { /* This is like VFS_VGET() or igetinode()! */ int error; diff --git a/sys/coda/coda_vnops.h b/sys/coda/coda_vnops.h index 8a3184b83c99..88a398e8cd6c 100644 --- a/sys/coda/coda_vnops.h +++ b/sys/coda/coda_vnops.h @@ -82,6 +82,6 @@ int coda_pathconf(void *); int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag, struct ucred *cred, struct thread *td); -int coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp); +int coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp); void print_vattr(struct vattr *attr); void print_cred(struct ucred *cred); diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index eaf6da07e648..4a02042ddc5f 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -55,7 +55,7 @@ newstat_copyout(struct stat *buf, void *ubuf) { struct l_newstat tbuf; struct cdevsw *cdevsw; - dev_t dev; + struct cdev *dev; bzero(&tbuf, sizeof(tbuf)); tbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8); @@ -342,7 +342,7 @@ int linux_ustat(struct thread *td, struct linux_ustat_args *args) { struct l_ustat lu; - dev_t dev; + struct cdev *dev; struct vnode *vp; struct statfs *stat; int error; @@ -360,9 +360,9 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) /* * XXX - Don't return an error if we can't find a vnode for the - * device. Our dev_t is 32-bits whereas Linux only has a 16-bits - * dev_t. The dev_t that is used now may as well be a truncated - * dev_t returned from previous syscalls. Just return a bzeroed + * device. Our struct cdev *is 32-bits whereas Linux only has a 16-bits + * struct cdev *. The struct cdev *that is used now may as well be a truncated + * struct cdev *returned from previous syscalls. Just return a bzeroed * ustat in that case. */ dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF)); @@ -393,7 +393,7 @@ stat64_copyout(struct stat *buf, void *ubuf) { struct l_stat64 lbuf; struct cdevsw *cdevsw; - dev_t dev; + struct cdev *dev; bzero(&lbuf, sizeof(lbuf)); lbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8); diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c index 845befc0aa7a..afd5a0a27633 100644 --- a/sys/contrib/dev/fla/fla.c +++ b/sys/contrib/dev/fla/fla.c @@ -79,7 +79,7 @@ static struct fla_s { struct doc2k_stat ds; struct bio_queue_head bio_queue; struct disk *disk; - dev_t dev; + struct cdev *dev; } softc[8]; static int diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 8a36dc3aae5e..b6b9dd758f8d 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -665,7 +665,11 @@ struct thread *td; # else ) # endif +#ifdef _KERNEL +struct cdev *dev; +#else dev_t dev; +#endif # if defined(__NetBSD__) || defined(__OpenBSD__) || \ (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) u_long cmd; @@ -1135,7 +1139,7 @@ struct thread *td; # else ) # endif -dev_t dev; +struct cdev *dev; int flags; # endif /* __sgi */ { @@ -1165,7 +1169,7 @@ struct thread *td; # else ) # endif -dev_t dev; +struct cdev *dev; int flags; # endif /* __sgi */ { @@ -1193,7 +1197,7 @@ int ioflag; # else int IPL_EXTERN(read)(dev, uio) # endif -dev_t dev; +struct cdev *dev; register struct uio *uio; # endif /* __sgi */ { diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index bf407c27af61..75e434c46344 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -574,12 +574,12 @@ extern int iplidentify __P((char *)); (NetBSD >= 199511) || defined(__OpenBSD__) # if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \ defined(__OpenBSD__) || (__FreeBSD_version >= 300000) -extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct thread *)); +extern int iplioctl __P((struct cdev *, u_long, caddr_t, int, struct thread *)); # else extern int iplioctl __P((dev_t, int, caddr_t, int, struct thread *)); # endif -extern int iplopen __P((dev_t, int, int, struct thread *)); -extern int iplclose __P((dev_t, int, int, struct thread *)); +extern int iplopen __P((struct cdev *, int, int, struct thread *)); +extern int iplclose __P((struct cdev *, int, int, struct thread *)); # else # ifndef linux extern int iplopen __P((dev_t, int)); @@ -592,7 +592,7 @@ extern void iplclose __P((struct inode *, struct file *)); # endif /* !linux */ # endif /* (_BSDI_VERSION >= 199510) */ # if BSD >= 199306 -extern int iplread __P((dev_t, struct uio *, int)); +extern int iplread __P((struct cdev *, struct uio *, int)); # else # ifndef linux extern int iplread __P((dev_t, struct uio *)); diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index df1bb75a2cfe..c06b7199a20c 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -55,7 +55,7 @@ #include #include -static dev_t ipf_devs[IPL_LOGMAX + 1]; +static struct cdev *ipf_devs[IPL_LOGMAX + 1]; SYSCTL_DECL(_net_inet); SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); diff --git a/sys/contrib/pf/net/pf_ioctl.c b/sys/contrib/pf/net/pf_ioctl.c index bb83ac1a7cfd..3053de38d88a 100644 --- a/sys/contrib/pf/net/pf_ioctl.c +++ b/sys/contrib/pf/net/pf_ioctl.c @@ -103,8 +103,8 @@ void cleanup_pf_zone(void); int pfattach(void); #else void pfattach(int); -int pfopen(dev_t, int, int, struct proc *); -int pfclose(dev_t, int, int, struct proc *); +int pfopen(struct cdev *, int, int, struct proc *); +int pfclose(struct cdev *, int, int, struct proc *); #endif struct pf_pool *pf_get_pool(char *, char *, u_int32_t, u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t); @@ -113,9 +113,9 @@ void pf_init_ruleset(struct pf_ruleset *); void pf_mv_pool(struct pf_palist *, struct pf_palist *); void pf_empty_pool(struct pf_palist *); #ifdef __FreeBSD__ -int pfioctl(dev_t, u_long, caddr_t, int, struct thread *); +int pfioctl(struct cdev *, u_long, caddr_t, int, struct thread *); #else -int pfioctl(dev_t, u_long, caddr_t, int, struct proc *); +int pfioctl(struct cdev *, u_long, caddr_t, int, struct proc *); #endif #ifdef __FreeBSD__ @@ -139,7 +139,7 @@ TAILQ_HEAD(pf_tags, pf_tagname) pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags); #ifdef __FreeBSD__ -static dev_t pf_dev; +static struct cdev *pf_dev; /* * XXX - These are new and need to be checked when moveing to a new version @@ -421,7 +421,7 @@ pfattach(int num) } int -pfopen(dev_t dev, int flags, int fmt, struct proc *p) +pfopen(struct cdev *dev, int flags, int fmt, struct proc *p) { if (minor(dev) >= 1) return (ENXIO); @@ -429,7 +429,7 @@ pfopen(dev_t dev, int flags, int fmt, struct proc *p) } int -pfclose(dev_t dev, int flags, int fmt, struct proc *p) +pfclose(struct cdev *dev, int flags, int fmt, struct proc *p) { if (minor(dev) >= 1) return (ENXIO); @@ -771,10 +771,10 @@ pf_tag_unref(u_int16_t tag) #ifdef __FreeBSD__ int -pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) #else int -pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) +pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct proc *p) #endif { struct pf_pooladdr *pa = NULL; diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 9a09cf8dab4e..03978abf27dd 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -2301,7 +2301,7 @@ aac_describe_code(struct aac_code_lookup *table, u_int32_t code) */ static int -aac_open(dev_t dev, int flags, int fmt, d_thread_t *td) +aac_open(struct cdev *dev, int flags, int fmt, d_thread_t *td) { struct aac_softc *sc; @@ -2319,7 +2319,7 @@ aac_open(dev_t dev, int flags, int fmt, d_thread_t *td) } static int -aac_close(dev_t dev, int flags, int fmt, d_thread_t *td) +aac_close(struct cdev *dev, int flags, int fmt, d_thread_t *td) { struct aac_softc *sc; @@ -2334,7 +2334,7 @@ aac_close(dev_t dev, int flags, int fmt, d_thread_t *td) } static int -aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td) +aac_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td) { union aac_statrequest *as; struct aac_softc *sc; @@ -2433,7 +2433,7 @@ aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td) } static int -aac_poll(dev_t dev, int poll_events, d_thread_t *td) +aac_poll(struct cdev *dev, int poll_events, d_thread_t *td) { struct aac_softc *sc; int revents; diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h index bedc6b0c147d..6a8b04fd9c1b 100644 --- a/sys/dev/aac/aacvar.h +++ b/sys/dev/aac/aacvar.h @@ -344,7 +344,7 @@ struct aac_softc struct intr_config_hook aac_ich; /* management interface */ - dev_t aac_dev_t; + struct cdev *aac_dev_t; aac_lock_t aac_aifq_lock; struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH]; int aac_aifq_head; diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c index f16121b5c1db..10d97e48edd4 100644 --- a/sys/dev/acpi_support/acpi_asus.c +++ b/sys/dev/acpi_support/acpi_asus.c @@ -83,9 +83,9 @@ struct acpi_asus_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; - dev_t s_mled; - dev_t s_tled; - dev_t s_wled; + struct cdev *s_mled; + struct cdev *s_tled; + struct cdev *s_wled; int s_brn; int s_disp; diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 0f0712be0203..ffc66d2c3386 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2455,19 +2455,19 @@ acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn) } static int -acpiopen(dev_t dev, int flag, int fmt, d_thread_t *td) +acpiopen(struct cdev *dev, int flag, int fmt, d_thread_t *td) { return (0); } static int -acpiclose(dev_t dev, int flag, int fmt, d_thread_t *td) +acpiclose(struct cdev *dev, int flag, int fmt, d_thread_t *td) { return (0); } static int -acpiioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td) +acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td) { struct acpi_softc *sc; struct acpi_ioctl_hook *hp; diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 959681d5826d..c0bc481950c9 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -45,7 +45,7 @@ typedef vm_offset_t vm_paddr_t; struct acpi_softc { device_t acpi_dev; - dev_t acpi_dev_t; + struct cdev *acpi_dev_t; struct resource *acpi_irq; int acpi_irq_rid; diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c index 1d6b86115bec..b32ef3daa502 100644 --- a/sys/dev/adlink/adlink.c +++ b/sys/dev/adlink/adlink.c @@ -104,7 +104,7 @@ struct softc { struct resource *r0, *r1, *ri; bus_space_tag_t t0, t1; bus_space_handle_t h0, h1; - dev_t dev; + struct cdev *dev; off_t mapvir; struct proc *procp; @@ -241,7 +241,7 @@ adlink_loran(void *arg) } static int -adlink_open(dev_t dev, int oflags, int devtype, struct thread *td) +adlink_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { static int once; struct softc *sc; @@ -307,7 +307,7 @@ adlink_open(dev_t dev, int oflags, int devtype, struct thread *td) } static int -adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +adlink_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { struct softc *sc; struct wave *wp; @@ -341,7 +341,7 @@ adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) } static int -adlink_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +adlink_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct softc *sc; struct wave *wp; diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 46f10a3c5c54..239b5bff93d0 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -762,7 +762,7 @@ agp_unbind_user(device_t dev, agp_unbind *unbind) } static int -agp_open(dev_t kdev, int oflags, int devtype, struct thread *td) +agp_open(struct cdev *kdev, int oflags, int devtype, struct thread *td) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); @@ -776,7 +776,7 @@ agp_open(dev_t kdev, int oflags, int devtype, struct thread *td) } static int -agp_close(dev_t kdev, int fflag, int devtype, struct thread *td) +agp_close(struct cdev *kdev, int fflag, int devtype, struct thread *td) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); @@ -799,7 +799,7 @@ agp_close(dev_t kdev, int fflag, int devtype, struct thread *td) } static int -agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) +agp_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) { device_t dev = KDEV2DEV(kdev); @@ -834,7 +834,7 @@ agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) } static int -agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); diff --git a/sys/dev/agp/agppriv.h b/sys/dev/agp/agppriv.h index 6ba4ed60b4af..7e846d17cdff 100644 --- a/sys/dev/agp/agppriv.h +++ b/sys/dev/agp/agppriv.h @@ -75,7 +75,7 @@ struct agp_softc { struct agp_memory_list as_memory; /* list of allocated memory */ int as_nextid; /* next memory block id */ int as_isopen; /* user device is open */ - dev_t as_devnode; /* from make_dev */ + struct cdev *as_devnode; /* from make_dev */ struct mtx as_lock; /* lock for access to GATT */ }; diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 0fce75505c24..f206b02bb8ef 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -343,7 +343,7 @@ amr_free(struct amr_softc *sc) } /* destroy control device */ - if( sc->amr_dev_t != (dev_t)NULL) + if( sc->amr_dev_t != (struct cdev *)NULL) destroy_dev(sc->amr_dev_t); } @@ -365,7 +365,7 @@ amr_submit_bio(struct amr_softc *sc, struct bio *bio) * Accept an open operation on the control device. */ static int -amr_open(dev_t dev, int flags, int fmt, d_thread_t *td) +amr_open(struct cdev *dev, int flags, int fmt, d_thread_t *td) { int unit = minor(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); @@ -380,7 +380,7 @@ amr_open(dev_t dev, int flags, int fmt, d_thread_t *td) * Accept the last close on the control device. */ static int -amr_close(dev_t dev, int flags, int fmt, d_thread_t *td) +amr_close(struct cdev *dev, int flags, int fmt, d_thread_t *td) { int unit = minor(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); @@ -395,7 +395,7 @@ amr_close(dev_t dev, int flags, int fmt, d_thread_t *td) * Handle controller-specific control operations. */ static int -amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td) +amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td) { struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; int *arg = (int *)addr; diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h index 2378c97dd8ad..fcfb39727eb7 100644 --- a/sys/dev/amr/amrvar.h +++ b/sys/dev/amr/amrvar.h @@ -202,7 +202,7 @@ struct amr_softc TAILQ_HEAD(, ccb_hdr) amr_cam_ccbq; /* control device */ - dev_t amr_dev_t; + struct cdev *amr_dev_t; /* controller type-specific support */ int amr_type; diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index fa29dd8fa8f6..8b403473c8ea 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -358,7 +358,7 @@ typedef struct Asr_softc { /* Links into other parents and HBAs */ struct Asr_softc * ha_next; /* HBA list */ - dev_t ha_devt; + struct cdev *ha_devt; } Asr_softc_t; static Asr_softc_t * Asr_softc; @@ -371,11 +371,11 @@ static Asr_softc_t * Asr_softc; static int asr_probe(device_t tag); static int asr_attach(device_t tag); -static int asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +static int asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td); -static int asr_open(dev_t dev, int32_t flags, int32_t ifmt, +static int asr_open(struct cdev *dev, int32_t flags, int32_t ifmt, struct thread *td); -static int asr_close(dev_t dev, int flags, int ifmt, struct thread *td); +static int asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td); static int asr_intr(Asr_softc_t *sc); static void asr_timeout(void *arg); static int ASR_init(Asr_softc_t *sc); @@ -2999,7 +2999,7 @@ typedef U32 DPT_RTN_T; static u_int8_t ASR_ctlr_held; static int -asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td) +asr_open(struct cdev *dev, int32_t flags, int32_t ifmt, struct thread *td) { int s; int error; @@ -3018,7 +3018,7 @@ asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td) } /* asr_open */ static int -asr_close(dev_t dev, int flags, int ifmt, struct thread *td) +asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td) { ASR_ctlr_held = 0; @@ -3495,7 +3495,7 @@ ASR_queue_i(Asr_softc_t *sc, PI2O_MESSAGE_FRAME Packet) /*----------------------------------------------------------------------*/ static int -asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { Asr_softc_t *sc = dev->si_drv1; int i, error = 0; diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 9a319731b840..b0d78934b315 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -359,7 +359,7 @@ ata_shutdown(void *arg, int howto) * device related interfaces */ static int -ata_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) +ata_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) { struct ata_cmd *iocmd = (struct ata_cmd *)addr; device_t device = devclass_get_device(ata_devclass, iocmd->channel); diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index c6ae4b792475..19e6100cbcb9 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -94,7 +94,7 @@ ast_attach(struct ata_device *atadev) { struct ast_softc *stp; struct ast_readposition position; - dev_t dev; + struct cdev *dev; stp = malloc(sizeof(struct ast_softc), M_AST, M_NOWAIT | M_ZERO); if (!stp) { @@ -265,7 +265,7 @@ ast_describe(struct ast_softc *stp) } static int -ast_open(dev_t dev, int flags, int fmt, struct thread *td) +ast_open(struct cdev *dev, int flags, int fmt, struct thread *td) { struct ast_softc *stp = dev->si_drv1; @@ -290,7 +290,7 @@ ast_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -ast_close(dev_t dev, int flags, int fmt, struct thread *td) +ast_close(struct cdev *dev, int flags, int fmt, struct thread *td) { struct ast_softc *stp = dev->si_drv1; @@ -319,7 +319,7 @@ ast_close(dev_t dev, int flags, int fmt, struct thread *td) } static int -ast_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ast_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct ast_softc *stp = dev->si_drv1; int error = 0; diff --git a/sys/dev/ata/atapi-tape.h b/sys/dev/ata/atapi-tape.h index 15e3cbbc1ffb..f34328d255fa 100644 --- a/sys/dev/ata/atapi-tape.h +++ b/sys/dev/ata/atapi-tape.h @@ -159,5 +159,5 @@ struct ast_softc { struct atapi_params *param; /* drive parameters table */ struct ast_cappage cap; /* capabilities page info */ struct devstat *stats; /* devstat entry */ - dev_t dev1, dev2; /* device place holders */ + struct cdev *dev1, *dev2; /* device place holders */ }; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 376c0dcfe17d..2d30d657670e 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -176,8 +176,8 @@ struct psm_softc { /* Driver status information */ int watchdog; /* watchdog timer flag */ struct callout_handle callout; /* watchdog timer call out */ struct callout_handle softcallout; /* buffer timer call out */ - dev_t dev; - dev_t bdev; + struct cdev *dev; + struct cdev *bdev; int lasterr; int cmdcount; }; @@ -1307,7 +1307,7 @@ psmdetach(device_t dev) } static int -psmopen(dev_t dev, int flag, int fmt, struct thread *td) +psmopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = PSM_UNIT(dev); struct psm_softc *sc; @@ -1391,7 +1391,7 @@ psmopen(dev_t dev, int flag, int fmt, struct thread *td) } static int -psmclose(dev_t dev, int flag, int fmt, struct thread *td) +psmclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = PSM_UNIT(dev); struct psm_softc *sc = PSM_SOFTC(unit); @@ -1533,7 +1533,7 @@ tame_mouse(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *status, unsigne } static int -psmread(dev_t dev, struct uio *uio, int flag) +psmread(struct cdev *dev, struct uio *uio, int flag) { register struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); unsigned char buf[PSM_SMALLBUFSIZE]; @@ -1681,7 +1681,7 @@ unblock_mouse_data(struct psm_softc *sc, int c) } static int -psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); mousemode_t mode; @@ -2506,7 +2506,7 @@ psmsoftintr(void *arg) } static int -psmpoll(dev_t dev, int events, struct thread *td) +psmpoll(struct cdev *dev, int events, struct thread *td) { struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); int s; diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index a71d70803d15..d8b381fdf86b 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -1191,7 +1191,7 @@ vbi_close( bktr_ptr_t bktr ) * */ int -video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio) +video_read(bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio) { int status; int count; diff --git a/sys/dev/bktr/bktr_core.h b/sys/dev/bktr/bktr_core.h index 5948ab686872..315566f31a40 100644 --- a/sys/dev/bktr/bktr_core.h +++ b/sys/dev/bktr/bktr_core.h @@ -80,7 +80,7 @@ int common_bktr_intr( void *arg ); /* Prototypes for open, close, read, mmap and ioctl calls */ int video_open( bktr_ptr_t bktr ); int video_close( bktr_ptr_t bktr ); -int video_read( bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio ); +int video_read( bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio ); int video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index d7bd9ba6d146..87d4ed97d73e 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -580,7 +580,7 @@ get_bktr_mem( int unit, unsigned size ) * */ static int -bktr_open( dev_t dev, int flags, int fmt, struct thread *td ) +bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td ) { bktr_ptr_t bktr; int unit; @@ -680,7 +680,7 @@ bktr_open( dev_t dev, int flags, int fmt, struct thread *td ) * */ static int -bktr_close( dev_t dev, int flags, int fmt, struct thread *td ) +bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td ) { bktr_ptr_t bktr; int unit; @@ -719,7 +719,7 @@ bktr_close( dev_t dev, int flags, int fmt, struct thread *td ) * */ static int -bktr_read( dev_t dev, struct uio *uio, int ioflag ) +bktr_read( struct cdev *dev, struct uio *uio, int ioflag ) { bktr_ptr_t bktr; int unit; @@ -747,7 +747,7 @@ bktr_read( dev_t dev, struct uio *uio, int ioflag ) * */ static int -bktr_write( dev_t dev, struct uio *uio, int ioflag ) +bktr_write( struct cdev *dev, struct uio *uio, int ioflag ) { return( EINVAL ); /* XXX or ENXIO ? */ } @@ -757,7 +757,7 @@ bktr_write( dev_t dev, struct uio *uio, int ioflag ) * */ static int -bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td ) +bktr_ioctl( struct cdev *dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td ) { bktr_ptr_t bktr; int unit; @@ -789,7 +789,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td * */ static int -bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot ) +bktr_mmap( struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot ) { int unit; bktr_ptr_t bktr; @@ -820,7 +820,7 @@ bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot ) } static int -bktr_poll( dev_t dev, int events, struct thread *td) +bktr_poll( struct cdev *dev, int events, struct thread *td) { int unit; bktr_ptr_t bktr; diff --git a/sys/dev/bktr/bktr_reg.h b/sys/dev/bktr/bktr_reg.h index a7c3ef5dc947..c8fc4d4bc7ea 100644 --- a/sys/dev/bktr/bktr_reg.h +++ b/sys/dev/bktr/bktr_reg.h @@ -535,12 +535,12 @@ struct bktr_softc { int irq_rid; /* 4.x resource id */ struct resource *res_irq; /* 4.x resource descriptor for interrupt */ void *res_ih; /* 4.x newbus interrupt handler cookie */ - dev_t bktrdev; /* 4.x device entry for /dev/bktrN */ - dev_t tunerdev; /* 4.x device entry for /dev/tunerN */ - dev_t vbidev; /* 4.x device entry for /dev/vbiN */ - dev_t bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */ - dev_t tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */ - dev_t vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */ + struct cdev *bktrdev; /* 4.x device entry for /dev/bktrN */ + struct cdev *tunerdev; /* 4.x device entry for /dev/tunerN */ + struct cdev *vbidev; /* 4.x device entry for /dev/vbiN */ + struct cdev *bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */ + struct cdev *tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */ + struct cdev *vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */ #endif #if (__FreeBSD_version >= 500000) struct mtx vbimutex; /* Mutex protecting vbi buffer */ diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 6e328e6ad4bf..c04136d1b3f9 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -3738,7 +3738,7 @@ ciss_name_command_status(int status) * Handle an open on the control device. */ static int -ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p) +ciss_open(struct cdev *dev, int flags, int fmt, d_thread_t *p) { struct ciss_softc *sc; @@ -3756,7 +3756,7 @@ ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p) * Handle the last close on the control device. */ static int -ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p) +ciss_close(struct cdev *dev, int flags, int fmt, d_thread_t *p) { struct ciss_softc *sc; @@ -3775,7 +3775,7 @@ ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p) * simplify the porting of Compaq's userland tools. */ static int -ciss_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p) +ciss_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p) { struct ciss_softc *sc; int error; diff --git a/sys/dev/ciss/cissvar.h b/sys/dev/ciss/cissvar.h index 717351fb654a..b1bdd4219607 100644 --- a/sys/dev/ciss/cissvar.h +++ b/sys/dev/ciss/cissvar.h @@ -173,7 +173,7 @@ struct ciss_softc { /* bus connections */ device_t ciss_dev; /* bus attachment */ - dev_t ciss_dev_t; /* control device */ + struct cdev *ciss_dev_t; /* control device */ struct resource *ciss_regs_resource; /* register interface window */ int ciss_regs_rid; /* resource ID */ diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 945c8634e28c..04427c3bfd03 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -161,7 +161,7 @@ typedef struct _drv_t { struct sppp pp; #endif #if __FreeBSD_version >= 400000 - dev_t devt; + struct cdev *devt; #endif } drv_t; @@ -967,7 +967,7 @@ static void cp_error (cp_chan_t *c, int data) #if __FreeBSD_version < 500000 static int cp_open (dev_t dev, int oflags, int devtype, struct proc *p) #else -static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td) +static int cp_open (struct cdev *dev, int oflags, int devtype, struct thread *td) #endif { int unit = minor (dev); @@ -985,7 +985,7 @@ static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td) #if __FreeBSD_version < 500000 static int cp_close (dev_t dev, int fflag, int devtype, struct proc *p) #else -static int cp_close (dev_t dev, int fflag, int devtype, struct thread *td) +static int cp_close (struct cdev *dev, int fflag, int devtype, struct thread *td) #endif { drv_t *d = channel [minor (dev)]; @@ -1013,7 +1013,7 @@ static int cp_modem_status (cp_chan_t *c) #if __FreeBSD_version < 500000 static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) #else -static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) #endif { drv_t *d = channel [minor (dev)]; @@ -2652,7 +2652,7 @@ static int cp_modevent (module_t mod, int type, void *unused) #else /* __FreeBSD_version >= 400000 */ static int cp_modevent (module_t mod, int type, void *unused) { - dev_t dev; + struct cdev *dev; static int load_count = 0; struct cdevsw *cdsw; diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index cc5887adc922..a7462ab2f4fd 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -172,7 +172,7 @@ typedef struct _drv_t { struct sppp pp; #endif #if __FreeBSD_version >= 400000 - dev_t devt; + struct cdev *devt; #endif } drv_t; @@ -1261,7 +1261,7 @@ static void ct_error (ct_chan_t *c, int data) #if __FreeBSD_version < 500000 static int ct_open (dev_t dev, int oflags, int devtype, struct proc *p) #else -static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td) +static int ct_open (struct cdev *dev, int oflags, int devtype, struct thread *td) #endif { drv_t *d; @@ -1276,7 +1276,7 @@ static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td) #if __FreeBSD_version < 500000 static int ct_close (dev_t dev, int fflag, int devtype, struct proc *p) #else -static int ct_close (dev_t dev, int fflag, int devtype, struct thread *td) +static int ct_close (struct cdev *dev, int fflag, int devtype, struct thread *td) #endif { drv_t *d = channel [minor(dev)]; @@ -1313,7 +1313,7 @@ static int ct_modem_status (ct_chan_t *c) #if __FreeBSD_version < 500000 static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) #else -static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +static int ct_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) #endif { drv_t *d = channel [minor (dev)]; @@ -2624,7 +2624,7 @@ static int ct_modevent (module_t mod, int type, void *unused) #else /* __FreeBSD_version >= 400000 */ static int ct_modevent (module_t mod, int type, void *unused) { - dev_t dev; + struct cdev *dev; static int load_count = 0; struct cdevsw *cdsw; diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 726de528f135..45c7f9efc1ee 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -212,7 +212,7 @@ typedef struct _drv_t { struct sppp pp; #endif #if __FreeBSD_version >= 400000 - dev_t devt[3]; + struct cdev *devt[3]; #endif async_q aqueue; #define CX_READ 1 @@ -1570,7 +1570,7 @@ static void cx_error (cx_chan_t *c, int data) #if __FreeBSD_version < 500000 static int cx_open (dev_t dev, int flag, int mode, struct proc *p) #else -static int cx_open (dev_t dev, int flag, int mode, struct thread *td) +static int cx_open (struct cdev *dev, int flag, int mode, struct thread *td) #endif { int unit = UNIT (dev); @@ -1710,7 +1710,7 @@ failed: if (! (d->tty->t_state & TS_ISOPEN)) { #if __FreeBSD_version < 500000 static int cx_close (dev_t dev, int flag, int mode, struct proc *p) #else -static int cx_close (dev_t dev, int flag, int mode, struct thread *td) +static int cx_close (struct cdev *dev, int flag, int mode, struct thread *td) #endif { drv_t *d = channel [UNIT (dev)]; @@ -1756,7 +1756,7 @@ static int cx_close (dev_t dev, int flag, int mode, struct thread *td) return 0; } -static int cx_read (dev_t dev, struct uio *uio, int flag) +static int cx_read (struct cdev *dev, struct uio *uio, int flag) { drv_t *d = channel [UNIT (dev)]; @@ -1767,7 +1767,7 @@ static int cx_read (dev_t dev, struct uio *uio, int flag) return ttyld_read (d->tty, uio, flag); } -static int cx_write (dev_t dev, struct uio *uio, int flag) +static int cx_write (struct cdev *dev, struct uio *uio, int flag) { drv_t *d = channel [UNIT (dev)]; @@ -1798,7 +1798,7 @@ static int cx_modem_status (drv_t *d) #if __FreeBSD_version < 500000 static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) #else -static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +static int cx_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) #endif { drv_t *d = channel [UNIT (dev)]; @@ -3172,7 +3172,7 @@ static int cx_modevent (module_t mod, int type, void *unused) #else /* __FreeBSD_version >= 400000 */ static int cx_modevent (module_t mod, int type, void *unused) { - dev_t dev; + struct cdev *dev; static int load_count = 0; struct cdevsw *cdsw; diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 706532732688..7808ecbf40f1 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -592,7 +592,7 @@ cyattach_common(cy_iobase, cy_align) static int sioopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -776,7 +776,7 @@ out: static int sioclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -891,7 +891,7 @@ comhardclose(com) static int siowrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -1528,7 +1528,7 @@ terminate_tx_service: static int sioioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 3a5e302c7843..5bdbbfbaff7a 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -129,7 +129,7 @@ struct dcons_buf *dcons_buf; /* for local dconschat */ /* per device data */ static struct dcons_softc { - dev_t dev; + struct cdev *dev; struct dcons_ch o, i; int brk_state; #define DC_GDB 1 @@ -159,7 +159,7 @@ CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc, #endif static int -dcons_open(dev_t dev, int flag, int mode, struct THREAD *td) +dcons_open(struct cdev *dev, int flag, int mode, struct THREAD *td) { struct tty *tp; int unit, error, s; @@ -198,7 +198,7 @@ dcons_open(dev_t dev, int flag, int mode, struct THREAD *td) } static int -dcons_close(dev_t dev, int flag, int mode, struct THREAD *td) +dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td) { int unit; struct tty *tp; @@ -312,17 +312,17 @@ dcons_cnputc(struct consdev *cp, int c) } #else static int -dcons_cngetc(dev_t dev) +dcons_cngetc(struct cdev *dev) { return(dcons_getc((struct dcons_softc *)dev->si_drv1)); } static int -dcons_cncheckc(dev_t dev) +dcons_cncheckc(struct cdev *dev) { return(dcons_checkc((struct dcons_softc *)dev->si_drv1)); } static void -dcons_cnputc(dev_t dev, int c) +dcons_cnputc(struct cdev *dev, int c) { dcons_putc((struct dcons_softc *)dev->si_drv1, c); } diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index c6b6b2c18e23..c330290d2ed8 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -694,7 +694,7 @@ digimctl(struct digi_p *port, int bits, int how) } static int -digiopen(dev_t dev, int flag, int mode, struct thread *td) +digiopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct digi_softc *sc; struct tty *tp; @@ -859,7 +859,7 @@ out: } static int -digiclose(dev_t dev, int flag, int mode, struct thread *td) +digiclose(struct cdev *dev, int flag, int mode, struct thread *td) { int mynor; struct tty *tp; @@ -938,7 +938,7 @@ digihardclose(struct digi_p *port) } static int -digiread(dev_t dev, struct uio *uio, int flag) +digiread(struct cdev *dev, struct uio *uio, int flag) { int mynor; struct tty *tp; @@ -964,7 +964,7 @@ digiread(dev_t dev, struct uio *uio, int flag) } static int -digiwrite(dev_t dev, struct uio *uio, int flag) +digiwrite(struct cdev *dev, struct uio *uio, int flag) { int mynor; struct tty *tp; @@ -1066,7 +1066,7 @@ digi_loadmoduledata(struct digi_softc *sc) } static int -digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int unit, pnum, mynor, error, s; struct digi_softc *sc; diff --git a/sys/dev/digi/digi.h b/sys/dev/digi/digi.h index f0c9f0e59cef..8459d60f1816 100644 --- a/sys/dev/digi/digi.h +++ b/sys/dev/digi/digi.h @@ -72,7 +72,7 @@ struct digi_p { volatile struct board_chan *bc; struct tty *tp; - dev_t dev[6]; + struct cdev *dev[6]; u_char *txbuf; u_char *rxbuf; @@ -164,7 +164,7 @@ struct digi_softc { int iorid; void *irqHandler; int unit; - dev_t ctldev; + struct cdev *ctldev; } res; u_char *vmem; /* virtual memory address */ diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 7753b1966f76..e45bad4fda9a 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -313,7 +313,7 @@ struct drm_device { #ifdef __FreeBSD__ device_t device; /* Device instance from newbus */ #endif - dev_t devnode; /* Device number for mknod */ + struct cdev *devnode; /* Device number for mknod */ int if_version; /* Highest interface version set */ int flags; /* Flags to open(2) */ diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index d005ec4cdb8b..642cc7413668 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -808,7 +808,7 @@ int DRM(version)( DRM_IOCTL_ARGS ) return 0; } -int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) +int DRM(open)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) { drm_device_t *dev = NULL; int retcode = 0; @@ -833,7 +833,7 @@ int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) return retcode; } -int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) +int DRM(close)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p) { drm_file_t *priv; DRM_DEVICE; @@ -951,7 +951,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p) /* DRM(ioctl) is called whenever a process performs an ioctl on /dev/drm. */ -int DRM(ioctl)(dev_t kdev, u_long cmd, caddr_t data, int flags, +int DRM(ioctl)(struct cdev *kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p) { DRM_DEVICE; diff --git a/sys/dev/drm/drm_fops.h b/sys/dev/drm/drm_fops.h index 190b708e3d7a..4c79fe117237 100644 --- a/sys/dev/drm/drm_fops.h +++ b/sys/dev/drm/drm_fops.h @@ -54,7 +54,7 @@ drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p) } /* DRM(open_helper) is called whenever a process opens /dev/drm. */ -int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, +int DRM(open_helper)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p, drm_device_t *dev) { int m = minor(kdev); @@ -106,12 +106,12 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, /* The DRM(read) and DRM(poll) are stubs to prevent spurious errors * on older X Servers (4.3.0 and earlier) */ -int DRM(read)(dev_t kdev, struct uio *uio, int ioflag) +int DRM(read)(struct cdev *kdev, struct uio *uio, int ioflag) { return 0; } -int DRM(poll)(dev_t kdev, int events, DRM_STRUCTPROC *p) +int DRM(poll)(struct cdev *kdev, int events, DRM_STRUCTPROC *p) { return 0; } diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index 24dcd10200b5..750e6ec3f93c 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -151,7 +151,7 @@ * of the current process. It should be a per-open unique pointer, but * code for that is not yet written */ #define DRMFILE void * -#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp +#define DRM_IOCTL_ARGS struct cdev *kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp #define DRM_SUSER(p) suser(p) #define DRM_TASKQUEUE_ARGS void *arg, int pending #define DRM_IRQ_ARGS void *arg @@ -473,7 +473,7 @@ extern d_close_t DRM(close); extern d_read_t DRM(read); extern d_poll_t DRM(poll); extern d_mmap_t DRM(mmap); -extern int DRM(open_helper)(dev_t kdev, int flags, int fmt, +extern int DRM(open_helper)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p, drm_device_t *dev); extern drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p); diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h index ab79d03b22d1..2637a83998ed 100644 --- a/sys/dev/drm/drm_vm.h +++ b/sys/dev/drm/drm_vm.h @@ -26,7 +26,7 @@ */ #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, +static int DRM(dma_mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__FreeBSD__) static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) @@ -55,7 +55,7 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) } #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, +int DRM(mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__FreeBSD__) int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot) diff --git a/sys/dev/fb/creatorreg.h b/sys/dev/fb/creatorreg.h index 6fa42f731525..b3be9e2ae5d3 100644 --- a/sys/dev/fb/creatorreg.h +++ b/sys/dev/fb/creatorreg.h @@ -142,7 +142,7 @@ struct creator_softc { video_adapter_t sc_va; /* XXX must be first */ - dev_t sc_si; + struct cdev *sc_si; struct resource *sc_reg[FFB_NREG]; bus_space_tag_t sc_bt[FFB_NREG]; diff --git a/sys/dev/fb/gfb.h b/sys/dev/fb/gfb.h index 07ee5c97afb1..470dfc268864 100644 --- a/sys/dev/fb/gfb.h +++ b/sys/dev/fb/gfb.h @@ -166,7 +166,7 @@ typedef struct gfb_softc { int type; int model; struct cdevsw *cdevsw; - dev_t devt; + struct cdev *devt; } *gfb_softc_t; #endif /* _FB_GFB_H_ */ diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c index 9f128135af4b..3af5fda458dc 100644 --- a/sys/dev/fb/vga.c +++ b/sys/dev/fb/vga.c @@ -109,7 +109,7 @@ vga_attach_unit(int unit, vga_softc_t *sc, int flags) #ifdef FB_INSTALL_CDEV int -vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td) +vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td) { if (sc == NULL) return ENXIO; @@ -120,32 +120,32 @@ vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td) } int -vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td) +vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td) { return genfbclose(&sc->gensc, sc->adp, flag, mode, td); } int -vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag) +vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag) { return genfbread(&sc->gensc, sc->adp, uio, flag); } int -vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag) +vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag) { return genfbread(&sc->gensc, sc->adp, uio, flag); } int -vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, +vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, struct thread *td) { return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td); } int -vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr, +vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr, int prot) { return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot); diff --git a/sys/dev/fb/vgareg.h b/sys/dev/fb/vgareg.h index f3903182a59f..e26c214e21c5 100644 --- a/sys/dev/fb/vgareg.h +++ b/sys/dev/fb/vgareg.h @@ -78,15 +78,15 @@ int vga_probe_unit(int unit, struct video_adapter *adp, int flags); int vga_attach_unit(int unit, vga_softc_t *sc, int flags); #ifdef FB_INSTALL_CDEV -int vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, +int vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td); -int vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode, +int vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td); -int vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag); -int vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag); -int vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, +int vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag); +int vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag); +int vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, struct thread *td); -int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, +int vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr, int prot); #endif diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 916df7088992..f61b11fbf98e 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -301,7 +301,7 @@ struct fd_data { struct callout_handle toffhandle; struct callout_handle tohandle; struct devstat *device_stats; - dev_t masterdev; + struct cdev *masterdev; device_t dev; fdu_t fdu; }; @@ -393,11 +393,11 @@ static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; static driver_intr_t fdc_intr; static int fdcpio(fdc_p, long, caddr_t, u_int); -static int fdautoselect(dev_t); +static int fdautoselect(struct cdev *); static int fdstate(struct fdc_data *); static int retrier(struct fdc_data *); static void fdbiodone(struct bio *); -static int fdmisccmd(dev_t, u_int, void *); +static int fdmisccmd(struct cdev *, u_int, void *); static d_ioctl_t fdioctl; static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */ @@ -1496,7 +1496,7 @@ out_fdc(struct fdc_data *fdc, int x) * auxiliary functions). */ static int -fdopen(dev_t dev, int flags, int mode, struct thread *td) +fdopen(struct cdev *dev, int flags, int mode, struct thread *td) { fd_p fd; fdc_p fdc; @@ -1591,7 +1591,7 @@ fdopen(dev_t dev, int flags, int mode, struct thread *td) } static int -fdclose(dev_t dev, int flags, int mode, struct thread *td) +fdclose(struct cdev *dev, int flags, int mode, struct thread *td) { struct fd_data *fd; @@ -1795,7 +1795,7 @@ fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count) * Try figuring out the density of the media present in our device. */ static int -fdautoselect(dev_t dev) +fdautoselect(struct cdev *dev) { fd_p fd; struct fd_type *fdtp; @@ -2492,7 +2492,7 @@ fdbiodone(struct bio *bp) } static int -fdmisccmd(dev_t dev, u_int cmd, void *data) +fdmisccmd(struct cdev *dev, u_int cmd, void *data) { fdu_t fdu; fd_p fd; @@ -2543,7 +2543,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) } static int -fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +fdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { fdu_t fdu; fd_p fd; diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index 5b433879e268..3c44a553adeb 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -72,7 +72,7 @@ struct fw_device{ struct firewire_softc { #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 - dev_t dev; + struct cdev *dev; #endif struct firewire_comm *fc; }; @@ -156,7 +156,7 @@ struct firewire_comm{ uint32_t (*cyctimer) (struct firewire_comm *); void (*ibr) (struct firewire_comm *); uint32_t (*set_bmr) (struct firewire_comm *, uint32_t); - int (*ioctl) (dev_t, u_long, caddr_t, int, fw_proc *); + int (*ioctl) (struct cdev *, u_long, caddr_t, int, fw_proc *); int (*irx_enable) (struct firewire_comm *, int); int (*irx_disable) (struct firewire_comm *, int); int (*itx_enable) (struct firewire_comm *, int); @@ -303,7 +303,7 @@ struct fw_bind *fw_bindlookup (struct firewire_comm *, uint16_t, uint32_t); void fw_drain_txq (struct firewire_comm *); int fwdev_makedev (struct firewire_softc *); int fwdev_destroydev (struct firewire_softc *); -void fwdev_clone (void *, char *, int, dev_t *); +void fwdev_clone (void *, char *, int, struct cdev **); extern int firewire_debug; extern devclass_t firewire_devclass; diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 7cf7dc91a103..5d104156ba03 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -178,7 +178,7 @@ fwdev_freebuf(struct fw_xferq *q) static int -fw_open (dev_t dev, int flags, int fmt, fw_proc *td) +fw_open (struct cdev *dev, int flags, int fmt, fw_proc *td) { int err = 0; @@ -205,7 +205,7 @@ fw_open (dev_t dev, int flags, int fmt, fw_proc *td) } static int -fw_close (dev_t dev, int flags, int fmt, fw_proc *td) +fw_close (struct cdev *dev, int flags, int fmt, fw_proc *td) { struct firewire_softc *sc; struct firewire_comm *fc; @@ -279,7 +279,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) * read request. */ static int -fw_read (dev_t dev, struct uio *uio, int ioflag) +fw_read (struct cdev *dev, struct uio *uio, int ioflag) { struct firewire_softc *sc; struct fw_xferq *ir; @@ -365,7 +365,7 @@ readloop: } static int -fw_write (dev_t dev, struct uio *uio, int ioflag) +fw_write (struct cdev *dev, struct uio *uio, int ioflag) { int err = 0; struct firewire_softc *sc; @@ -428,7 +428,7 @@ isoloop: * ioctl support. */ int -fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) +fw_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td) { struct firewire_softc *sc; struct firewire_comm *fc; @@ -728,7 +728,7 @@ out: return err; } int -fw_poll(dev_t dev, int events, fw_proc *td) +fw_poll(struct cdev *dev, int events, fw_proc *td) { struct firewire_softc *sc; struct fw_xferq *ir; @@ -760,9 +760,9 @@ fw_poll(dev_t dev, int events, fw_proc *td) static int #if defined(__DragonFly__) || __FreeBSD_version < 500102 -fw_mmap (dev_t dev, vm_offset_t offset, int nproto) +fw_mmap (struct cdev *dev, vm_offset_t offset, int nproto) #else -fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto) +fw_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto) #endif { struct firewire_softc *sc; @@ -783,7 +783,7 @@ fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto) static void fw_strategy(struct bio *bp) { - dev_t dev; + struct cdev *dev; dev = bp->bio_dev; if (DEV_FWMEM(dev)) { @@ -805,7 +805,7 @@ fwdev_makedev(struct firewire_softc *sc) #if defined(__DragonFly__) || __FreeBSD_version < 500000 cdevsw_add(&firewire_cdevsw); #else - dev_t d; + struct cdev *d; int unit; unit = device_get_unit(sc->fc->bdev); @@ -840,7 +840,7 @@ fwdev_destroydev(struct firewire_softc *sc) #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #define NDEVTYPE 2 void -fwdev_clone(void *arg, char *name, int namelen, dev_t *dev) +fwdev_clone(void *arg, char *name, int namelen, struct cdev **dev) { struct firewire_softc *sc; char *devnames[NDEVTYPE] = {"fw", "fwmem"}; diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index c10a07893342..a2e81e3c448f 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -274,7 +274,7 @@ fwmem_write_block( int -fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td) +fwmem_open (struct cdev *dev, int flags, int fmt, fw_proc *td) { struct fwmem_softc *fms; @@ -300,7 +300,7 @@ fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td) } int -fwmem_close (dev_t dev, int flags, int fmt, fw_proc *td) +fwmem_close (struct cdev *dev, int flags, int fmt, fw_proc *td) { struct fwmem_softc *fms; @@ -343,7 +343,7 @@ fwmem_strategy(struct bio *bp) struct fwmem_softc *fms; struct fw_device *fwdev; struct fw_xfer *xfer; - dev_t dev; + struct cdev *dev; int unit, err=0, s, iolen; dev = bp->bio_dev; @@ -406,7 +406,7 @@ error: } int -fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) +fwmem_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td) { struct fwmem_softc *fms; int err = 0; @@ -425,15 +425,15 @@ fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) return(err); } int -fwmem_poll (dev_t dev, int events, fw_proc *td) +fwmem_poll (struct cdev *dev, int events, fw_proc *td) { return EINVAL; } int #if defined(__DragonFly__) || __FreeBSD_version < 500102 -fwmem_mmap (dev_t dev, vm_offset_t offset, int nproto) +fwmem_mmap (struct cdev *dev, vm_offset_t offset, int nproto) #else -fwmem_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto) +fwmem_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto) #endif { return EINVAL; diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index c6e58c55b360..6c9990934a25 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -345,7 +345,7 @@ again: } /* Device specific ioctl. */ int -fwohci_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) +fwohci_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td) { struct firewire_softc *sc; struct fwohci_softc *fc; diff --git a/sys/dev/gfb/gfb_pci.c b/sys/dev/gfb/gfb_pci.c index 7fb3878c580c..3e229786c106 100644 --- a/sys/dev/gfb/gfb_pci.c +++ b/sys/dev/gfb/gfb_pci.c @@ -260,7 +260,7 @@ pcigfb_detach(device_t dev) #ifdef FB_INSTALL_CDEV int -pcigfb_open(dev_t dev, int flag, int mode, struct thread *td) +pcigfb_open(struct cdev *dev, int flag, int mode, struct thread *td) { struct gfb_softc *sc; int error; @@ -277,7 +277,7 @@ pcigfb_open(dev_t dev, int flag, int mode, struct thread *td) } int -pcigfb_close(dev_t dev, int flag, int mode, struct thread *td) +pcigfb_close(struct cdev *dev, int flag, int mode, struct thread *td) { struct gfb_softc *sc; @@ -286,7 +286,7 @@ pcigfb_close(dev_t dev, int flag, int mode, struct thread *td) } int -pcigfb_read(dev_t dev, struct uio *uio, int flag) +pcigfb_read(struct cdev *dev, struct uio *uio, int flag) { struct gfb_softc *sc; @@ -295,7 +295,7 @@ pcigfb_read(dev_t dev, struct uio *uio, int flag) } int -pcigfb_write(dev_t dev, struct uio *uio, int flag) +pcigfb_write(struct cdev *dev, struct uio *uio, int flag) { struct gfb_softc *sc; @@ -304,7 +304,7 @@ pcigfb_write(dev_t dev, struct uio *uio, int flag) } int -pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +pcigfb_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { struct gfb_softc *sc; @@ -313,7 +313,7 @@ pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } int -pcigfb_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +pcigfb_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { struct gfb_softc *sc; diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index 47f27a78bd4c..c9682ef674b5 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -575,7 +575,7 @@ struct cmd_info { static struct cmd_info *ida_cmd_lookup(int); static int -ida_ioctl (dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) +ida_ioctl (struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) { struct ida_softc *sc; struct ida_user_command *uc; diff --git a/sys/dev/ida/idavar.h b/sys/dev/ida/idavar.h index 78993cb3ea48..118e680427f7 100644 --- a/sys/dev/ida/idavar.h +++ b/sys/dev/ida/idavar.h @@ -126,7 +126,7 @@ struct ida_access { struct ida_softc { device_t dev; int unit; - dev_t ida_dev_t; + struct cdev *ida_dev_t; int regs_res_type; int regs_res_id; diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index 37c2b6186d0c..3a879d8d0d37 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -52,7 +52,7 @@ struct iic_softc { char sc_buffer[BUFSIZE]; /* output buffer */ char sc_inbuf[BUFSIZE]; /* input buffer */ - dev_t sc_devnode; + struct cdev *sc_devnode; }; #define IIC_SOFTC(unit) \ @@ -146,7 +146,7 @@ iic_detach(device_t dev) } static int -iicopen (dev_t dev, int flags, int fmt, struct thread *td) +iicopen (struct cdev *dev, int flags, int fmt, struct thread *td) { struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -162,7 +162,7 @@ iicopen (dev_t dev, int flags, int fmt, struct thread *td) } static int -iicclose(dev_t dev, int flags, int fmt, struct thread *td) +iicclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -181,7 +181,7 @@ iicclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -iicwrite(dev_t dev, struct uio * uio, int ioflag) +iicwrite(struct cdev *dev, struct uio * uio, int ioflag) { device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -208,7 +208,7 @@ iicwrite(dev_t dev, struct uio * uio, int ioflag) } static int -iicread(dev_t dev, struct uio * uio, int ioflag) +iicread(struct cdev *dev, struct uio * uio, int ioflag) { device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -240,7 +240,7 @@ iicread(dev_t dev, struct uio * uio, int ioflag) } static int -iicioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); diff --git a/sys/dev/iir/iir.h b/sys/dev/iir/iir.h index 44c4cf57f7c8..688cf634d153 100644 --- a/sys/dev/iir/iir.h +++ b/sys/dev/iir/iir.h @@ -602,7 +602,7 @@ struct gdt_softc { #define GDT_POLLING 0x01 #define GDT_SHUTDOWN 0x02 #define GDT_POLL_WAIT 0x80 - dev_t sc_dev; + struct cdev *sc_dev; bus_space_tag_t sc_dpmemt; bus_space_handle_t sc_dpmemh; bus_addr_t sc_dpmembase; @@ -746,8 +746,8 @@ gdt_dec32(addr) extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs; extern u_int8_t gdt_polling; -dev_t gdt_make_dev(int unit); -void gdt_destroy_dev(dev_t dev); +struct cdev *gdt_make_dev(int unit); +void gdt_destroy_dev(struct cdev *dev); void gdt_next(struct gdt_softc *gdt); void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb); diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c index 87275b5a640c..4d976b3e9e81 100644 --- a/sys/dev/iir/iir_ctrl.c +++ b/sys/dev/iir/iir_ctrl.c @@ -95,10 +95,10 @@ extern gdt_statist_t gdt_stat; * Given a controller number, * make a special device and return the dev_t */ -dev_t +struct cdev * gdt_make_dev(int unit) { - dev_t dev; + struct cdev *dev; #ifdef SDEV_PER_HBA dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR, @@ -114,7 +114,7 @@ gdt_make_dev(int unit) } void -gdt_destroy_dev(dev_t dev) +gdt_destroy_dev(struct cdev *dev) { if (dev != NULL) destroy_dev(dev); @@ -144,7 +144,7 @@ gdt_minor2softc(int minor_no) } static int -iir_open(dev_t dev, int flags, int fmt, d_thread_t * p) +iir_open(struct cdev *dev, int flags, int fmt, d_thread_t * p) { GDT_DPRINTF(GDT_D_DEBUG, ("iir_open()\n")); @@ -162,7 +162,7 @@ iir_open(dev_t dev, int flags, int fmt, d_thread_t * p) } static int -iir_close(dev_t dev, int flags, int fmt, d_thread_t * p) +iir_close(struct cdev *dev, int flags, int fmt, d_thread_t * p) { GDT_DPRINTF(GDT_D_DEBUG, ("iir_close()\n")); @@ -180,7 +180,7 @@ iir_close(dev_t dev, int flags, int fmt, d_thread_t * p) } static int -iir_write(dev_t dev, struct uio * uio, int ioflag) +iir_write(struct cdev *dev, struct uio * uio, int ioflag) { GDT_DPRINTF(GDT_D_DEBUG, ("iir_write()\n")); @@ -198,7 +198,7 @@ iir_write(dev_t dev, struct uio * uio, int ioflag) } static int -iir_read(dev_t dev, struct uio * uio, int ioflag) +iir_read(struct cdev *dev, struct uio * uio, int ioflag) { GDT_DPRINTF(GDT_D_DEBUG, ("iir_read()\n")); @@ -222,7 +222,7 @@ iir_read(dev_t dev, struct uio * uio, int ioflag) */ static int -iir_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p) +iir_ioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p) { GDT_DPRINTF(GDT_D_DEBUG, ("iir_ioctl() cmd 0x%lx\n",cmd)); diff --git a/sys/dev/ips/ips.c b/sys/dev/ips/ips.c index b2532e95b684..b1a829738901 100644 --- a/sys/dev/ips/ips.c +++ b/sys/dev/ips/ips.c @@ -68,14 +68,14 @@ static const char* ips_adapter_name[] = { }; -static int ips_open(dev_t dev, int flags, int fmt, struct thread *td) +static int ips_open(struct cdev *dev, int flags, int fmt, struct thread *td) { ips_softc_t *sc = dev->si_drv1; sc->state |= IPS_DEV_OPEN; return 0; } -static int ips_close(dev_t dev, int flags, int fmt, struct thread *td) +static int ips_close(struct cdev *dev, int flags, int fmt, struct thread *td) { ips_softc_t *sc = dev->si_drv1; sc->state &= ~IPS_DEV_OPEN; @@ -83,7 +83,7 @@ static int ips_close(dev_t dev, int flags, int fmt, struct thread *td) return 0; } -static int ips_ioctl(dev_t dev, u_long command, caddr_t addr, int32_t flags, struct thread *td) +static int ips_ioctl(struct cdev *dev, u_long command, caddr_t addr, int32_t flags, struct thread *td) { ips_softc_t *sc; diff --git a/sys/dev/ips/ips.h b/sys/dev/ips/ips.h index 5fd7514956b5..9c26a7af746d 100644 --- a/sys/dev/ips/ips.h +++ b/sys/dev/ips/ips.h @@ -414,7 +414,7 @@ typedef struct ips_softc{ bus_dma_tag_t command_dmatag; bus_dma_tag_t sg_dmatag; device_t dev; - dev_t device_file; + struct cdev *device_file; struct callout_handle timer; u_int16_t adapter_type; ips_adapter_info_t adapter_info; diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index c7f908f315cb..9845078ac64f 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -238,7 +238,7 @@ isp_freeze_loopdown(struct ispsoftc *isp, char *msg) } static int -ispioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +ispioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct ispsoftc *isp; int nr, retval = ENOTTY; diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 0b4efe7a27ac..0568febed341 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -128,7 +128,7 @@ joy_detach(device_t dev) static int -joyopen(dev_t dev, int flags, int fmt, struct thread *td) +joyopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int i = joypart (dev); struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); @@ -141,7 +141,7 @@ joyopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -joyclose(dev_t dev, int flags, int fmt, struct thread *td) +joyclose(struct cdev *dev, int flags, int fmt, struct thread *td) { int i = joypart (dev); struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); @@ -151,7 +151,7 @@ joyclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -joyread(dev_t dev, struct uio *uio, int flag) +joyread(struct cdev *dev, struct uio *uio, int flag) { struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); bus_space_handle_t port = joy->port; @@ -209,7 +209,7 @@ joyread(dev_t dev, struct uio *uio, int flag) } static int -joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +joyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); int i = joypart (dev); diff --git a/sys/dev/joy/joyvar.h b/sys/dev/joy/joyvar.h index 7fd1c133efe9..966fe78abb60 100644 --- a/sys/dev/joy/joyvar.h +++ b/sys/dev/joy/joyvar.h @@ -35,7 +35,7 @@ struct joy_softc { int timeout[2]; struct resource *res; int rid; - dev_t d; + struct cdev *d; }; int joy_probe(device_t); diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c index 0f1f5715b0c6..b7694c50d0a4 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -489,7 +489,7 @@ kbd_detach(keyboard_t *kbd) static kbd_callback_func_t genkbd_event; static int -genkbdopen(dev_t dev, int mode, int flag, struct thread *td) +genkbdopen(struct cdev *dev, int mode, int flag, struct thread *td) { keyboard_t *kbd; genkbd_softc_t *sc; @@ -527,7 +527,7 @@ genkbdopen(dev_t dev, int mode, int flag, struct thread *td) } static int -genkbdclose(dev_t dev, int mode, int flag, struct thread *td) +genkbdclose(struct cdev *dev, int mode, int flag, struct thread *td) { keyboard_t *kbd; genkbd_softc_t *sc; @@ -553,7 +553,7 @@ genkbdclose(dev_t dev, int mode, int flag, struct thread *td) } static int -genkbdread(dev_t dev, struct uio *uio, int flag) +genkbdread(struct cdev *dev, struct uio *uio, int flag) { keyboard_t *kbd; genkbd_softc_t *sc; @@ -606,7 +606,7 @@ genkbdread(dev_t dev, struct uio *uio, int flag) } static int -genkbdwrite(dev_t dev, struct uio *uio, int flag) +genkbdwrite(struct cdev *dev, struct uio *uio, int flag) { keyboard_t *kbd; @@ -617,7 +617,7 @@ genkbdwrite(dev_t dev, struct uio *uio, int flag) } static int -genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +genkbdioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { keyboard_t *kbd; int error; @@ -632,7 +632,7 @@ genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } static int -genkbdpoll(dev_t dev, int events, struct thread *td) +genkbdpoll(struct cdev *dev, int events, struct thread *td) { keyboard_t *kbd; genkbd_softc_t *sc; diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h index 05fb8956369e..78a5af420881 100644 --- a/sys/dev/kbd/kbdreg.h +++ b/sys/dev/kbd/kbdreg.h @@ -90,7 +90,7 @@ struct keyboard { #define KB_DELAY2 100 unsigned long kb_count; /* # of processed key strokes */ u_char kb_lastact[NUM_KEYS/2]; - dev_t kb_dev; + struct cdev *kb_dev; }; #define KBD_IS_VALID(k) ((k)->kb_flags & KB_VALID) diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c index 5160a05ec9e3..4c19e274daf3 100644 --- a/sys/dev/led/led.c +++ b/sys/dev/led/led.c @@ -26,7 +26,7 @@ struct ledsc { LIST_ENTRY(ledsc) list; void *private; led_t *func; - dev_t dev; + struct cdev *dev; struct sbuf *spec; char *str; char *ptr; @@ -72,7 +72,7 @@ led_timeout(void *p) } static int -led_write(dev_t dev, struct uio *uio, int ioflag) +led_write(struct cdev *dev, struct uio *uio, int ioflag) { int error; char *s, *s2; @@ -221,7 +221,7 @@ static struct cdevsw led_cdevsw = { .d_name = "LED", }; -dev_t +struct cdev * led_create(led_t *func, void *priv, char const *name) { struct ledsc *sc; @@ -259,7 +259,7 @@ led_create(led_t *func, void *priv, char const *name) } void -led_destroy(dev_t dev) +led_destroy(struct cdev *dev) { struct ledsc *sc; diff --git a/sys/dev/led/led.h b/sys/dev/led/led.h index 6880efd73989..866311b9809a 100644 --- a/sys/dev/led/led.h +++ b/sys/dev/led/led.h @@ -14,7 +14,7 @@ typedef void led_t(void *, int); -dev_t led_create(led_t *, void *, char const *); -void led_destroy(dev_t); +struct cdev *led_create(led_t *, void *, char const *); +void led_destroy(struct cdev *); #endif diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c index 9e28d25c7013..aead16c72ef5 100644 --- a/sys/dev/matcd/matcd.c +++ b/sys/dev/matcd/matcd.c @@ -624,7 +624,7 @@ struct matcd_mbx { static struct matcd_data { device_t dev; - dev_t matcd_dev_t; + struct cdev *matcd_dev_t; short config; short drivemode; /*Last state drive was set to*/ short flags; @@ -657,8 +657,8 @@ static unsigned char if_state[4]={0,0,0,0}; /*State of host I/F and bus*/ int matcd_probe(struct matcd_softc *sc); int matcd_attach(struct matcd_softc *sc); -static int matcdopen(dev_t dev, int flags, int fmt, struct thread *ptx); -static int matcdclose(dev_t dev, int flags, int fmt, struct thread *ptx); +static int matcdopen(struct cdev *dev, int flags, int fmt, struct thread *ptx); +static int matcdclose(struct cdev *dev, int flags, int fmt, struct thread *ptx); static void matcdstrategy(struct bio *bp); static d_ioctl_t matcdioctl; static timeout_t matcd_timeout; @@ -668,7 +668,7 @@ static timeout_t matcd_timeout; Internal function declarations ---------------------------------------------------------------------------*/ -static int matcdsize(dev_t dev); +static int matcdsize(struct cdev *dev); static void matcd_start(struct bio_queue_head *dp); static void zero_cmd(char *); static void matcd_pread(int port, int count, unsigned char * data); @@ -772,7 +772,7 @@ int matcd_attach(struct matcd_softc *sc) unsigned char data[12]; struct matcd_data *cd; int port = sc->port_bsh; /*Take port ID selected in probe()*/ - dev_t d; + struct cdev *d; int unit=0; printf("matcdc%d: Host interface type %d port %x\n", @@ -864,7 +864,7 @@ int matcd_attach(struct matcd_softc *sc) <15> If LOCKDRIVE is enabled, additional minor number devices allow <15> the drive to be locked while being accessed. ---------------------------------------------------------------------------*/ -static int matcdopen(dev_t dev, int flags, int fmt, +static int matcdopen(struct cdev *dev, int flags, int fmt, struct thread *ptx) { int cdrive,ldrive,partition,controller,lock; @@ -1051,7 +1051,7 @@ static int matcdopen(dev_t dev, int flags, int fmt, the drive. See Edit 15 in Edit History. ---------------------------------------------------------------------------*/ -static int matcdclose(dev_t dev, int flags, int fmt,struct thread *ptx) +static int matcdclose(struct cdev *dev, int flags, int fmt,struct thread *ptx) { int ldrive,cdrive,port,partition,controller,lock; struct matcd_data *cd; @@ -1910,7 +1910,7 @@ static void matcd_start(struct bio_queue_head *dp) things that don't fit into the block read scheme of things. ---------------------------------------------------------------------------*/ -static int matcdioctl(dev_t dev, unsigned long command, +static int matcdioctl(struct cdev *dev, unsigned long command, caddr_t addr, int flags, struct thread *td) { @@ -2051,7 +2051,7 @@ static int matcdioctl(dev_t dev, unsigned long command, matcdsize - Reports how many blocks exist on the disc. ---------------------------------------------------------------------------*/ -static int matcdsize(dev_t dev) +static int matcdsize(struct cdev *dev) { int size,blksize; int ldrive,part; diff --git a/sys/dev/matcd/matcd_data.h b/sys/dev/matcd/matcd_data.h index 381599a09bb7..1923cec4cbcc 100644 --- a/sys/dev/matcd/matcd_data.h +++ b/sys/dev/matcd/matcd_data.h @@ -50,7 +50,7 @@ See matcd.c for Edit History struct matcd_softc { device_t dev; - dev_t matcd_dev_t; + struct cdev *matcd_dev_t; struct resource * port; int port_rid; int port_type; diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index ebc233e89002..4f09744c5287 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -153,7 +153,7 @@ static int mcd_pause(struct mcd_softc *); static int mcd_resume(struct mcd_softc *); static int mcd_lock_door(struct mcd_softc *, int lock); static int mcd_close_tray(struct mcd_softc *); -static int mcd_size(dev_t dev); +static int mcd_size(struct cdev *dev); static d_open_t mcdopen; static d_close_t mcdclose; @@ -211,7 +211,7 @@ mcd_attach(struct mcd_softc *sc) } static int -mcdopen(dev_t dev, int flags, int fmt, struct thread *td) +mcdopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct mcd_softc *sc; int r,retry; @@ -271,7 +271,7 @@ mcdopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -mcdclose(dev_t dev, int flags, int fmt, struct thread *td) +mcdclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct mcd_softc *sc; @@ -368,7 +368,7 @@ mcd_start(struct mcd_softc *sc) } static int -mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +mcdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct mcd_softc *sc; int retry,r; @@ -466,7 +466,7 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd); } static int -mcd_size(dev_t dev) +mcd_size(struct cdev *dev) { struct mcd_softc *sc; int size; diff --git a/sys/dev/mcd/mcdvar.h b/sys/dev/mcd/mcdvar.h index 9f81ced88560..adfd4a4f4191 100644 --- a/sys/dev/mcd/mcdvar.h +++ b/sys/dev/mcd/mcdvar.h @@ -35,7 +35,7 @@ struct mcd_data { struct mcd_softc { device_t dev; - dev_t mcd_dev_t; + struct cdev *mcd_dev_t; int debug; struct resource * port; diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 4b680d7ce03c..295d8d279997 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -107,7 +107,7 @@ static u_char end_mfs_root[] __unused = "MFS Filesystem had better STOP here"; static g_init_t md_drvinit; static int mdunits; -static dev_t status_dev = 0; +static struct cdev *status_dev = 0; static d_ioctl_t mdctlioctl; @@ -137,7 +137,7 @@ struct md_s { LIST_ENTRY(md_s) list; struct bio_queue_head bio_queue; struct mtx queue_mtx; - dev_t dev; + struct cdev *dev; enum md_types type; unsigned nsect; unsigned opencount; @@ -1078,7 +1078,7 @@ mddetach(int unit, struct thread *td) } static int -mdctlioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct md_ioctl *mdio; struct md_s *sc; diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index bf7b8cd06492..f026175f91ed 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -204,7 +204,7 @@ mlx_free(struct mlx_softc *sc) free(sc->mlx_enq2, M_DEVBUF); /* destroy control device */ - if (sc->mlx_dev_t != (dev_t)NULL) + if (sc->mlx_dev_t != (struct cdev *)NULL) destroy_dev(sc->mlx_dev_t); } @@ -721,7 +721,7 @@ mlx_submit_buf(struct mlx_softc *sc, mlx_bio *bp) * Accept an open operation on the control device. */ int -mlx_open(dev_t dev, int flags, int fmt, struct thread *td) +mlx_open(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); @@ -734,7 +734,7 @@ mlx_open(dev_t dev, int flags, int fmt, struct thread *td) * Accept the last close on the control device. */ int -mlx_close(dev_t dev, int flags, int fmt, struct thread *td) +mlx_close(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); @@ -747,7 +747,7 @@ mlx_close(dev_t dev, int flags, int fmt, struct thread *td) * Handle controller-specific control operations. */ int -mlx_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) +mlx_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) { int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); diff --git a/sys/dev/mlx/mlxvar.h b/sys/dev/mlx/mlxvar.h index e499569d279f..345cf9933c22 100644 --- a/sys/dev/mlx/mlxvar.h +++ b/sys/dev/mlx/mlxvar.h @@ -108,7 +108,7 @@ struct mlx_softc { /* bus connections */ device_t mlx_dev; - dev_t mlx_dev_t; + struct cdev *mlx_dev_t; struct resource *mlx_mem; /* mailbox interface window */ int mlx_mem_rid; int mlx_mem_type; diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index eb035d00979b..2e368164b604 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -2826,7 +2826,7 @@ mly_print_controller(int controller) * Accept an open operation on the control device. */ static int -mly_user_open(dev_t dev, int flags, int fmt, struct thread *td) +mly_user_open(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = minor(dev); struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit); @@ -2839,7 +2839,7 @@ mly_user_open(dev_t dev, int flags, int fmt, struct thread *td) * Accept the last close on the control device. */ static int -mly_user_close(dev_t dev, int flags, int fmt, struct thread *td) +mly_user_close(struct cdev *dev, int flags, int fmt, struct thread *td) { int unit = minor(dev); struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit); @@ -2852,7 +2852,7 @@ mly_user_close(dev_t dev, int flags, int fmt, struct thread *td) * Handle controller-specific control operations. */ static int -mly_user_ioctl(dev_t dev, u_long cmd, caddr_t addr, +mly_user_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) { struct mly_softc *sc = (struct mly_softc *)dev->si_drv1; diff --git a/sys/dev/mly/mlyvar.h b/sys/dev/mly/mlyvar.h index c994d429233a..e1c7a50e9167 100644 --- a/sys/dev/mly/mlyvar.h +++ b/sys/dev/mly/mlyvar.h @@ -165,7 +165,7 @@ struct mly_command { struct mly_softc { /* bus connections */ device_t mly_dev; - dev_t mly_dev_t; + struct cdev *mly_dev_t; struct resource *mly_regs_resource; /* register interface window */ int mly_regs_rid; /* resource ID */ bus_space_handle_t mly_bhandle; /* bus space handle */ diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index ddc0742db232..31c85f89f108 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -96,8 +96,8 @@ typedef struct mse_softc { u_char sc_bytes[MOUSE_SYS_PACKETSIZE]; struct callout_handle sc_callout; int sc_watchdog; - dev_t sc_dev; - dev_t sc_ndev; + struct cdev *sc_dev; + struct cdev *sc_ndev; mousehw_t hw; mousemode_t mode; mousestatus_t status; @@ -386,7 +386,7 @@ mse_detach(dev) */ static int mseopen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -426,7 +426,7 @@ mseopen(dev, flags, fmt, td) */ static int mseclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -450,7 +450,7 @@ mseclose(dev, flags, fmt, td) */ static int mseread(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -517,7 +517,7 @@ mseread(dev, uio, ioflag) */ static int mseioctl(dev, cmd, addr, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flag; @@ -634,7 +634,7 @@ mseioctl(dev, cmd, addr, flag, td) */ static int msepoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { @@ -667,10 +667,10 @@ static void msetimeout(arg) void *arg; { - dev_t dev; + struct cdev *dev; mse_softc_t *sc; - dev = (dev_t)arg; + dev = (struct cdev *)arg; sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); if (sc->sc_watchdog) { if (bootverbose) diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index cb25ecb0b694..683d06be2c85 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -57,7 +57,7 @@ MALLOC_DEFINE(M_NLMDM, "nullmodem", "nullmodem data structures"); static void nmdmstart(struct tty *tp); static void nmdmstop(struct tty *tp, int rw); -static void nmdminit(dev_t dev); +static void nmdminit(struct cdev *dev); static d_open_t nmdmopen; static d_close_t nmdmclose; @@ -77,7 +77,7 @@ static struct cdevsw nmdm_cdevsw = { struct softpart { struct tty *nm_tty; - dev_t dev; + struct cdev *dev; int dcd; struct task pt_task; struct softpart *other; @@ -94,11 +94,11 @@ static struct clonedevs *nmdmclones; static TAILQ_HEAD(,nm_softc) nmdmhead = TAILQ_HEAD_INITIALIZER(nmdmhead); static void -nmdm_clone(void *arg, char *name, int nameen, dev_t *dev) +nmdm_clone(void *arg, char *name, int nameen, struct cdev **dev) { int i, unit; char *p; - dev_t d1, d2; + struct cdev *d1, *d2; if (*dev != NODEV) return; @@ -179,9 +179,9 @@ nmdm_task_tty(void *arg, int pending __unused) * This function creates and initializes a pair of ttys. */ static void -nmdminit(dev_t dev1) +nmdminit(struct cdev *dev1) { - dev_t dev2; + struct cdev *dev2; struct nm_softc *pt; dev2 = dev1->si_drv2; @@ -225,7 +225,7 @@ nmdminit(dev_t dev1) * Device opened from userland */ static int -nmdmopen(dev_t dev, int flag, int devtype, struct thread *td) +nmdmopen(struct cdev *dev, int flag, int devtype, struct thread *td) { struct tty *tp, *tp2; int error; @@ -260,7 +260,7 @@ nmdmopen(dev_t dev, int flag, int devtype, struct thread *td) } static int -nmdmclose(dev_t dev, int flag, int mode, struct thread *td) +nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) { return (ttyclose(dev->si_tty)); diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 314f460fe544..710d4b1c9a57 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -40,8 +40,8 @@ __FBSDID("$FreeBSD$"); #include /* For use with destroy_dev(9). */ -static dev_t null_dev; -static dev_t zero_dev; +static struct cdev *null_dev; +static struct cdev *zero_dev; static d_write_t null_write; static d_ioctl_t null_ioctl; @@ -73,7 +73,7 @@ static void *zbuf; /* ARGSUSED */ static int -null_write(dev_t dev __unused, struct uio *uio, int flags __unused) +null_write(struct cdev *dev __unused, struct uio *uio, int flags __unused) { uio->uio_resid = 0; return 0; @@ -81,7 +81,7 @@ null_write(dev_t dev __unused, struct uio *uio, int flags __unused) /* ARGSUSED */ static int -null_ioctl(dev_t dev __unused, u_long cmd, caddr_t data __unused, +null_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, int flags __unused, struct thread *td) { int error; @@ -96,7 +96,7 @@ null_ioctl(dev_t dev __unused, u_long cmd, caddr_t data __unused, /* ARGSUSED */ static int -zero_read(dev_t dev __unused, struct uio *uio, int flags __unused) +zero_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) { int c; int error = 0; diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index a16f58da2d8d..5ee59147e593 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -83,7 +83,7 @@ cn_drvinit(void *unused) { phandle_t options; char output[32]; - dev_t dev; + struct cdev *dev; if (ofw_consdev.cn_pri != CN_DEAD && ofw_consdev.cn_name[0] != '\0') { @@ -103,7 +103,7 @@ static int stdin; static int stdout; static int -ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td) +ofw_dev_open(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp; int unit; @@ -150,7 +150,7 @@ ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td) } static int -ofw_dev_close(dev_t dev, int flag, int mode, struct thread *td) +ofw_dev_close(struct cdev *dev, int flag, int mode, struct thread *td) { int unit; struct tty *tp; diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c index adb39296ab71..483942831275 100644 --- a/sys/dev/ofw/openfirmio.c +++ b/sys/dev/ofw/openfirmio.c @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #include -static dev_t openfirm_dev; +static struct cdev *openfirm_dev; static d_ioctl_t openfirm_ioctl; @@ -108,7 +108,7 @@ openfirm_getstr(int len, const char *user, char **cpp) } int -openfirm_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +openfirm_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct ofiocdesc *of; diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c index 5bf5e698d1c6..3182bffd3345 100644 --- a/sys/dev/ofw/openpromio.c +++ b/sys/dev/ofw/openpromio.c @@ -67,11 +67,11 @@ static struct cdevsw openprom_cdevsw = { }; static int openprom_is_open; -static dev_t openprom_dev; +static struct cdev *openprom_dev; static phandle_t openprom_node; static int -openprom_open(dev_t dev, int oflags, int devtype, struct thread *td) +openprom_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { if (openprom_is_open != 0) @@ -81,7 +81,7 @@ openprom_open(dev_t dev, int oflags, int devtype, struct thread *td) } static int -openprom_close(dev_t dev, int fflag, int devtype, struct thread *td) +openprom_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { openprom_is_open = 0; @@ -89,7 +89,7 @@ openprom_close(dev_t dev, int fflag, int devtype, struct thread *td) } static int -openprom_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +openprom_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct openpromio *oprom; diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index f993135c8389..0917ac5cbab6 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1783,7 +1783,7 @@ pci_assign_interrupt_method(device_t dev, device_t child) static int pci_modevent(module_t mod, int what, void *arg) { - static dev_t pci_cdev; + static struct cdev *pci_cdev; switch (what) { case MOD_LOAD: diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 0ce8da9e3f4e..b14abe13b3fb 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -84,7 +84,7 @@ struct cdevsw pcicdev = { }; static int -pci_open(dev_t dev, int oflags, int devtype, struct thread *td) +pci_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { int error; @@ -98,7 +98,7 @@ pci_open(dev_t dev, int oflags, int devtype, struct thread *td) } static int -pci_close(dev_t dev, int flag, int devtype, struct thread *td) +pci_close(struct cdev *dev, int flag, int devtype, struct thread *td) { return 0; } @@ -171,7 +171,7 @@ pci_conf_match(struct pci_match_conf *matches, int num_matches, } static int -pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { device_t pci, pcib; struct pci_io *io; diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index 7855e364cc18..f3f2c1d9e8a8 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -455,7 +455,7 @@ lptout(void *arg) */ static int -lptopen(dev_t dev, int flags, int fmt, struct thread *td) +lptopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int s; int trys, err; @@ -575,7 +575,7 @@ lptopen(dev_t dev, int flags, int fmt, struct thread *td) */ static int -lptclose(dev_t dev, int flags, int fmt, struct thread *td) +lptclose(struct cdev *dev, int flags, int fmt, struct thread *td) { u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); @@ -684,7 +684,7 @@ lpt_pushbytes(device_t dev) */ static int -lptread(dev_t dev, struct uio *uio, int ioflag) +lptread(struct cdev *dev, struct uio *uio, int ioflag) { u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); @@ -729,7 +729,7 @@ error: */ static int -lptwrite(dev_t dev, struct uio *uio, int ioflag) +lptwrite(struct cdev *dev, struct uio *uio, int ioflag) { register unsigned n; int err; @@ -897,7 +897,7 @@ lptintr(device_t dev) } static int -lptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +lptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int error = 0; u_int unit = LPTUNIT(minor(dev)); diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c index 599d2554ed5f..0219220bd971 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -152,7 +152,7 @@ pcfclock_attach(device_t dev) } static int -pcfclock_open(dev_t dev, int flag, int fms, struct thread *td) +pcfclock_open(struct cdev *dev, int flag, int fms, struct thread *td) { u_int unit = minor(dev); struct pcfclock_data *sc = UNITOSOFTC(unit); @@ -173,7 +173,7 @@ pcfclock_open(dev_t dev, int flag, int fms, struct thread *td) } static int -pcfclock_close(dev_t dev, int flags, int fmt, struct thread *td) +pcfclock_close(struct cdev *dev, int flags, int fmt, struct thread *td) { u_int unit = minor(dev); struct pcfclock_data *sc = UNITOSOFTC(unit); @@ -188,7 +188,7 @@ pcfclock_close(dev_t dev, int flags, int fmt, struct thread *td) } static void -pcfclock_write_cmd(dev_t dev, unsigned char command) +pcfclock_write_cmd(struct cdev *dev, unsigned char command) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -208,7 +208,7 @@ pcfclock_write_cmd(dev_t dev, unsigned char command) } static void -pcfclock_display_data(dev_t dev, char buf[18]) +pcfclock_display_data(struct cdev *dev, char buf[18]) { u_int unit = minor(dev); #ifdef PCFCLOCK_VERBOSE @@ -232,7 +232,7 @@ pcfclock_display_data(dev_t dev, char buf[18]) } static int -pcfclock_read_data(dev_t dev, char *buf, ssize_t bits) +pcfclock_read_data(struct cdev *dev, char *buf, ssize_t bits) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -271,7 +271,7 @@ pcfclock_read_data(dev_t dev, char *buf, ssize_t bits) } static int -pcfclock_read_dev(dev_t dev, char *buf, int maxretries) +pcfclock_read_dev(struct cdev *dev, char *buf, int maxretries) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -301,7 +301,7 @@ pcfclock_read_dev(dev_t dev, char *buf, int maxretries) } static int -pcfclock_read(dev_t dev, struct uio *uio, int ioflag) +pcfclock_read(struct cdev *dev, struct uio *uio, int ioflag) { u_int unit = minor(dev); char buf[18]; diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index 113448db5129..b537c8809b1a 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -255,7 +255,7 @@ ppiintr(void *arg) #endif /* PERIPH_1284 */ static int -ppiopen(dev_t dev, int flags, int fmt, struct thread *td) +ppiopen(struct cdev *dev, int flags, int fmt, struct thread *td) { u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); @@ -288,7 +288,7 @@ ppiopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -ppiclose(dev_t dev, int flags, int fmt, struct thread *td) +ppiclose(struct cdev *dev, int flags, int fmt, struct thread *td) { u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); @@ -330,7 +330,7 @@ ppiclose(dev_t dev, int flags, int fmt, struct thread *td) * If no data is available, wait for it otherwise transfer as much as possible */ static int -ppiread(dev_t dev, struct uio *uio, int ioflag) +ppiread(struct cdev *dev, struct uio *uio, int ioflag) { #ifdef PERIPH_1284 u_int unit = minor(dev); @@ -414,7 +414,7 @@ error: * Once negotiation done, transfer data */ static int -ppiwrite(dev_t dev, struct uio *uio, int ioflag) +ppiwrite(struct cdev *dev, struct uio *uio, int ioflag) { #ifdef PERIPH_1284 u_int unit = minor(dev); @@ -501,7 +501,7 @@ error: } static int -ppiioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +ppiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index fef615769ea2..2b86cd7e2498 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); struct pps_data { struct ppb_device pps_dev; struct pps_state pps[9]; - dev_t devs[9]; + struct cdev *devs[9]; device_t ppsdev; device_t ppbus; int busy; @@ -106,7 +106,7 @@ ppsattach(device_t dev) { struct pps_data *sc = DEVTOSOFTC(dev); device_t ppbus = device_get_parent(dev); - dev_t d; + struct cdev *d; intptr_t irq; int i, unit, zero = 0; @@ -191,7 +191,7 @@ ppsattach(device_t dev) } static int -ppsopen(dev_t dev, int flags, int fmt, struct thread *td) +ppsopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct pps_data *sc = dev->si_drv1; int subdev = (intptr_t)dev->si_drv2; @@ -227,7 +227,7 @@ ppsopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -ppsclose(dev_t dev, int flags, int fmt, struct thread *td) +ppsclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct pps_data *sc = dev->si_drv1; int subdev = (intptr_t)dev->si_drv2; @@ -293,7 +293,7 @@ ppsintr(void *arg) } static int -ppsioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +ppsioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct pps_data *sc = dev->si_drv1; int subdev = (intptr_t)dev->si_drv2; diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index e6727ee760cf..a88e4a913b91 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -74,7 +74,7 @@ static struct cdevsw random_cdevsw = { struct random_systat random_systat; /* For use with make_dev(9)/destroy_dev(9). */ -static dev_t random_dev; +static struct cdev *random_dev; /* Used to fake out unused random calls in random_systat */ void @@ -84,7 +84,7 @@ random_null_func(void) /* ARGSUSED */ static int -random_close(dev_t dev __unused, int flags, int fmt __unused, +random_close(struct cdev *dev __unused, int flags, int fmt __unused, struct thread *td) { if ((flags & FWRITE) && (suser(td) == 0) @@ -98,7 +98,7 @@ random_close(dev_t dev __unused, int flags, int fmt __unused, /* ARGSUSED */ static int -random_read(dev_t dev __unused, struct uio *uio, int flag) +random_read(struct cdev *dev __unused, struct uio *uio, int flag) { int c, error = 0; void *random_buf; @@ -136,7 +136,7 @@ random_read(dev_t dev __unused, struct uio *uio, int flag) /* ARGSUSED */ static int -random_write(dev_t dev __unused, struct uio *uio, int flag __unused) +random_write(struct cdev *dev __unused, struct uio *uio, int flag __unused) { int c, error = 0; void *random_buf; @@ -158,7 +158,7 @@ random_write(dev_t dev __unused, struct uio *uio, int flag __unused) /* ARGSUSED */ static int -random_ioctl(dev_t dev __unused, u_long cmd, caddr_t addr __unused, +random_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, int flags __unused, struct thread *td __unused) { int error = 0; @@ -176,7 +176,7 @@ random_ioctl(dev_t dev __unused, u_long cmd, caddr_t addr __unused, /* ARGSUSED */ static int -random_poll(dev_t dev __unused, int events, struct thread *td) +random_poll(struct cdev *dev __unused, int events, struct thread *td) { int revents = 0; diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 1135faf8ec48..d9b8e37787ab 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -84,8 +84,8 @@ /* Per-channel structure */ struct rc_chans { struct rc_softc *rc_rcb; /* back ptr */ - dev_t rc_dev; /* non-callout device */ - dev_t rc_cdev; /* callout device */ + struct cdev *rc_dev; /* non-callout device */ + struct cdev *rc_cdev; /* callout device */ u_short rc_flags; /* Misc. flags */ int rc_chan; /* Channel # */ u_char rc_ier; /* intr. enable reg */ @@ -234,7 +234,7 @@ rc_attach(device_t dev) struct rc_softc *sc; u_int port; int base, chan, error, i, x; - dev_t cdev; + struct cdev *cdev; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -853,7 +853,7 @@ rc_stop(struct tty *tp, int rw) } static int -rcopen(dev_t dev, int flag, int mode, d_thread_t *td) +rcopen(struct cdev *dev, int flag, int mode, d_thread_t *td) { struct rc_softc *sc; struct rc_chans *rc; @@ -944,7 +944,7 @@ out: } static int -rcclose(dev_t dev, int flag, int mode, d_thread_t *td) +rcclose(struct cdev *dev, int flag, int mode, d_thread_t *td) { struct rc_softc *sc; struct rc_chans *rc; @@ -1198,7 +1198,7 @@ rc_reinit(struct rc_softc *sc) } static int -rcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, d_thread_t *td) +rcioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, d_thread_t *td) { struct rc_chans *rc; struct tty *tp; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index fc5241d87dc3..3c092f5c422b 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -802,7 +802,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports) int retval; struct rp_port *rp; struct tty *tty; - dev_t *dev_nodes; + struct cdev **dev_nodes; unit = device_get_unit(ctlp->dev); @@ -949,7 +949,7 @@ rp_releaseresource(CONTROLLER_t *ctlp) static int rpopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag, mode; struct thread *td; { @@ -1108,7 +1108,7 @@ out2: static int rpclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag, mode; struct thread *td; { @@ -1182,7 +1182,7 @@ rphardclose(struct rp_port *rp) static int rpwrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -1222,7 +1222,7 @@ rpdtrwakeup(void *chan) static int rpioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; diff --git a/sys/dev/rp/rpreg.h b/sys/dev/rp/rpreg.h index a7cde1b03a25..6852f7cf6ab8 100644 --- a/sys/dev/rp/rpreg.h +++ b/sys/dev/rp/rpreg.h @@ -371,7 +371,7 @@ struct CONTROLLER_str struct tty *tty; /* tty */ /* Device nodes */ - dev_t *dev_nodes; + struct cdev **dev_nodes; /* Bus-specific properties */ void *bus_ctlp; diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index 083b85a818d5..58a705694d53 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -83,7 +83,7 @@ struct sabtty_softc { struct sab_softc *sc_parent; bus_space_tag_t sc_bt; bus_space_handle_t sc_bh; - dev_t sc_si; + struct cdev *sc_si; struct tty *sc_tty; int sc_channel; int sc_icnt; @@ -639,7 +639,7 @@ sabtty_softintr(struct sabtty_softc *sc) } static int -sabttyopen(dev_t dev, int flags, int mode, struct thread *td) +sabttyopen(struct cdev *dev, int flags, int mode, struct thread *td) { struct sabtty_softc *sc; struct tty *tp; @@ -717,7 +717,7 @@ sabttyopen(dev_t dev, int flags, int mode, struct thread *td) } static int -sabttyclose(dev_t dev, int flags, int mode, struct thread *td) +sabttyclose(struct cdev *dev, int flags, int mode, struct thread *td) { struct tty *tp; @@ -733,7 +733,7 @@ sabttyclose(dev_t dev, int flags, int mode, struct thread *td) } static int -sabttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +sabttyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct sabtty_softc *sc; struct tty *tp; diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 2a66a00189c7..93332e2a6893 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -178,7 +178,7 @@ scd_attach(struct scd_softc *sc) } static int -scdopen(dev_t dev, int flags, int fmt, struct thread *td) +scdopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct scd_softc *sc; int rc; @@ -225,7 +225,7 @@ scdopen(dev_t dev, int flags, int fmt, struct thread *td) } static int -scdclose(dev_t dev, int flags, int fmt, struct thread *td) +scdclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct scd_softc *sc; @@ -327,7 +327,7 @@ scd_start(struct scd_softc *sc) } static int -scdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +scdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct scd_softc *sc; diff --git a/sys/dev/scd/scdvar.h b/sys/dev/scd/scdvar.h index 9eb0199df19a..773a78be1fb6 100644 --- a/sys/dev/scd/scdvar.h +++ b/sys/dev/scd/scdvar.h @@ -34,7 +34,7 @@ struct scd_data { struct scd_softc { device_t dev; - dev_t scd_dev_t; + struct cdev *scd_dev_t; int debug; struct resource * port; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 2a3601f41061..97321088cd81 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -95,7 +95,7 @@ enum si_mctl { GET, SET, BIS, BIC }; static void si_command(struct si_port *, int, int); static int si_modem(struct si_port *, enum si_mctl, int); static void si_write_enable(struct si_port *, int); -static int si_Sioctl(dev_t, u_long, caddr_t, int, struct thread *); +static int si_Sioctl(struct cdev *, u_long, caddr_t, int, struct thread *); static void si_start(struct tty *); static void si_stop(struct tty *, int); static timeout_t si_lstart; @@ -589,7 +589,7 @@ try_next2: } static int -siopen(dev_t dev, int flag, int mode, struct thread *td) +siopen(struct cdev *dev, int flag, int mode, struct thread *td) { int oldspl, error; int card, port; @@ -758,7 +758,7 @@ out: } static int -siclose(dev_t dev, int flag, int mode, struct thread *td) +siclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct si_port *pp; struct tty *tp; @@ -868,7 +868,7 @@ sidtrwakeup(void *chan) } static int -siwrite(dev_t dev, struct uio *uio, int flag) +siwrite(struct cdev *dev, struct uio *uio, int flag) { struct si_port *pp; struct tty *tp; @@ -907,7 +907,7 @@ out: static int -siioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct si_port *pp; struct tty *tp; @@ -1073,7 +1073,7 @@ out: * Handle the Specialix ioctls. All MUST be called via the CONTROL device */ static int -si_Sioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +si_Sioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct si_softc *xsc; struct si_port *xpp; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 740cd26b5672..328142800454 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -271,7 +271,7 @@ struct com_s { struct resource *ioportres; int ioportrid; void *cookie; - dev_t devs[6]; + struct cdev *devs[6]; /* * Data area for output buffers. Someday we should build the output @@ -1180,7 +1180,7 @@ determined_type: ; static int sioopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -1363,7 +1363,7 @@ out: static int sioclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -1460,7 +1460,7 @@ comhardclose(com) static int sioread(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -1478,7 +1478,7 @@ sioread(dev, uio, flag) static int siowrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -1961,7 +1961,7 @@ txrdy: static int sioioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index c8edb9386056..4c1c5b199f91 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -46,7 +46,7 @@ struct smb_softc { int sc_count; /* >0 if device opened */ - dev_t sc_devnode; + struct cdev *sc_devnode; }; #define IIC_SOFTC(unit) \ @@ -137,7 +137,7 @@ smb_detach(device_t dev) } static int -smbopen (dev_t dev, int flags, int fmt, struct thread *td) +smbopen (struct cdev *dev, int flags, int fmt, struct thread *td) { struct smb_softc *sc = IIC_SOFTC(minor(dev)); @@ -153,7 +153,7 @@ smbopen (dev_t dev, int flags, int fmt, struct thread *td) } static int -smbclose(dev_t dev, int flags, int fmt, struct thread *td) +smbclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct smb_softc *sc = IIC_SOFTC(minor(dev)); @@ -170,7 +170,7 @@ smbclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -smbioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +smbioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { char buf[SMB_MAXBLOCKSIZE]; device_t parent; diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 7288a56744cd..752dc421eaf7 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -62,7 +62,7 @@ static struct linesw snpdisc = { struct snoop { LIST_ENTRY(snoop) snp_list; /* List glue. */ int snp_unit; /* Device number. */ - dev_t snp_target; /* Target tty device. */ + struct cdev *snp_target; /* Target tty device. */ struct tty *snp_tty; /* Target tty pointer. */ u_long snp_len; /* Possible length. */ u_long snp_base; /* Data base. */ @@ -106,9 +106,9 @@ static int snooplinedisc; static LIST_HEAD(, snoop) snp_sclist = LIST_HEAD_INITIALIZER(&snp_sclist); static struct clonedevs *snpclones; -static struct tty *snpdevtotty(dev_t dev); +static struct tty *snpdevtotty(struct cdev *dev); static void snp_clone(void *arg, char *name, - int namelen, dev_t *dev); + int namelen, struct cdev **dev); static int snp_detach(struct snoop *snp); static int snp_down(struct snoop *snp); static int snp_in(struct snoop *snp, char *buf, int n); @@ -175,7 +175,7 @@ snplwrite(tp, uio, flag) static struct tty * snpdevtotty(dev) - dev_t dev; + struct cdev *dev; { struct cdevsw *cdp; @@ -192,7 +192,7 @@ snpdevtotty(dev) static int snpwrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -231,7 +231,7 @@ tty_input: static int snpread(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -377,7 +377,7 @@ snp_in(snp, buf, n) static int snpopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag, mode; struct thread *td; { @@ -451,7 +451,7 @@ detach_notty: static int snpclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -486,7 +486,7 @@ snp_down(snp) static int snpioctl(dev, cmd, data, flags, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flags; @@ -494,7 +494,7 @@ snpioctl(dev, cmd, data, flags, td) { struct snoop *snp; struct tty *tp, *tpo; - dev_t tdev; + struct cdev *tdev; int s; snp = dev->si_drv1; @@ -577,7 +577,7 @@ snpioctl(dev, cmd, data, flags, td) static int snppoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { @@ -605,7 +605,7 @@ snp_clone(arg, name, namelen, dev) void *arg; char *name; int namelen; - dev_t *dev; + struct cdev **dev; { int u, i; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 3b910c731ee9..92009414c076 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -60,7 +60,7 @@ static eventhandler_tag dsp_ehtag; #endif static struct snddev_info * -dsp_get_info(dev_t dev) +dsp_get_info(struct cdev *dev) { struct snddev_info *d; int unit; @@ -74,7 +74,7 @@ dsp_get_info(dev_t dev) } static u_int32_t -dsp_get_flags(dev_t dev) +dsp_get_flags(struct cdev *dev) { device_t bdev; int unit; @@ -88,7 +88,7 @@ dsp_get_flags(dev_t dev) } static void -dsp_set_flags(dev_t dev, u_int32_t flags) +dsp_set_flags(struct cdev *dev, u_int32_t flags) { device_t bdev; int unit; @@ -108,7 +108,7 @@ dsp_set_flags(dev_t dev, u_int32_t flags) * lock channels specified. */ static int -getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) +getchns(struct cdev *dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) { struct snddev_info *d; u_int32_t flags; @@ -152,7 +152,7 @@ getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32 /* unlock specified channels */ static void -relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) +relchns(struct cdev *dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) { struct snddev_info *d; @@ -165,7 +165,7 @@ relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t } static int -dsp_open(dev_t i_dev, int flags, int mode, struct thread *td) +dsp_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct pcm_channel *rdch, *wrch; struct snddev_info *d; @@ -319,7 +319,7 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td) } static int -dsp_close(dev_t i_dev, int flags, int mode, struct thread *td) +dsp_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct pcm_channel *rdch, *wrch; struct snddev_info *d; @@ -388,7 +388,7 @@ dsp_close(dev_t i_dev, int flags, int mode, struct thread *td) } static int -dsp_read(dev_t i_dev, struct uio *buf, int flag) +dsp_read(struct cdev *i_dev, struct uio *buf, int flag) { struct pcm_channel *rdch, *wrch; intrmask_t s; @@ -415,7 +415,7 @@ dsp_read(dev_t i_dev, struct uio *buf, int flag) } static int -dsp_write(dev_t i_dev, struct uio *buf, int flag) +dsp_write(struct cdev *i_dev, struct uio *buf, int flag) { struct pcm_channel *rdch, *wrch; intrmask_t s; @@ -442,7 +442,7 @@ dsp_write(dev_t i_dev, struct uio *buf, int flag) } static int -dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) +dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { struct pcm_channel *chn, *rdch, *wrch; struct snddev_info *d; @@ -567,7 +567,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { snd_capabilities *p = (snd_capabilities *)arg; struct pcmchan_caps *pcaps = NULL, *rcaps = NULL; - dev_t pdev; + struct cdev *pdev; if (rdch) { CHN_LOCK(rdch); @@ -1026,7 +1026,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) } static int -dsp_poll(dev_t i_dev, int events, struct thread *td) +dsp_poll(struct cdev *i_dev, int events, struct thread *td) { struct pcm_channel *wrch = NULL, *rdch = NULL; intrmask_t s; @@ -1053,7 +1053,7 @@ dsp_poll(dev_t i_dev, int events, struct thread *td) } static int -dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +dsp_mmap(struct cdev *i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct pcm_channel *wrch = NULL, *rdch = NULL, *c; intrmask_t s; @@ -1114,9 +1114,9 @@ dsp_mmap(dev_t i_dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) * if xN.i isn't busy, return its dev_t */ static void -dsp_clone(void *arg, char *name, int namelen, dev_t *dev) +dsp_clone(void *arg, char *name, int namelen, struct cdev **dev) { - dev_t pdev; + struct cdev *pdev; struct snddev_info *pcm_dev; struct snddev_channel *pcm_chan; int i, unit, devtype; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index b5a67edfc61f..47812fe5a046 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -86,7 +86,7 @@ static struct cdevsw mixer_cdevsw = { static eventhandler_tag mixer_ehtag; #endif -static dev_t +static struct cdev * mixer_get_devt(device_t dev) { struct snddev_info *snddev; @@ -190,7 +190,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) struct snddev_info *snddev; struct snd_mixer *m; u_int16_t v; - dev_t pdev; + struct cdev *pdev; int i, unit; m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO); @@ -231,7 +231,7 @@ mixer_uninit(device_t dev) { int i; struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -262,7 +262,7 @@ int mixer_reinit(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; int i; pdev = mixer_get_devt(dev); @@ -318,7 +318,7 @@ int mixer_hwvol_init(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -339,7 +339,7 @@ void mixer_hwvol_mute(device_t dev) { struct snd_mixer *m; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -360,7 +360,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) { struct snd_mixer *m; int level, left, right; - dev_t pdev; + struct cdev *pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -387,7 +387,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) /* ----------------------------------------------------------------------- */ static int -mixer_open(dev_t i_dev, int flags, int mode, struct thread *td) +mixer_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -404,7 +404,7 @@ mixer_open(dev_t i_dev, int flags, int mode, struct thread *td) } static int -mixer_close(dev_t i_dev, int flags, int mode, struct thread *td) +mixer_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -426,7 +426,7 @@ mixer_close(dev_t i_dev, int flags, int mode, struct thread *td) } int -mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) +mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) { struct snd_mixer *m; intrmask_t s; @@ -479,7 +479,7 @@ mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) #ifdef USING_DEVFS static void -mixer_clone(void *arg, char *name, int namelen, dev_t *dev) +mixer_clone(void *arg, char *name, int namelen, struct cdev **dev) { struct snddev_info *sd; diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index ff4c22c37a65..22bd22aa6c3f 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -29,7 +29,7 @@ int mixer_init(device_t dev, kobj_class_t cls, void *devinfo); int mixer_uninit(device_t dev); int mixer_reinit(device_t dev); -int mixer_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); +int mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td); int mixer_hwvol_init(device_t dev); void mixer_hwvol_mute(device_t dev); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index e96a8025fde5..0b391a72e354 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -62,7 +62,7 @@ struct sndstat_entry { static struct mtx sndstat_lock; #endif static struct sbuf sndstat_sbuf; -static dev_t sndstat_dev = 0; +static struct cdev *sndstat_dev = 0; static int sndstat_isopen = 0; static int sndstat_bufptr; static int sndstat_maxunit = -1; @@ -103,7 +103,7 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_sndverbose, "I", ""); static int -sndstat_open(dev_t i_dev, int flags, int mode, struct thread *td) +sndstat_open(struct cdev *i_dev, int flags, int mode, struct thread *td) { intrmask_t s; int error; @@ -136,7 +136,7 @@ out: } static int -sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td) +sndstat_close(struct cdev *i_dev, int flags, int mode, struct thread *td) { intrmask_t s; @@ -156,7 +156,7 @@ sndstat_close(dev_t i_dev, int flags, int mode, struct thread *td) } static int -sndstat_read(dev_t i_dev, struct uio *buf, int flag) +sndstat_read(struct cdev *i_dev, struct uio *buf, int flag) { intrmask_t s; int l, err; diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 7acdfc89fc44..5eae8e3406e6 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -278,10 +278,10 @@ struct snddev_channel { SLIST_ENTRY(snddev_channel) link; struct pcm_channel *channel; int chan_num; - dev_t dsp_devt; - dev_t dspW_devt; - dev_t audio_devt; - dev_t dspr_devt; + struct cdev *dsp_devt; + struct cdev *dspW_devt; + struct cdev *audio_devt; + struct cdev *dspr_devt; }; struct snddev_info { @@ -297,7 +297,7 @@ struct snddev_info { struct sysctl_ctx_list sysctl_tree; struct sysctl_oid *sysctl_tree_top; struct mtx *lock; - dev_t mixer_dev; + struct cdev *mixer_dev; }; diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index e73ab8d73324..2dc74e37682b 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -472,7 +472,7 @@ static char *spkr_inbuf; /* incoming buf */ static int spkropen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -499,7 +499,7 @@ spkropen(dev, flags, fmt, td) static int spkrwrite(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -531,7 +531,7 @@ spkrwrite(dev, uio, ioflag) static int spkrclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -554,7 +554,7 @@ spkrclose(dev, flags, fmt, td) static int spkrioctl(dev, cmd, cmdarg, flags, td) - dev_t dev; + struct cdev *dev; unsigned long cmd; caddr_t cmdarg; int flags; @@ -610,7 +610,7 @@ static struct isa_pnp_id speaker_ids[] = { { 0 } }; -static dev_t speaker_dev; +static struct cdev *speaker_dev; static int speaker_probe(device_t dev) diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index b67e39b83862..8ef790d3ddc3 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -88,8 +88,8 @@ enum { dev_unix_ord_stream = 40 }; -static dev_t dt_ptm, dt_arp, dt_icmp, dt_ip, dt_tcp, dt_udp, dt_rawip, - dt_unix_dgram, dt_unix_stream, dt_unix_ord_stream; +static struct cdev *dt_ptm, *dt_arp, *dt_icmp, *dt_ip, *dt_tcp, *dt_udp, *dt_rawip, + *dt_unix_dgram, *dt_unix_stream, *dt_unix_ord_stream; static struct fileops svr4_netops = { .fo_read = soo_read, @@ -186,7 +186,7 @@ MODULE_VERSION(streams, 1); * routine. */ static int -streamsopen(dev_t dev, int oflags, int devtype, struct thread *td) +streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td) { int type, protocol; int fd, extraref; diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 5588ab75d41e..0e0687e63f8a 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -332,7 +332,7 @@ sxattach( */ static int sxopen( - dev_t dev, + struct cdev *dev, int flag, int mode, d_thread_t *p) @@ -501,7 +501,7 @@ out: */ static int sxclose( - dev_t dev, + struct cdev *dev, int flag, int mode, d_thread_t *p) @@ -641,7 +641,7 @@ sxdtrwakeup(void *chan) */ static int sxwrite( - dev_t dev, + struct cdev *dev, struct uio *uio, int flag) { @@ -690,7 +690,7 @@ out: splx(oldspl); */ static int sxioctl( - dev_t dev, + struct cdev *dev, u_long cmd, caddr_t data, int flag, diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c index f2ba28357f4e..dbc0dfc3fe88 100644 --- a/sys/dev/syscons/scvesactl.c +++ b/sys/dev/syscons/scvesactl.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); static d_ioctl_t *prev_user_ioctl; static int -vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +vesa_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { scr_stat *scp; struct tty *tp; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 0608ce5df25d..12f0739300ee 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -100,7 +100,7 @@ static struct tty *sc_console_tty; static struct consdev *sc_consptr; static void *kernel_console_ts; static scr_stat main_console; -static dev_t main_devs[MAXCONS]; +static struct cdev *main_devs[MAXCONS]; static char init_done = COLD; static char shutdown_in_progress = FALSE; @@ -148,12 +148,12 @@ static int debugger; static int scvidprobe(int unit, int flags, int cons); static int sckbdprobe(int unit, int flags, int cons); static void scmeminit(void *arg); -static int scdevtounit(dev_t dev); +static int scdevtounit(struct cdev *dev); static kbd_callback_func_t sckbdevent; static int scparam(struct tty *tp, struct termios *t); static void scstart(struct tty *tp); static void scinit(int unit, int flags); -static scr_stat *sc_get_stat(dev_t devptr); +static scr_stat *sc_get_stat(struct cdev *devptr); #if !__alpha__ static void scterm(int unit, int flags); #endif @@ -303,7 +303,7 @@ sc_attach_unit(int unit, int flags) video_info_t info; #endif int vc; - dev_t dev; + struct cdev *dev; flags &= ~SC_KERNEL_CONSOLE; @@ -442,7 +442,7 @@ scmeminit(void *arg) SYSINIT(sc_mem, SI_SUB_KMEM, SI_ORDER_ANY, scmeminit, NULL); static int -scdevtounit(dev_t dev) +scdevtounit(struct cdev *dev) { int vty = SC_VTY(dev); @@ -455,7 +455,7 @@ scdevtounit(dev_t dev) } static int -scopen(dev_t dev, int flag, int mode, struct thread *td) +scopen(struct cdev *dev, int flag, int mode, struct thread *td) { int unit = scdevtounit(dev); sc_softc_t *sc; @@ -518,7 +518,7 @@ scopen(dev_t dev, int flag, int mode, struct thread *td) } static int -scclose(dev_t dev, int flag, int mode, struct thread *td) +scclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp = dev->si_tty; scr_stat *scp; @@ -568,7 +568,7 @@ scclose(dev_t dev, int flag, int mode, struct thread *td) } static int -scread(dev_t dev, struct uio *uio, int flag) +scread(struct cdev *dev, struct uio *uio, int flag) { if (!sc_saver_keyb_only) sc_touch_scrn_saver(); @@ -654,7 +654,7 @@ scparam(struct tty *tp, struct termios *t) } static int -scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int error; int i; @@ -2596,7 +2596,7 @@ void sc_change_cursor_shape(scr_stat *scp, int flags, int base, int height) { sc_softc_t *sc; - dev_t dev; + struct cdev *dev; int s; int i; @@ -2741,7 +2741,7 @@ scinit(int unit, int flags) kernel_default.rev_color); } else { /* assert(sc_malloc) */ - sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO); + sc->dev = malloc(sizeof(struct cdev *)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO); sc->dev[0] = make_dev(&sc_cdevsw, unit * MAXCONS, UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit * MAXCONS); sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty); @@ -3406,7 +3406,7 @@ next_code: } static int -scmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +scmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { scr_stat *scp; @@ -3630,7 +3630,7 @@ blink_screen(void *arg) */ static scr_stat * -sc_get_stat(dev_t devptr) +sc_get_stat(struct cdev *devptr) { if (devptr == NULL) return (&main_console); diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 217e50c9794c..1651ad8e1c76 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -208,7 +208,7 @@ typedef struct sc_softc { int first_vty; int vtys; - dev_t *dev; + struct cdev **dev; struct scr_stat *cur_scp; struct scr_stat *new_scp; struct scr_stat *old_scp; @@ -518,7 +518,7 @@ typedef struct { (*kbdsw[(kbd)->kb_index]->poll)((kbd), (on)) /* syscons.c */ -extern int (*sc_user_ioctl)(dev_t dev, u_long cmd, caddr_t data, +extern int (*sc_user_ioctl)(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td); int sc_probe_unit(int unit, int flags); diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index ab1cd850e41f..db2487d11f65 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -66,7 +66,7 @@ static void smstart(struct tty *tp); static int smparam(struct tty *tp, struct termios *t); static int -smopen(dev_t dev, int flag, int mode, struct thread *td) +smopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp; @@ -101,7 +101,7 @@ smopen(dev_t dev, int flag, int mode, struct thread *td) } static int -smclose(dev_t dev, int flag, int mode, struct thread *td) +smclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp; int s; @@ -145,7 +145,7 @@ smparam(struct tty *tp, struct termios *t) } static int -smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +smioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct tty *tp; mousehw_t *hw; @@ -238,7 +238,7 @@ smioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) static void sm_attach_mouse(void *unused) { - dev_t dev; + struct cdev *dev; dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600, "sysmouse"); diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 1ba4ed7394cc..351411aee2d6 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -402,7 +402,7 @@ tdfx_setmtrr(device_t dev) { } static int -tdfx_open(dev_t dev, int flags, int fmt, struct thread *td) +tdfx_open(struct cdev *dev, int flags, int fmt, struct thread *td) { /* * The open cdev method handles open(2) calls to /dev/3dfx[n] @@ -420,7 +420,7 @@ tdfx_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -tdfx_close(dev_t dev, int fflag, int devtype, struct thread *td) +tdfx_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { /* * The close cdev method handles close(2) calls to /dev/3dfx[n] @@ -437,7 +437,7 @@ tdfx_close(dev_t dev, int fflag, int devtype, struct thread *td) } static int -tdfx_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +tdfx_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { /* * mmap(2) is called by a user process to request that an area of memory @@ -793,7 +793,7 @@ tdfx_do_pio(u_int cmd, struct tdfx_pio_data *piod) * can return -retval and the error should be properly handled. */ static int -tdfx_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +tdfx_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int retval = 0; struct tdfx_pio_data *piod = (struct tdfx_pio_data*)data; diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h index 67ce1319cee8..95a9bbf9c165 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -92,7 +92,7 @@ struct tdfx_softc { unsigned char dv; struct file *curFile; device_t dev; - dev_t devt; + struct cdev *devt; struct mem_range_desc mrdesc; int busy; }; diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index ad5366e8aebc..b80191657260 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -3121,7 +3121,7 @@ ti_ioctl(ifp, command, data) } static int -ti_open(dev_t dev, int flags, int fmt, struct thread *td) +ti_open(struct cdev *dev, int flags, int fmt, struct thread *td) { struct ti_softc *sc; @@ -3137,7 +3137,7 @@ ti_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -ti_close(dev_t dev, int flag, int fmt, struct thread *td) +ti_close(struct cdev *dev, int flag, int fmt, struct thread *td) { struct ti_softc *sc; @@ -3156,7 +3156,7 @@ ti_close(dev_t dev, int flag, int fmt, struct thread *td) * This ioctl routine goes along with the Tigon character device. */ static int -ti_ioctl2(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ti_ioctl2(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { int error; struct ti_softc *sc; diff --git a/sys/dev/ti/if_tireg.h b/sys/dev/ti/if_tireg.h index 71d9661a5eb0..35525149996f 100644 --- a/sys/dev/ti/if_tireg.h +++ b/sys/dev/ti/if_tireg.h @@ -1025,7 +1025,7 @@ struct ti_softc { int ti_txcnt; struct mtx ti_mtx; ti_flag_vals ti_flags; - dev_t dev; + struct cdev *dev; }; #define TI_LOCK(_sc) mtx_lock(&(_sc)->ti_mtx) diff --git a/sys/dev/twa/twa.h b/sys/dev/twa/twa.h index 5f49b496c0c5..812f326d991b 100644 --- a/sys/dev/twa/twa.h +++ b/sys/dev/twa/twa.h @@ -174,7 +174,7 @@ struct twa_softc { between ioctl calls */ device_t twa_bus_dev; /* bus device */ - dev_t twa_ctrl_dev; /* control device */ + struct cdev *twa_ctrl_dev; /* control device */ struct resource *twa_io_res; /* register interface window */ bus_space_handle_t twa_bus_handle; /* bus space handle */ bus_space_tag_t twa_bus_tag; /* bus space tag */ diff --git a/sys/dev/twa/twa_freebsd.c b/sys/dev/twa/twa_freebsd.c index 9879448f9441..09642c11454b 100644 --- a/sys/dev/twa/twa_freebsd.c +++ b/sys/dev/twa/twa_freebsd.c @@ -75,7 +75,7 @@ static devclass_t twa_devclass; * non-zero-- failure */ static int -twa_open(dev_t dev, int flags, int fmt, d_thread_t *proc) +twa_open(struct cdev *dev, int flags, int fmt, d_thread_t *proc) { int unit = minor(dev); struct twa_softc *sc = devclass_get_softc(twa_devclass, unit); @@ -100,7 +100,7 @@ twa_open(dev_t dev, int flags, int fmt, d_thread_t *proc) * non-zero-- failure */ static int -twa_close(dev_t dev, int flags, int fmt, d_thread_t *proc) +twa_close(struct cdev *dev, int flags, int fmt, d_thread_t *proc) { int unit = minor(dev); struct twa_softc *sc = devclass_get_softc(twa_devclass, unit); @@ -128,7 +128,7 @@ twa_close(dev_t dev, int flags, int fmt, d_thread_t *proc) * non-zero-- failure */ static int -twa_ioctl_wrapper(dev_t dev, u_long cmd, caddr_t buf, +twa_ioctl_wrapper(struct cdev *dev, u_long cmd, caddr_t buf, int flags, d_thread_t *proc) { struct twa_softc *sc = (struct twa_softc *)(dev->si_drv1); @@ -367,7 +367,7 @@ twa_free(struct twa_softc *sc) TWA_IO_CONFIG_REG, sc->twa_io_res); /* Destroy the control device. */ - if (sc->twa_ctrl_dev != (dev_t)NULL) + if (sc->twa_ctrl_dev != (struct cdev *)NULL) destroy_dev(sc->twa_ctrl_dev); sysctl_ctx_free(&sc->twa_sysctl_ctx); diff --git a/sys/dev/twe/twe_compat.h b/sys/dev/twe/twe_compat.h index 5cdad8384c3a..372910041131 100644 --- a/sys/dev/twe/twe_compat.h +++ b/sys/dev/twe/twe_compat.h @@ -78,7 +78,7 @@ bus_dmamap_t twe_cmdmap; /* DMA map for command */ \ u_int32_t twe_cmdphys; /* address of command in controller space */ \ device_t twe_dev; /* bus device */ \ - dev_t twe_dev_t; /* control device */ \ + struct cdev *twe_dev_t; /* control device */ \ struct resource *twe_io; /* register interface window */ \ bus_space_handle_t twe_bhandle; /* bus space handle */ \ bus_space_tag_t twe_btag; /* bus space tag */ \ diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 2415ca53fc00..a29b3ddb76a3 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -79,7 +79,7 @@ static struct cdevsw twe_cdevsw = { * Accept an open operation on the control device. */ static int -twe_open(dev_t dev, int flags, int fmt, d_thread_t *td) +twe_open(struct cdev *dev, int flags, int fmt, d_thread_t *td) { int unit = minor(dev); struct twe_softc *sc = devclass_get_softc(twe_devclass, unit); @@ -92,7 +92,7 @@ twe_open(dev_t dev, int flags, int fmt, d_thread_t *td) * Accept the last close on the control device. */ static int -twe_close(dev_t dev, int flags, int fmt, d_thread_t *td) +twe_close(struct cdev *dev, int flags, int fmt, d_thread_t *td) { int unit = minor(dev); struct twe_softc *sc = devclass_get_softc(twe_devclass, unit); @@ -105,7 +105,7 @@ twe_close(dev_t dev, int flags, int fmt, d_thread_t *td) * Handle controller-specific control operations. */ static int -twe_ioctl_wrapper(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td) +twe_ioctl_wrapper(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td) { struct twe_softc *sc = (struct twe_softc *)dev->si_drv1; @@ -423,7 +423,7 @@ twe_free(struct twe_softc *sc) bus_release_resource(sc->twe_dev, SYS_RES_IOPORT, TWE_IO_CONFIG_REG, sc->twe_io); /* destroy control device */ - if (sc->twe_dev_t != (dev_t)NULL) + if (sc->twe_dev_t != (struct cdev *)NULL) destroy_dev(sc->twe_dev_t); sysctl_ctx_free(&sc->sysctl_ctx); diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h index 3c45199d980d..1ea7779946f2 100644 --- a/sys/dev/uart/uart_bus.h +++ b/sys/dev/uart/uart_bus.h @@ -158,7 +158,7 @@ struct uart_softc { union { /* TTY specific data. */ struct { - dev_t si[2]; /* We have 2 device special files. */ + struct cdev *si[2]; /* We have 2 device special files. */ struct tty *tp; } u_tty; /* Keyboard specific data. */ diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index f42a7dc16f59..ec1069666641 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -361,7 +361,7 @@ int uart_tty_detach(struct uart_softc *sc) } static int -uart_tty_open(dev_t dev, int flags, int mode, struct thread *td) +uart_tty_open(struct cdev *dev, int flags, int mode, struct thread *td) { struct uart_softc *sc; struct tty *tp; @@ -450,7 +450,7 @@ uart_tty_open(dev_t dev, int flags, int mode, struct thread *td) } static int -uart_tty_close(dev_t dev, int flags, int mode, struct thread *td) +uart_tty_close(struct cdev *dev, int flags, int mode, struct thread *td) { struct uart_softc *sc; struct tty *tp; @@ -485,7 +485,7 @@ uart_tty_close(dev_t dev, int flags, int mode, struct thread *td) } static int -uart_tty_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +uart_tty_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct uart_softc *sc; diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 62d20b1fb553..d6404944969a 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -158,7 +158,7 @@ struct ubser_softc { u_int sc_opkthdrlen; /* header length of output packet */ - dev_t dev[8]; + struct cdev *dev[8]; }; Static d_open_t ubser_open; @@ -853,7 +853,7 @@ ubser_cleanup(struct ubser_softc *sc) } static int -ubser_open(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubser_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct ubser_softc *sc; struct tty *tp; @@ -929,7 +929,7 @@ bad: } static int -ubser_close(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubser_close(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct ubser_softc *sc; struct tty *tp; @@ -952,7 +952,7 @@ quit: } static int -ubser_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +ubser_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { usb_device_request_t req; struct ubser_softc *sc; @@ -997,7 +997,7 @@ ubser_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) } static int -ubser_read(dev_t dev, struct uio *uio, int flag) +ubser_read(struct cdev *dev, struct uio *uio, int flag) { struct ubser_softc *sc; struct tty *tp; @@ -1019,7 +1019,7 @@ ubser_read(dev_t dev, struct uio *uio, int flag) } static int -ubser_write(dev_t dev, struct uio *uio, int flag) +ubser_write(struct cdev *dev, struct uio *uio, int flag) { struct ubser_softc *sc; struct tty *tp; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 82ab31b47805..82245b790899 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -249,7 +249,7 @@ ucom_shutdown(struct ucom_softc *sc) } Static int -ucomopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +ucomopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { int unit = UCOMUNIT(dev); struct ucom_softc *sc; @@ -443,7 +443,7 @@ bad: } static int -ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +ucomclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct ucom_softc *sc; struct tty *tp; @@ -488,7 +488,7 @@ ucomclose(dev_t dev, int flag, int mode, usb_proc_ptr p) } static int -ucomread(dev_t dev, struct uio *uio, int flag) +ucomread(struct cdev *dev, struct uio *uio, int flag) { struct ucom_softc *sc; struct tty *tp; @@ -510,7 +510,7 @@ ucomread(dev_t dev, struct uio *uio, int flag) } static int -ucomwrite(dev_t dev, struct uio *uio, int flag) +ucomwrite(struct cdev *dev, struct uio *uio, int flag) { struct ucom_softc *sc; struct tty *tp; @@ -532,7 +532,7 @@ ucomwrite(dev_t dev, struct uio *uio, int flag) } static int -ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +ucomioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { struct ucom_softc *sc; struct tty *tp; diff --git a/sys/dev/usb/ucomvar.h b/sys/dev/usb/ucomvar.h index ba008560c60c..63146b9721ee 100644 --- a/sys/dev/usb/ucomvar.h +++ b/sys/dev/usb/ucomvar.h @@ -173,7 +173,7 @@ struct ucom_softc { int sc_refcnt; u_char sc_dying; /* disconnecting */ - dev_t dev; /* special device node */ + struct cdev *dev; /* special device node */ }; extern devclass_t ucom_devclass; diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c index db008ea91eb4..f8d640b3b93b 100644 --- a/sys/dev/usb/ufm.c +++ b/sys/dev/usb/ufm.c @@ -204,7 +204,7 @@ USB_ATTACH(ufm) sc->sc_epaddr = edesc->bEndpointAddress; #if defined(__FreeBSD__) - /* XXX no error trapping, no storing of dev_t */ + /* XXX no error trapping, no storing of struct cdev **/ (void) make_dev(&ufm_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR, 0644, "ufm%d", device_get_unit(self)); @@ -224,7 +224,7 @@ USB_ATTACH(ufm) int -ufmopen(dev_t dev, int flag, int mode, usb_proc_ptr td) +ufmopen(struct cdev *dev, int flag, int mode, usb_proc_ptr td) { struct ufm_softc *sc; @@ -245,7 +245,7 @@ ufmopen(dev_t dev, int flag, int mode, usb_proc_ptr td) } int -ufmclose(dev_t dev, int flag, int mode, usb_proc_ptr td) +ufmclose(struct cdev *dev, int flag, int mode, usb_proc_ptr td) { struct ufm_softc *sc; @@ -368,7 +368,7 @@ ufm_get_stat(struct ufm_softc *sc, caddr_t addr) } int -ufmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr td) +ufmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr td) { struct ufm_softc *sc; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index a9074235254b..81ae5f2fd8d4 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -100,7 +100,7 @@ SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW, struct ugen_endpoint { struct ugen_softc *sc; #if defined(__FreeBSD__) - dev_t dev; + struct cdev *dev; #endif usb_endpoint_descriptor_t *edesc; usbd_interface_handle iface; @@ -127,7 +127,7 @@ struct ugen_softc { USBBASEDEVICE sc_dev; /* base device */ usbd_device_handle sc_udev; #if defined(__FreeBSD__) - dev_t dev; + struct cdev *dev; #endif char sc_is_open[USB_MAX_ENDPOINTS]; @@ -253,7 +253,7 @@ Static void ugen_make_devnodes(struct ugen_softc *sc) { int endptno; - dev_t dev; + struct cdev *dev; for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { if (sc->sc_endpoints[endptno][IN].sc != NULL || @@ -283,7 +283,7 @@ Static void ugen_destroy_devnodes(struct ugen_softc *sc) { int endptno; - dev_t dev; + struct cdev *dev; /* destroy all devices for the other (existing) endpoints as well */ for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { @@ -379,7 +379,7 @@ ugen_set_config(struct ugen_softc *sc, int configno) } int -ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +ugenopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct ugen_softc *sc; int unit = UGENUNIT(dev); @@ -519,7 +519,7 @@ ugenopen(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -ugenclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +ugenclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -725,7 +725,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) } int -ugenread(dev_t dev, struct uio *uio, int flag) +ugenread(struct cdev *dev, struct uio *uio, int flag) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -825,7 +825,7 @@ ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) } int -ugenwrite(dev_t dev, struct uio *uio, int flag) +ugenwrite(struct cdev *dev, struct uio *uio, int flag) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -1390,7 +1390,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, } int -ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) +ugenioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; @@ -1406,7 +1406,7 @@ ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) } int -ugenpoll(dev_t dev, int events, usb_proc_ptr p) +ugenpoll(struct cdev *dev, int events, usb_proc_ptr p) { struct ugen_softc *sc; struct ugen_endpoint *sce; diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 461d35cbb29b..f19424bc5337 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -136,7 +136,7 @@ struct uhid_softc { u_char sc_dying; #if defined(__FreeBSD__) - dev_t dev; + struct cdev *dev; #endif }; @@ -393,7 +393,7 @@ uhid_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) } int -uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +uhidopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct uhid_softc *sc; usbd_status err; @@ -440,7 +440,7 @@ uhidopen(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -uhidclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +uhidclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct uhid_softc *sc; @@ -530,7 +530,7 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag) } int -uhidread(dev_t dev, struct uio *uio, int flag) +uhidread(struct cdev *dev, struct uio *uio, int flag) { struct uhid_softc *sc; int error; @@ -576,7 +576,7 @@ uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag) } int -uhidwrite(dev_t dev, struct uio *uio, int flag) +uhidwrite(struct cdev *dev, struct uio *uio, int flag) { struct uhid_softc *sc; int error; @@ -710,7 +710,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag, } int -uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) +uhidioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) { struct uhid_softc *sc; int error; @@ -725,7 +725,7 @@ uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) } int -uhidpoll(dev_t dev, int events, usb_proc_ptr p) +uhidpoll(struct cdev *dev, int events, usb_proc_ptr p) { struct uhid_softc *sc; int revents = 0; diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 48aeb0956edc..e8f38d8b5b79 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -122,8 +122,8 @@ struct ulpt_softc { u_char sc_dying; #if defined(__FreeBSD__) - dev_t dev; - dev_t dev_noprime; + struct cdev *dev; + struct cdev *dev_noprime; #endif }; @@ -490,7 +490,7 @@ int ulptusein = 1; * Reset the printer, then wait until it's selected and not busy. */ int -ulptopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +ulptopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { u_char flags = ULPTFLAGS(dev); struct ulpt_softc *sc; @@ -625,7 +625,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc) } int -ulptclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +ulptclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct ulpt_softc *sc; @@ -697,7 +697,7 @@ ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags) } int -ulptwrite(dev_t dev, struct uio *uio, int flags) +ulptwrite(struct cdev *dev, struct uio *uio, int flags) { struct ulpt_softc *sc; int error; @@ -715,7 +715,7 @@ ulptwrite(dev_t dev, struct uio *uio, int flags) } int -ulptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +ulptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { int error = 0; diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 1bb82ea000ba..708f3013066b 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -130,7 +130,7 @@ struct ums_softc { # define UMS_SELECT 0x02 /* select is waiting */ struct selinfo rsel; /* process waiting in select */ - dev_t dev; /* specfs */ + struct cdev *dev; /* specfs */ }; #define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) @@ -589,7 +589,7 @@ ums_disable(priv) } Static int -ums_open(dev_t dev, int flag, int fmt, usb_proc_ptr p) +ums_open(struct cdev *dev, int flag, int fmt, usb_proc_ptr p) { struct ums_softc *sc; @@ -599,7 +599,7 @@ ums_open(dev_t dev, int flag, int fmt, usb_proc_ptr p) } Static int -ums_close(dev_t dev, int flag, int fmt, usb_proc_ptr p) +ums_close(struct cdev *dev, int flag, int fmt, usb_proc_ptr p) { struct ums_softc *sc; @@ -615,7 +615,7 @@ ums_close(dev_t dev, int flag, int fmt, usb_proc_ptr p) } Static int -ums_read(dev_t dev, struct uio *uio, int flag) +ums_read(struct cdev *dev, struct uio *uio, int flag) { struct ums_softc *sc; int s; @@ -685,7 +685,7 @@ ums_read(dev_t dev, struct uio *uio, int flag) } Static int -ums_poll(dev_t dev, int events, usb_proc_ptr p) +ums_poll(struct cdev *dev, int events, usb_proc_ptr p) { struct ums_softc *sc; int revents = 0; @@ -711,7 +711,7 @@ ums_poll(dev_t dev, int events, usb_proc_ptr p) } int -ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) +ums_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) { struct ums_softc *sc; int error = 0; diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index eaec4e5b1007..8685f0daea33 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -148,7 +148,7 @@ struct urio_softc { int sc_refcnt; #if defined(__FreeBSD__) - dev_t sc_dev_t; + struct cdev *sc_dev_t; #endif /* defined(__FreeBSD__) */ #if defined(__NetBSD__) || defined(__OpenBSD__) u_char sc_dying; @@ -262,7 +262,7 @@ USB_ATTACH(urio) } #if defined(__FreeBSD__) - /* XXX no error trapping, no storing of dev_t */ + /* XXX no error trapping, no storing of struct cdev **/ sc->sc_dev_t = make_dev(&urio_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR, 0644, "urio%d", device_get_unit(self)); @@ -282,7 +282,7 @@ USB_ATTACH(urio) int -urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +urioopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { #if (USBDI >= 1) struct urio_softc * sc; @@ -322,7 +322,7 @@ urioopen(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -urioclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +urioclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { #if (USBDI >= 1) struct urio_softc * sc; @@ -345,7 +345,7 @@ urioclose(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -urioread(dev_t dev, struct uio *uio, int flag) +urioread(struct cdev *dev, struct uio *uio, int flag) { #if (USBDI >= 1) struct urio_softc * sc; @@ -419,7 +419,7 @@ urioread(dev_t dev, struct uio *uio, int flag) } int -uriowrite(dev_t dev, struct uio *uio, int flag) +uriowrite(struct cdev *dev, struct uio *uio, int flag) { #if (USBDI >= 1) struct urio_softc * sc; @@ -486,7 +486,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag) int -urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) +urioioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, usb_proc_ptr p) { #if (USBDI >= 1) struct urio_softc * sc; diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index d2ce30ff3079..d934491eb1f8 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -470,7 +470,7 @@ usbctlprint(void *aux, const char *pnp) #endif /* defined(__NetBSD__) || defined(__OpenBSD__) */ int -usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p) +usbopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { int unit = USBUNIT(dev); struct usb_softc *sc; @@ -492,7 +492,7 @@ usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -usbread(dev_t dev, struct uio *uio, int flag) +usbread(struct cdev *dev, struct uio *uio, int flag) { struct usb_event ue; int unit = USBUNIT(dev); @@ -526,7 +526,7 @@ usbread(dev_t dev, struct uio *uio, int flag) } int -usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +usbclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { int unit = USBUNIT(dev); @@ -539,7 +539,7 @@ usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +usbioctl(struct cdev *devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { struct usb_softc *sc; int unit = USBUNIT(devt); @@ -659,7 +659,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) } int -usbpoll(dev_t dev, int events, usb_proc_ptr p) +usbpoll(struct cdev *dev, int events, usb_proc_ptr p) { int revents, mask, s; int unit = USBUNIT(dev); diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index f1a37002c176..e085c69a62ea 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -232,7 +232,7 @@ struct uscanner_softc { usbd_device_handle sc_udev; usbd_interface_handle sc_iface; #if defined(__FreeBSD__) - dev_t dev; + struct cdev *dev; #endif u_int sc_dev_flags; @@ -380,7 +380,7 @@ USB_ATTACH(uscanner) } int -uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p) +uscanneropen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct uscanner_softc *sc; int unit = USCANNERUNIT(dev); @@ -443,7 +443,7 @@ uscanneropen(dev_t dev, int flag, int mode, usb_proc_ptr p) } int -uscannerclose(dev_t dev, int flag, int mode, usb_proc_ptr p) +uscannerclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { struct uscanner_softc *sc; @@ -541,7 +541,7 @@ uscanner_do_read(struct uscanner_softc *sc, struct uio *uio, int flag) } int -uscannerread(dev_t dev, struct uio *uio, int flag) +uscannerread(struct cdev *dev, struct uio *uio, int flag) { struct uscanner_softc *sc; int error; @@ -591,7 +591,7 @@ uscanner_do_write(struct uscanner_softc *sc, struct uio *uio, int flag) } int -uscannerwrite(dev_t dev, struct uio *uio, int flag) +uscannerwrite(struct cdev *dev, struct uio *uio, int flag) { struct uscanner_softc *sc; int error; @@ -674,7 +674,7 @@ USB_DETACH(uscanner) } int -uscannerpoll(dev_t dev, int events, usb_proc_ptr p) +uscannerpoll(struct cdev *dev, int events, usb_proc_ptr p) { struct uscanner_softc *sc; int revents = 0; diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 8e1bf36c484a..3306c96ed222 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -69,12 +69,12 @@ struct cdevsw vinum_cdevsw = { /* Called by main() during pseudo-device attachment. */ void vinumattach(void *); STATIC int vinum_modevent(module_t mod, modeventtype_t type, void *unused); -STATIC void vinum_clone(void *arg, char *name, int namelen, dev_t * dev); +STATIC void vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev); struct _vinum_conf vinum_conf; /* configuration information */ -dev_t vinum_daemon_dev; -dev_t vinum_super_dev; +struct cdev *vinum_daemon_dev; +struct cdev *vinum_super_dev; static eventhandler_tag dev_clone_tag; @@ -334,7 +334,7 @@ DECLARE_MODULE(vinum, vinum_mod, SI_SUB_RAID, SI_ORDER_MIDDLE); /* ARGSUSED */ /* Open a vinum object */ int -vinumopen(dev_t dev, +vinumopen(struct cdev *dev, int flags, int fmt, struct thread *td) @@ -437,7 +437,7 @@ vinumopen(dev_t dev, /* ARGSUSED */ int -vinumclose(dev_t dev, +vinumclose(struct cdev *dev, int flags, int fmt, struct thread *td) @@ -517,7 +517,7 @@ vinumclose(dev_t dev, } void -vinum_clone(void *arg, char *name, int namelen, dev_t * dev) +vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev) { struct volume *vol; int i; diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h index 86319f0afff1..e60356cae36c 100644 --- a/sys/dev/vinum/vinumext.h +++ b/sys/dev/vinum/vinumext.h @@ -141,13 +141,13 @@ d_close_t vinumclose; d_strategy_t vinumstrategy; d_ioctl_t vinumioctl; -int vinum_super_ioctl(dev_t, u_long, caddr_t); +int vinum_super_ioctl(struct cdev *, u_long, caddr_t); int vinumstart(struct buf *bp, int reviveok); int launch_requests(struct request *rq, int reviveok); void sdio(struct buf *bp); /* XXX Do we need this? */ -int vinumpart(dev_t); +int vinumpart(struct cdev *); extern jmp_buf command_fail; /* return here if config fails */ @@ -172,9 +172,9 @@ struct rqgroup *allocrqg(struct request *rq, int elements); void deallocrqg(struct rqgroup *rqg); /* Device number decoding */ -int Volno(dev_t x); -int Plexno(dev_t x); -int Sdno(dev_t x); +int Volno(struct cdev *x); +int Plexno(struct cdev *x); +int Sdno(struct cdev *x); /* State transitions */ int set_drive_state(int driveno, enum drivestate state, enum setstateflags flags); diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c index f38017f89d53..1783c9234505 100644 --- a/sys/dev/vinum/vinumioctl.c +++ b/sys/dev/vinum/vinumioctl.c @@ -65,7 +65,7 @@ jmp_buf command_fail; /* return on a failed command */ /* ioctl routine */ int -vinumioctl(dev_t dev, +vinumioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, @@ -178,7 +178,7 @@ vinumioctl(dev_t dev, /* Handle ioctls for the super device */ int -vinum_super_ioctl(dev_t dev, +vinum_super_ioctl(struct cdev *dev, u_long cmd, caddr_t data) { diff --git a/sys/dev/vinum/vinumobj.h b/sys/dev/vinum/vinumobj.h index 0d5b800f3d2e..d6a4d873d225 100644 --- a/sys/dev/vinum/vinumobj.h +++ b/sys/dev/vinum/vinumobj.h @@ -184,7 +184,7 @@ struct _drive #ifdef _KERNEL u_int sectorsize; off_t mediasize; - dev_t dev; /* device information */ + struct cdev *dev; /* device information */ #ifdef VINUMDEBUG char lockfilename[16]; /* name of file from which we were locked */ int lockline; /* and the line number */ @@ -234,7 +234,7 @@ struct _sd int init_interval; /* and time to wait between transfers */ #ifdef _KERNEL struct request *waitlist; /* list of requests waiting on revive op */ - dev_t dev; /* associated device */ + struct cdev *dev; /* associated device */ #endif }; @@ -276,7 +276,7 @@ struct _plex struct rangelock *lock; /* ranges of locked addresses */ struct mtx *lockmtx; /* lock mutex, one of plexmutex [] */ daddr_t last_addr; /* last address read from this plex */ - dev_t dev; /* associated device */ + struct cdev *dev; /* associated device */ #endif }; @@ -316,6 +316,6 @@ struct _volume */ int plex[MAXPLEX]; /* index of plexes */ #ifdef _KERNEL - dev_t dev; /* associated device */ + struct cdev *dev; /* associated device */ #endif }; diff --git a/sys/dev/vinum/vinumutil.c b/sys/dev/vinum/vinumutil.c index f597cd72c06c..f63bbd7f308f 100644 --- a/sys/dev/vinum/vinumutil.c +++ b/sys/dev/vinum/vinumutil.c @@ -243,12 +243,17 @@ sizespec(char *spec) return -1; } +#ifdef _KERNEL +#define FOOTYPE struct cdev * +#else +#define FOOTYPE dev_t +#endif /* * Extract the volume number from a device number. Check that it's * the correct type, and that it isn't one of the superdevs. */ int -Volno(dev_t dev) +Volno(FOOTYPE dev) { int volno = minor(dev); @@ -269,7 +274,7 @@ Volno(dev_t dev) * type. Return -1 for invalid types. */ int -Plexno(dev_t dev) +Plexno(FOOTYPE dev) { int plexno = minor(dev); @@ -285,7 +290,7 @@ Plexno(dev_t dev) * type. Return -1 for invalid types. */ int -Sdno(dev_t dev) +Sdno(FOOTYPE dev) { int sdno = minor(dev); diff --git a/sys/dev/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c index a76e3ef2830b..782388588089 100644 --- a/sys/dev/watchdog/watchdog.c +++ b/sys/dev/watchdog/watchdog.c @@ -39,10 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include -static dev_t wd_dev; +static struct cdev *wd_dev; static int -wd_ioctl(dev_t dev __unused, u_long cmd, caddr_t data, +wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags __unused, struct thread *td) { int error; diff --git a/sys/dev/zs/z8530var.h b/sys/dev/zs/z8530var.h index 89a246a80c90..1e5fef7d3282 100644 --- a/sys/dev/zs/z8530var.h +++ b/sys/dev/zs/z8530var.h @@ -43,7 +43,7 @@ struct zstty_softc { bus_space_tag_t sc_bt; bus_space_handle_t sc_csr; bus_space_handle_t sc_data; - dev_t sc_si; + struct cdev *sc_si; struct tty *sc_tty; int sc_icnt; uint8_t *sc_iput; diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 46955261771b..bc848fb369bd 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -447,7 +447,7 @@ zstty_softintr(struct zstty_softc *sc) } static int -zsttyopen(dev_t dev, int flags, int mode, struct thread *td) +zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td) { struct zstty_softc *sc; struct tty *tp; @@ -503,7 +503,7 @@ zsttyopen(dev_t dev, int flags, int mode, struct thread *td) } static int -zsttyclose(dev_t dev, int flags, int mode, struct thread *td) +zsttyclose(struct cdev *dev, int flags, int mode, struct thread *td) { struct tty *tp; @@ -519,7 +519,7 @@ zsttyclose(dev_t dev, int flags, int mode, struct thread *td) } static int -zsttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +zsttyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct zstty_softc *sc; struct tty *tp; diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index b51f15dc4c26..687ec66515cf 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -92,7 +92,7 @@ cd9660_uninit(vfsp) */ int cd9660_ihashget(dev, inum, flags, vpp) - dev_t dev; + struct cdev *dev; ino_t inum; int flags; struct vnode **vpp; diff --git a/sys/fs/cd9660/cd9660_node.h b/sys/fs/cd9660/cd9660_node.h index 8e7d6c12d8e5..a5b228c45f06 100644 --- a/sys/fs/cd9660/cd9660_node.h +++ b/sys/fs/cd9660/cd9660_node.h @@ -113,7 +113,7 @@ void cd9660_defattr(struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); void cd9660_deftstamp(struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); -int cd9660_ihashget(dev_t, ino_t, int, struct vnode **); +int cd9660_ihashget(struct cdev *, ino_t, int, struct vnode **); void cd9660_ihashins(struct iso_node *); int cd9660_tstamp_conv7(u_char *, struct timespec *, enum ISO_FTYPE); int cd9660_tstamp_conv17(u_char *, struct timespec *); diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index ceb60f90e1c2..dc0b240dff23 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -92,7 +92,7 @@ MODULE_VERSION(cd9660, 1); * Called by vfs_mountroot when iso is going to be mounted as root. */ -static int iso_get_ssector(dev_t dev, struct thread *td); +static int iso_get_ssector(struct cdev *dev, struct thread *td); static int iso_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct iso_args *argp); @@ -103,7 +103,7 @@ static int iso_mountfs(struct vnode *devvp, struct mount *mp, */ static int iso_get_ssector(dev, td) - dev_t dev; + struct cdev *dev; struct thread *td; { struct ioc_toc_header h; @@ -272,7 +272,7 @@ iso_mountfs(devvp, mp, td, argp) register struct iso_mnt *isomp = (struct iso_mnt *)0; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; int error = EINVAL; int needclose = 0; int high_sierra = 0; @@ -707,7 +707,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) struct iso_node *ip; struct buf *bp; struct vnode *vp; - dev_t dev; + struct cdev *dev; int error; imp = VFSTOISOFS(mp); diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index 4789e50c296f..412f130b1f62 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -223,7 +223,7 @@ struct iso_mnt { int im_flags; struct mount *im_mountp; - dev_t im_dev; + struct cdev *im_dev; struct vnode *im_devvp; int logical_block_size; diff --git a/sys/fs/coda/cnode.h b/sys/fs/coda/cnode.h index 540831c719b0..be7e848bbea6 100644 --- a/sys/fs/coda/cnode.h +++ b/sys/fs/coda/cnode.h @@ -109,7 +109,7 @@ struct cnode { struct vattr c_vattr; /* attributes */ char *c_symlink; /* pointer to symbolic link */ u_short c_symlen; /* length of symbolic link */ - dev_t c_device; /* associated vnode device */ + struct cdev *c_device; /* associated vnode device */ ino_t c_inode; /* associated vnode inode */ struct cnode *c_next; /* links if on NetBSD machine */ }; @@ -153,7 +153,7 @@ struct coda_mntinfo { struct vnode *mi_rootvp; struct mount *mi_vfsp; struct vcomm mi_vcomm; - dev_t dev; + struct cdev *dev; int mi_started; }; extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */ @@ -201,7 +201,7 @@ extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type extern int coda_vnodeopstats_init(void); /* coda_vfsops.h */ -extern struct mount *devtomp(dev_t dev); +extern struct mount *devtomp(struct cdev *dev); /* sigh */ #define CODA_RDWR ((u_long) 31) diff --git a/sys/fs/coda/coda.h b/sys/fs/coda/coda.h index e7f1e0d2566b..90e7e2ae7202 100644 --- a/sys/fs/coda/coda.h +++ b/sys/fs/coda/coda.h @@ -58,7 +58,7 @@ typedef unsigned long u_long; typedef unsigned int u_int; typedef unsigned short u_short; typedef u_long ino_t; -typedef u_long dev_t; +typedef u_long struct cdev *; typedef void * caddr_t; #ifdef DOS typedef unsigned __int64 u_quad_t; diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 784962c19e66..0ce6e466e87e 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -174,7 +174,7 @@ printf("error = %d\n", error); /* for DEVFS, using bpf & tun drivers as examples*/ static void coda_fbsd_drvinit(void *unused); static void coda_fbsd_drvuninit(void *unused); -static void coda_fbsd_clone(void *arg, char *name, int namelen, dev_t *dev); +static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev); static eventhandler_tag clonetag; @@ -182,7 +182,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; int namelen; - dev_t *dev; + struct cdev **dev; { int u; diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c index 133d0fdb1579..03e408da63d6 100644 --- a/sys/fs/coda/coda_psdev.c +++ b/sys/fs/coda/coda_psdev.c @@ -117,7 +117,7 @@ vcodaattach(n) int vc_nb_open(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; /* NetBSD only */ @@ -149,7 +149,7 @@ vc_nb_open(dev, flag, mode, td) int vc_nb_close (dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -233,7 +233,7 @@ vc_nb_close (dev, flag, mode, td) int vc_nb_read(dev, uiop, flag) - dev_t dev; + struct cdev *dev; struct uio *uiop; int flag; { @@ -287,7 +287,7 @@ vc_nb_read(dev, uiop, flag) int vc_nb_write(dev, uiop, flag) - dev_t dev; + struct cdev *dev; struct uio *uiop; int flag; { @@ -387,7 +387,7 @@ vc_nb_write(dev, uiop, flag) int vc_nb_ioctl(dev, cmd, addr, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flag; @@ -441,7 +441,7 @@ vc_nb_ioctl(dev, cmd, addr, flag, td) int vc_nb_poll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { diff --git a/sys/fs/coda/coda_psdev.h b/sys/fs/coda/coda_psdev.h index c6ecf7f435e2..f135b3441208 100644 --- a/sys/fs/coda/coda_psdev.h +++ b/sys/fs/coda/coda_psdev.h @@ -31,9 +31,9 @@ * */ -int vc_nb_open(dev_t dev, int flag, int mode, struct thread *p); -int vc_nb_close (dev_t dev, int flag, int mode, struct thread *p); -int vc_nb_read(dev_t dev, struct uio *uiop, int flag); -int vc_nb_write(dev_t dev, struct uio *uiop, int flag); -int vc_nb_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *p); -int vc_nb_poll(dev_t dev, int events, struct thread *p); +int vc_nb_open(struct cdev *dev, int flag, int mode, struct thread *p); +int vc_nb_close (struct cdev *dev, int flag, int mode, struct thread *p); +int vc_nb_read(struct cdev *dev, struct uio *uiop, int flag); +int vc_nb_write(struct cdev *dev, struct uio *uiop, int flag); +int vc_nb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p); +int vc_nb_poll(struct cdev *dev, int events, struct thread *p); diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index 5105c0b882bc..f0bc3c296bdf 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -198,7 +198,7 @@ venus_root(void *mdp, int venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, struct proc *p, -/*out*/ dev_t *dev, ino_t *inode) +/*out*/ struct cdev **dev, ino_t *inode) { int cflag; DECL(coda_open); /* sets Isize & Osize */ diff --git a/sys/fs/coda/coda_venus.h b/sys/fs/coda/coda_venus.h index b506b5ba0277..473b84d30092 100644 --- a/sys/fs/coda/coda_venus.h +++ b/sys/fs/coda/coda_venus.h @@ -39,7 +39,7 @@ venus_root(void *mdp, int venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, struct proc *p, -/*out*/ dev_t *dev, ino_t *inode); +/*out*/ struct cdev **dev, ino_t *inode); int venus_close(void *mdp, CodaFid *fid, int flag, diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index ff6442932037..e7290e770807 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -81,7 +81,7 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE]; #define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++) extern int coda_nc_initialized; /* Set if cache has been initialized */ -extern int vc_nb_open(dev_t, int, int, struct thread *); +extern int vc_nb_open(struct cdev *, int, int, struct thread *); int coda_vfsopstats_init(void) @@ -114,7 +114,7 @@ coda_mount(vfsp, path, data, ndp, td) { struct vnode *dvp; struct cnode *cp; - dev_t dev; + struct cdev *dev; struct coda_mntinfo *mi; struct vnode *rootvp; CodaFid rootfid = INVAL_FID; @@ -528,7 +528,7 @@ getNewVnode(vpp) * device corresponds to a UFS. Return NULL if no device is found. */ struct mount *devtomp(dev) - dev_t dev; + struct cdev *dev; { struct mount *mp; diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index a1d24e930f77..a8666cc6f2f7 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -238,7 +238,7 @@ coda_open(v) /* locals */ int error; struct vnode *vp; - dev_t dev; + struct cdev *dev; ino_t inode; MARK_ENTRY(CODA_OPEN_STATS); @@ -1806,7 +1806,7 @@ coda_islocked(v) /* How one looks up a vnode given a device/inode pair: */ int -coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp) +coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp) { /* This is like VFS_VGET() or igetinode()! */ int error; diff --git a/sys/fs/coda/coda_vnops.h b/sys/fs/coda/coda_vnops.h index 8a3184b83c99..88a398e8cd6c 100644 --- a/sys/fs/coda/coda_vnops.h +++ b/sys/fs/coda/coda_vnops.h @@ -82,6 +82,6 @@ int coda_pathconf(void *); int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag, struct ucred *cred, struct thread *td); -int coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp); +int coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp); void print_vattr(struct vattr *attr); void print_cred(struct ucred *cred); diff --git a/sys/fs/devfs/devfs.h b/sys/fs/devfs/devfs.h index c12a4d6e99a3..ba8bbf02a4be 100644 --- a/sys/fs/devfs/devfs.h +++ b/sys/fs/devfs/devfs.h @@ -190,7 +190,7 @@ void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de); int devfs_rules_ioctl(struct mount *mp, u_long cmd, caddr_t data, struct thread *td); void devfs_rules_newmount(struct devfs_mount *dm, struct thread *td); int devfs_allocv (struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, struct thread *td); -dev_t *devfs_itod (int inode); +struct cdev **devfs_itod (int inode); struct devfs_dirent **devfs_itode (struct devfs_mount *dm, int inode); int devfs_populate (struct devfs_mount *dm); struct devfs_dirent *devfs_newdirent (char *name, int namelen); diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index eb394d88c824..732a23d8d711 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -47,8 +47,8 @@ #include -static dev_t devfs_inot[NDEVFSINO]; -static dev_t *devfs_overflow; +static struct cdev *devfs_inot[NDEVFSINO]; +static struct cdev **devfs_overflow; static int devfs_ref[NDEVFSINO]; static int *devfs_refoverflow; static int devfs_nextino = 3; @@ -95,7 +95,7 @@ static int devfs_getref(int inode) { int *ip, i, j; - dev_t *dp; + struct cdev **dp; ip = devfs_itor(inode); dp = devfs_itod(inode); @@ -124,7 +124,7 @@ devfs_itode (struct devfs_mount *dm, int inode) return (NULL); } -dev_t * +struct cdev ** devfs_itod (int inode) { @@ -140,7 +140,7 @@ devfs_itod (int inode) static void devfs_attemptoverflow(int insist) { - dev_t **ot; + struct cdev ***ot; int *or; int n, nb; @@ -150,8 +150,8 @@ devfs_attemptoverflow(int insist) ot = NULL; or = NULL; n = devfs_noverflowwant; - nb = sizeof (dev_t *) * n; - MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); + nb = sizeof (struct cdev **) * n; + MALLOC(ot, struct cdev ***, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); if (ot == NULL) goto bail; nb = sizeof (int) * n; @@ -282,7 +282,7 @@ int devfs_populate(struct devfs_mount *dm) { int i, j; - dev_t dev, pdev; + struct cdev *dev, *pdev; struct devfs_dirent *dd; struct devfs_dirent *de, **dep; char *q, *s; @@ -377,10 +377,10 @@ devfs_populate(struct devfs_mount *dm) } void -devfs_create(dev_t dev) +devfs_create(struct cdev *dev) { int ino, i, *ip; - dev_t *dp; + struct cdev **dp; for (;;) { /* Grab the next inode number */ @@ -426,7 +426,7 @@ devfs_create(dev_t dev) } void -devfs_destroy(dev_t dev) +devfs_destroy(struct cdev *dev) { int ino, i; diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c index 366fd848d039..b73ac7729e5b 100644 --- a/sys/fs/devfs/devfs_rule.c +++ b/sys/fs/devfs/devfs_rule.c @@ -108,7 +108,7 @@ static void devfs_rule_applydm(struct devfs_krule *dk, struct devfs_mount *dm); static int devfs_rule_autonumber(struct devfs_ruleset *ds, devfs_rnum *rnp); static struct devfs_krule *devfs_rule_byid(devfs_rid rid); static int devfs_rule_delete(struct devfs_krule **dkp); -static dev_t devfs_rule_getdev(struct devfs_dirent *de); +static struct cdev *devfs_rule_getdev(struct devfs_dirent *de); static int devfs_rule_input(struct devfs_rule *dr, struct devfs_mount *dm); static int devfs_rule_insert(struct devfs_rule *dr); static int devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de); @@ -480,26 +480,26 @@ devfs_rule_delete(struct devfs_krule **dkp) } /* - * Get a dev_t corresponding to de so we can try to match rules based - * on it. If this routine returns NULL, there is no dev_t associated + * Get a struct cdev *corresponding to de so we can try to match rules based + * on it. If this routine returns NULL, there is no struct cdev *associated * with the dirent (symlinks and directories don't have dev_ts), and * the caller should assume that any critera dependent on a dev_t * don't match. */ -static dev_t +static struct cdev * devfs_rule_getdev(struct devfs_dirent *de) { - dev_t *devp, dev; + struct cdev **devp, *dev; devp = devfs_itod(de->de_inode); if (devp != NULL) dev = *devp; else dev = NULL; - /* If we think this dirent should have a dev_t, alert the user. */ + /* If we think this dirent should have a struct cdev *, alert the user. */ if (dev == NULL && de->de_dirent->d_type != DT_LNK && de->de_dirent->d_type != DT_DIR) - printf("Warning: no dev_t for %s\n", de->de_dirent->d_name); + printf("Warning: no struct cdev *for %s\n", de->de_dirent->d_name); return (dev); } @@ -590,7 +590,7 @@ static int devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de) { struct devfs_rule *dr = &dk->dk_rule; - dev_t dev; + struct cdev *dev; dev = devfs_rule_getdev(de); /* @@ -598,7 +598,7 @@ devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de) * criteria that depend on it don't match. We should *not* * just ignore them (i.e., act like they weren't specified), * since that makes a rule that only has criteria dependent on - * the dev_t match all symlinks and directories. + * the struct cdev *match all symlinks and directories. * * Note also that the following tests are somewhat reversed: * They're actually testing to see whether the condition does @@ -630,7 +630,7 @@ devfs_rule_matchpath(struct devfs_krule *dk, struct devfs_dirent *de) { struct devfs_rule *dr = &dk->dk_rule; char *pname; - dev_t dev; + struct cdev *dev; dev = devfs_rule_getdev(de); if (dev != NULL) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index e0f192ffdb8c..cbc836a22d02 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -123,7 +123,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru { int error; struct vnode *vp; - dev_t dev; + struct cdev *dev; if (td == NULL) td = curthread; /* XXX */ @@ -213,7 +213,7 @@ devfs_getattr(ap) struct vattr *vap = ap->a_vap; int error = 0; struct devfs_dirent *de; - dev_t dev; + struct cdev *dev; de = vp->v_data; if (vp->v_type == VDIR) @@ -304,7 +304,7 @@ devfs_lookupx(ap) struct devfs_dirent *de, *dd; struct devfs_dirent **dde; struct devfs_mount *dmp; - dev_t cdev; + struct cdev *cdev; int error, flags, nameiop; char specname[SPECNAMELEN + 1], *pname; diff --git a/sys/fs/hpfs/hpfs.h b/sys/fs/hpfs/hpfs.h index 9b4fd1dfef34..c02862b094bd 100644 --- a/sys/fs/hpfs/hpfs.h +++ b/sys/fs/hpfs/hpfs.h @@ -312,7 +312,7 @@ struct hpfsmount { struct spblock hpm_sp; struct mount * hpm_mp; struct vnode * hpm_devvp; - dev_t hpm_dev; + struct cdev *hpm_dev; uid_t hpm_uid; gid_t hpm_gid; mode_t hpm_mode; @@ -341,7 +341,7 @@ struct hpfsnode { struct fnode h_fn; struct vnode * h_vp; struct vnode * h_devvp; - dev_t h_dev; + struct cdev *h_dev; lsn_t h_no; uid_t h_uid; gid_t h_gid; @@ -390,9 +390,9 @@ extern vop_t ** hpfs_vnodeop_p; /* Hash routines, too small to be separate header */ void hpfs_hphashinit(void); void hpfs_hphashdestroy(void); -struct hpfsnode *hpfs_hphashlookup(dev_t, lsn_t); -struct hpfsnode *hpfs_hphashget(dev_t, lsn_t); -int hpfs_hphashvget(dev_t, lsn_t, int, struct vnode **, struct thread *); +struct hpfsnode *hpfs_hphashlookup(struct cdev *, lsn_t); +struct hpfsnode *hpfs_hphashget(struct cdev *, lsn_t); +int hpfs_hphashvget(struct cdev *, lsn_t, int, struct vnode **, struct thread *); void hpfs_hphashins(register struct hpfsnode *); void hpfs_hphashrem(register struct hpfsnode *); extern struct lock hpfs_hphash_lock; diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c index e76eaf70558b..e1cd079ee281 100644 --- a/sys/fs/hpfs/hpfs_hash.c +++ b/sys/fs/hpfs/hpfs_hash.c @@ -82,7 +82,7 @@ hpfs_hphashdestroy(void) */ struct hpfsnode * hpfs_hphashlookup(dev, ino) - dev_t dev; + struct cdev *dev; lsn_t ino; { struct hpfsnode *hp; @@ -99,7 +99,7 @@ hpfs_hphashlookup(dev, ino) #if 0 struct hpfsnode * hpfs_hphashget(dev, ino) - dev_t dev; + struct cdev *dev; lsn_t ino; { struct hpfsnode *hp; @@ -120,7 +120,7 @@ loop: int hpfs_hphashvget(dev, ino, flags, vpp, td) - dev_t dev; + struct cdev *dev; lsn_t ino; int flags; struct vnode **vpp; diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 86e8bc64ec13..e9059d4e6413 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -217,7 +217,7 @@ hpfs_mountfs(devvp, mp, argsp, td) struct hpfsmount *hpmp; struct buf *bp = NULL; struct vnode *vp; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; dprintf(("hpfs_mountfs():\n")); /* diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index ebf13192122b..6fa69bd01e3a 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -94,7 +94,7 @@ union _qcvt { } static struct denode * - msdosfs_hashget(dev_t dev, u_long dirclust, u_long diroff); + msdosfs_hashget(struct cdev *dev, u_long dirclust, u_long diroff); static void msdosfs_hashins(struct denode *dep); static void msdosfs_hashrem(struct denode *dep); @@ -133,7 +133,7 @@ msdosfs_uninit(vfsp) static struct denode * msdosfs_hashget(dev, dirclust, diroff) - dev_t dev; + struct cdev *dev; u_long dirclust; u_long diroff; { @@ -215,7 +215,7 @@ deget(pmp, dirclust, diroffset, depp) struct denode **depp; /* returns the addr of the gotten denode */ { int error; - dev_t dev = pmp->pm_dev; + struct cdev *dev = pmp->pm_dev; struct mount *mntp = pmp->pm_mountp; struct direntry *direntptr; struct denode *ldep; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index dd4512ab241b..3ac0fb6877c3 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -301,7 +301,7 @@ mountmsdosfs(devvp, mp, td, argp) { struct msdosfsmount *pmp; struct buf *bp; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; union bootsector *bsp; struct byte_bpb33 *b33; struct byte_bpb50 *b50; diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 2f35ecc4d347..0ff712f63ed0 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -62,7 +62,7 @@ MALLOC_DECLARE(M_MSDOSFSMNT); */ struct msdosfsmount { struct mount *pm_mountp;/* vfs mount struct for this fs */ - dev_t pm_dev; /* block special device mounted */ + struct cdev *pm_dev; /* block special device mounted */ uid_t pm_uid; /* uid to set as owner of the files */ gid_t pm_gid; /* gid to set as owner of the files */ mode_t pm_mask; /* mask to and with file protection bits diff --git a/sys/fs/ntfs/ntfs.h b/sys/fs/ntfs/ntfs.h index 6e19029ade46..1940ee9deea0 100644 --- a/sys/fs/ntfs/ntfs.h +++ b/sys/fs/ntfs/ntfs.h @@ -241,7 +241,7 @@ struct bootfile { struct ntfsmount { struct mount *ntm_mountp; /* filesystem vfs structure */ struct bootfile ntm_bootfile; - dev_t ntm_dev; /* device mounted */ + struct cdev *ntm_dev; /* device mounted */ struct vnode *ntm_devvp; /* block device mounted vnode */ struct vnode *ntm_sysvn[NTFS_SYSNODESNUM]; u_int32_t ntm_bpmftrec; diff --git a/sys/fs/ntfs/ntfs_ihash.c b/sys/fs/ntfs/ntfs_ihash.c index e434eafb0fc0..dd9ec2d4f386 100644 --- a/sys/fs/ntfs/ntfs_ihash.c +++ b/sys/fs/ntfs/ntfs_ihash.c @@ -83,7 +83,7 @@ ntfs_nthashdestroy(void) */ struct ntnode * ntfs_nthashlookup(dev, inum) - dev_t dev; + struct cdev *dev; ino_t inum; { struct ntnode *ip; diff --git a/sys/fs/ntfs/ntfs_ihash.h b/sys/fs/ntfs/ntfs_ihash.h index eb3befd39180..7df7495c770a 100644 --- a/sys/fs/ntfs/ntfs_ihash.h +++ b/sys/fs/ntfs/ntfs_ihash.h @@ -31,7 +31,7 @@ extern struct lock ntfs_hashlock; void ntfs_nthashinit(void); void ntfs_nthashdestroy(void); -struct ntnode *ntfs_nthashlookup(dev_t, ino_t); -struct ntnode *ntfs_nthashget(dev_t, ino_t); +struct ntnode *ntfs_nthashlookup(struct cdev *, ino_t); +struct ntnode *ntfs_nthashget(struct cdev *, ino_t); void ntfs_nthashins(struct ntnode *); void ntfs_nthashrem(register struct ntnode *); diff --git a/sys/fs/ntfs/ntfs_inode.h b/sys/fs/ntfs/ntfs_inode.h index 13ed4431da6c..c11cfa1f6317 100644 --- a/sys/fs/ntfs/ntfs_inode.h +++ b/sys/fs/ntfs/ntfs_inode.h @@ -43,7 +43,7 @@ struct ntnode { struct vnode *i_devvp; /* vnode of blk dev we live on */ - dev_t i_dev; /* Device associated with the inode. */ + struct cdev *i_dev; /* Device associated with the inode. */ LIST_ENTRY(ntnode) i_hash; struct ntnode *i_next; diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index a959e8c189e4..924f06f319da 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -273,7 +273,7 @@ ntfs_mountfs(devvp, mp, argsp, td) { struct buf *bp; struct ntfsmount *ntmp; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; int error, ronly, ncount, i; struct vnode *vp; diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index a90233ee4a7d..7d12a58587a8 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -133,7 +133,7 @@ spec_open(ap) { struct thread *td = ap->a_td; struct vnode *vp = ap->a_vp; - dev_t dev = vp->v_rdev; + struct cdev *dev = vp->v_rdev; int error; struct cdevsw *dsw; @@ -247,7 +247,7 @@ spec_read(ap) struct vnode *vp; struct thread *td; struct uio *uio; - dev_t dev; + struct cdev *dev; int error, resid; struct cdevsw *dsw; @@ -263,7 +263,7 @@ spec_read(ap) dsw = devsw(dev); VOP_UNLOCK(vp, 0, td); KASSERT(dev->si_refcount > 0, - ("specread() on un-referenced dev_t (%s)", devtoname(dev))); + ("specread() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); @@ -294,7 +294,7 @@ spec_write(ap) struct vnode *vp; struct thread *td; struct uio *uio; - dev_t dev; + struct cdev *dev; int error, resid; struct cdevsw *dsw; @@ -307,7 +307,7 @@ spec_write(ap) VOP_UNLOCK(vp, 0, td); KASSERT(dev->si_refcount > 0, - ("spec_write() on un-referenced dev_t (%s)", devtoname(dev))); + ("spec_write() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); @@ -339,14 +339,14 @@ spec_ioctl(ap) struct thread *a_td; } */ *ap; { - dev_t dev; + struct cdev *dev; int error; struct cdevsw *dsw; dev = ap->a_vp->v_rdev; dsw = devsw(dev); KASSERT(dev->si_refcount > 0, - ("spec_ioctl() on un-referenced dev_t (%s)", devtoname(dev))); + ("spec_ioctl() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); @@ -372,14 +372,14 @@ spec_poll(ap) struct thread *a_td; } */ *ap; { - dev_t dev; + struct cdev *dev; struct cdevsw *dsw; int error; dev = ap->a_vp->v_rdev; dsw = devsw(dev); KASSERT(dev->si_refcount > 0, - ("spec_poll() on un-referenced dev_t (%s)", devtoname(dev))); + ("spec_poll() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { /* XXX: not yet DROP_GIANT(); */ @@ -399,14 +399,14 @@ spec_kqfilter(ap) struct knote *a_kn; } */ *ap; { - dev_t dev; + struct cdev *dev; struct cdevsw *dsw; int error; dev = ap->a_vp->v_rdev; dsw = devsw(dev); KASSERT(dev->si_refcount > 0, - ("spec_kqfilter() on un-referenced dev_t (%s)", devtoname(dev))); + ("spec_kqfilter() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); @@ -572,7 +572,7 @@ spec_close(ap) { struct vnode *vp = ap->a_vp, *oldvp; struct thread *td = ap->a_td; - dev_t dev = vp->v_rdev; + struct cdev *dev = vp->v_rdev; struct cdevsw *dsw; int error; @@ -627,7 +627,7 @@ spec_close(ap) } VI_UNLOCK(vp); KASSERT(dev->si_refcount > 0, - ("spec_close() on un-referenced dev_t (%s)", devtoname(dev))); + ("spec_close() on un-referenced struct cdev *(%s)", devtoname(dev))); cdevsw_ref(dsw); if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); diff --git a/sys/fs/udf/udf.h b/sys/fs/udf/udf.h index 540a3a678057..449c9117ffa1 100644 --- a/sys/fs/udf/udf.h +++ b/sys/fs/udf/udf.h @@ -33,7 +33,7 @@ struct udf_node { struct vnode *i_vnode; struct vnode *i_devvp; struct udf_mnt *udfmp; - dev_t i_dev; + struct cdev *i_dev; ino_t hash_id; long diroff; struct file_entry *fentry; @@ -42,7 +42,7 @@ struct udf_node { struct udf_mnt { int im_flags; struct mount *im_mountp; - dev_t im_dev; + struct cdev *im_dev; struct vnode *im_devvp; int bsize; int bshift; diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index ce084d6aaf81..aae2d0eae83f 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -63,7 +63,7 @@ struct g_class g_gate_class = { .destroy_geom = g_gate_destroy_geom }; -static dev_t status_dev; +static struct cdev *status_dev; static d_ioctl_t g_gate_ioctl; static struct cdevsw g_gate_cdevsw = { .d_version = D_VERSION, @@ -437,7 +437,7 @@ g_gate_create(struct g_gate_ctl_create *ggio) return (EINVAL); \ } while (0) static int -g_gate_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td) +g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { struct g_gate_softc *sc; struct bio *bp; diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 31002fe33481..07189bdbe578 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -182,8 +182,9 @@ struct g_provider { }; /* geom_dev.c */ +struct cdev; void g_dev_print(void); -struct g_provider *g_dev_getprovider(dev_t dev); +struct g_provider *g_dev_getprovider(struct cdev *dev); /* geom_dump.c */ void g_trace(int level, const char *, ...); diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index 3e50eb350889..ce000f3168da 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -444,7 +444,7 @@ g_ctl_req(void *arg, int flag __unused) static int -g_ctl_ioctl_ctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { struct gctl_req *req; @@ -479,7 +479,7 @@ g_ctl_ioctl_ctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *t } static int -g_ctl_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +g_ctl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int error; diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 9ad3f70b0f0e..54f585e03aa1 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -99,7 +99,7 @@ g_dev_print(void) * XXX: eliminating the need for this hack. */ static void -g_dev_clone(void *arg __unused, char *name, int namelen __unused, dev_t *dev) +g_dev_clone(void *arg __unused, char *name, int namelen __unused, struct cdev **dev) { struct g_geom *gp; @@ -135,7 +135,7 @@ g_dev_register_cloner(void *foo __unused) SYSINIT(geomdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,g_dev_register_cloner,NULL); struct g_provider * -g_dev_getprovider(dev_t dev) +g_dev_getprovider(struct cdev *dev) { struct g_consumer *cp; @@ -155,7 +155,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) struct g_consumer *cp; static int unit = GEOM_MINOR_PROVIDERS; int error; - dev_t dev; + struct cdev *dev; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -190,7 +190,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) } static int -g_dev_open(dev_t dev, int flags, int fmt, struct thread *td) +g_dev_open(struct cdev *dev, int flags, int fmt, struct thread *td) { struct g_geom *gp; struct g_consumer *cp; @@ -223,7 +223,7 @@ g_dev_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -g_dev_close(dev_t dev, int flags, int fmt, struct thread *td) +g_dev_close(struct cdev *dev, int flags, int fmt, struct thread *td) { struct g_geom *gp; struct g_consumer *cp; @@ -273,7 +273,7 @@ g_dev_close(dev_t dev, int flags, int fmt, struct thread *td) * XXX: will break (actually: stall) the BSD disklabel hacks. */ static int -g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { struct g_geom *gp; struct g_consumer *cp; @@ -365,7 +365,7 @@ g_dev_strategy(struct bio *bp) { struct g_consumer *cp; struct bio *bp2; - dev_t dev; + struct cdev *dev; KASSERT(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE || @@ -404,7 +404,7 @@ g_dev_strategy(struct bio *bp) * * Called from below when the provider orphaned us. * - Clear any dump settings. - * - Destroy the dev_t to prevent any more request from coming in. The + * - Destroy the struct cdev *to prevent any more request from coming in. The * provider is already marked with an error, so anything which comes in * in the interrim will be returned immediately. * - Wait for any outstanding I/O to finish. @@ -416,7 +416,7 @@ static void g_dev_orphan(struct g_consumer *cp) { struct g_geom *gp; - dev_t dev; + struct cdev *dev; g_topology_assert(); gp = cp->geom; @@ -427,7 +427,7 @@ g_dev_orphan(struct g_consumer *cp) if (dev->si_flags & SI_DUMPDEV) set_dumper(NULL); - /* Destroy the dev_t so we get no more requests */ + /* Destroy the struct cdev *so we get no more requests */ destroy_dev(dev); /* Wait for the cows to come home */ diff --git a/sys/gnu/ext2fs/ext2_extern.h b/sys/gnu/ext2fs/ext2_extern.h index 12ec52476840..45ba6b32c76c 100644 --- a/sys/gnu/ext2fs/ext2_extern.h +++ b/sys/gnu/ext2fs/ext2_extern.h @@ -59,11 +59,11 @@ void ext2_dirbad(struct inode *ip, doff_t offset, char *how); void ext2_ei2i(struct ext2_inode *, struct inode *); int ext2_getlbns(struct vnode *, int32_t, struct indir *, int *); void ext2_i2ei(struct inode *, struct ext2_inode *); -int ext2_ihashget(dev_t, ino_t, int, struct vnode **); +int ext2_ihashget(struct cdev *, ino_t, int, struct vnode **); void ext2_ihashinit(void); void ext2_ihashins(struct inode *); struct vnode * - ext2_ihashlookup(dev_t, ino_t); + ext2_ihashlookup(struct cdev *, ino_t); void ext2_ihashrem(struct inode *); void ext2_ihashuninit(void); void ext2_itimes(struct vnode *vp); diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c index 09da05697f30..fca9a0d84830 100644 --- a/sys/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/ext2fs/ext2_ihash.c @@ -80,7 +80,7 @@ ext2_ihashuninit() */ struct vnode * ext2_ihashlookup(dev, inum) - dev_t dev; + struct cdev *dev; ino_t inum; { struct inode *ip; @@ -102,7 +102,7 @@ ext2_ihashlookup(dev, inum) */ int ext2_ihashget(dev, inum, flags, vpp) - dev_t dev; + struct cdev *dev; ino_t inum; int flags; struct vnode **vpp; diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h index e1ca44d3056f..407ca8a3c257 100644 --- a/sys/gnu/ext2fs/ext2_mount.h +++ b/sys/gnu/ext2fs/ext2_mount.h @@ -44,7 +44,7 @@ struct vnode; /* This structure describes the ext2fs specific mount structure data. */ struct ext2mount { struct mount *um_mountp; /* filesystem vfs structure */ - dev_t um_dev; /* device mounted */ + struct cdev *um_dev; /* device mounted */ struct vnode *um_devvp; /* block device mounted vnode */ struct ext2_sb_info *um_e2fs; /* EXT2FS */ diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index c91eaacd2f05..a745e6a7bc38 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -97,7 +97,7 @@ VFS_SET(ext2fs_vfsops, ext2fs, 0); static int ext2fs_inode_hash_lock; -static int ext2_check_sb_compat(struct ext2_super_block *es, dev_t dev, +static int ext2_check_sb_compat(struct ext2_super_block *es, struct cdev *dev, int ronly); static int compute_sb_data(struct vnode * devvp, struct ext2_super_block * es, struct ext2_sb_info * fs); @@ -378,7 +378,7 @@ static int ext2_check_descriptors (struct ext2_sb_info * sb) static int ext2_check_sb_compat(es, dev, ronly) struct ext2_super_block *es; - dev_t dev; + struct cdev *dev; int ronly; { @@ -635,7 +635,7 @@ ext2_mountfs(devvp, mp, td) struct buf *bp; struct ext2_sb_info *fs; struct ext2_super_block * es; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; int error; int ronly; @@ -1000,7 +1000,7 @@ ext2_vget(mp, ino, flags, vpp) struct ext2mount *ump; struct buf *bp; struct vnode *vp; - dev_t dev; + struct cdev *dev; int i, error; int used_blocks; diff --git a/sys/gnu/ext2fs/inode.h b/sys/gnu/ext2fs/inode.h index b0f1625cd4d1..cf5288a5a99f 100644 --- a/sys/gnu/ext2fs/inode.h +++ b/sys/gnu/ext2fs/inode.h @@ -65,7 +65,7 @@ struct inode { struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ u_int32_t i_flag; /* flags, see below */ - dev_t i_dev; /* Device associated with the inode. */ + struct cdev *i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ struct ext2_sb_info *i_e2fs; /* EXT2FS */ @@ -110,7 +110,7 @@ struct inode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * struct cdev *value. Short symbolic links place their path in the * di_db area. */ #define i_shortlink i_db diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h index 12ec52476840..45ba6b32c76c 100644 --- a/sys/gnu/fs/ext2fs/ext2_extern.h +++ b/sys/gnu/fs/ext2fs/ext2_extern.h @@ -59,11 +59,11 @@ void ext2_dirbad(struct inode *ip, doff_t offset, char *how); void ext2_ei2i(struct ext2_inode *, struct inode *); int ext2_getlbns(struct vnode *, int32_t, struct indir *, int *); void ext2_i2ei(struct inode *, struct ext2_inode *); -int ext2_ihashget(dev_t, ino_t, int, struct vnode **); +int ext2_ihashget(struct cdev *, ino_t, int, struct vnode **); void ext2_ihashinit(void); void ext2_ihashins(struct inode *); struct vnode * - ext2_ihashlookup(dev_t, ino_t); + ext2_ihashlookup(struct cdev *, ino_t); void ext2_ihashrem(struct inode *); void ext2_ihashuninit(void); void ext2_itimes(struct vnode *vp); diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h index e1ca44d3056f..407ca8a3c257 100644 --- a/sys/gnu/fs/ext2fs/ext2_mount.h +++ b/sys/gnu/fs/ext2fs/ext2_mount.h @@ -44,7 +44,7 @@ struct vnode; /* This structure describes the ext2fs specific mount structure data. */ struct ext2mount { struct mount *um_mountp; /* filesystem vfs structure */ - dev_t um_dev; /* device mounted */ + struct cdev *um_dev; /* device mounted */ struct vnode *um_devvp; /* block device mounted vnode */ struct ext2_sb_info *um_e2fs; /* EXT2FS */ diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index c91eaacd2f05..a745e6a7bc38 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -97,7 +97,7 @@ VFS_SET(ext2fs_vfsops, ext2fs, 0); static int ext2fs_inode_hash_lock; -static int ext2_check_sb_compat(struct ext2_super_block *es, dev_t dev, +static int ext2_check_sb_compat(struct ext2_super_block *es, struct cdev *dev, int ronly); static int compute_sb_data(struct vnode * devvp, struct ext2_super_block * es, struct ext2_sb_info * fs); @@ -378,7 +378,7 @@ static int ext2_check_descriptors (struct ext2_sb_info * sb) static int ext2_check_sb_compat(es, dev, ronly) struct ext2_super_block *es; - dev_t dev; + struct cdev *dev; int ronly; { @@ -635,7 +635,7 @@ ext2_mountfs(devvp, mp, td) struct buf *bp; struct ext2_sb_info *fs; struct ext2_super_block * es; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; int error; int ronly; @@ -1000,7 +1000,7 @@ ext2_vget(mp, ino, flags, vpp) struct ext2mount *ump; struct buf *bp; struct vnode *vp; - dev_t dev; + struct cdev *dev; int i, error; int used_blocks; diff --git a/sys/gnu/fs/ext2fs/inode.h b/sys/gnu/fs/ext2fs/inode.h index b0f1625cd4d1..cf5288a5a99f 100644 --- a/sys/gnu/fs/ext2fs/inode.h +++ b/sys/gnu/fs/ext2fs/inode.h @@ -65,7 +65,7 @@ struct inode { struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ u_int32_t i_flag; /* flags, see below */ - dev_t i_dev; /* Device associated with the inode. */ + struct cdev *i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ struct ext2_sb_info *i_e2fs; /* EXT2FS */ @@ -110,7 +110,7 @@ struct inode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * struct cdev *value. Short symbolic links place their path in the * di_db area. */ #define i_shortlink i_db diff --git a/sys/i386/acpica/acpi_asus.c b/sys/i386/acpica/acpi_asus.c index f16121b5c1db..10d97e48edd4 100644 --- a/sys/i386/acpica/acpi_asus.c +++ b/sys/i386/acpica/acpi_asus.c @@ -83,9 +83,9 @@ struct acpi_asus_softc { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; - dev_t s_mled; - dev_t s_tled; - dev_t s_wled; + struct cdev *s_mled; + struct cdev *s_tled; + struct cdev *s_wled; int s_brn; int s_disp; diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index 79ba3cf08080..e0ad71ec7540 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -192,19 +192,19 @@ acpi_capm_get_pwstatus(apm_pwstatus_t app) } static int -apmopen(dev_t dev, int flag, int fmt, d_thread_t *td) +apmopen(struct cdev *dev, int flag, int fmt, d_thread_t *td) { return (0); } static int -apmclose(dev_t dev, int flag, int fmt, d_thread_t *td) +apmclose(struct cdev *dev, int flag, int fmt, d_thread_t *td) { return (0); } static int -apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td) +apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td) { int error = 0; struct acpi_softc *acpi_sc; @@ -281,13 +281,13 @@ apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td) } static int -apmwrite(dev_t dev, struct uio *uio, int ioflag) +apmwrite(struct cdev *dev, struct uio *uio, int ioflag) { return (uio->uio_resid); } static int -apmpoll(dev_t dev, int events, d_thread_t *td) +apmpoll(struct cdev *dev, int events, d_thread_t *td) { return (0); } diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 4f3adca4da2b..768bd06fa0e7 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -1229,7 +1229,7 @@ apm_attach(device_t dev) } static int -apmopen(dev_t dev, int flag, int fmt, struct thread *td) +apmopen(struct cdev *dev, int flag, int fmt, struct thread *td) { struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1257,7 +1257,7 @@ apmopen(dev_t dev, int flag, int fmt, struct thread *td) } static int -apmclose(dev_t dev, int flag, int fmt, struct thread *td) +apmclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1280,7 +1280,7 @@ apmclose(dev_t dev, int flag, int fmt, struct thread *td) } static int -apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct apm_softc *sc = &apm_softc; struct apm_bios_arg *args; @@ -1434,7 +1434,7 @@ apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) } static int -apmwrite(dev_t dev, struct uio *uio, int ioflag) +apmwrite(struct cdev *dev, struct uio *uio, int ioflag) { struct apm_softc *sc = &apm_softc; u_int event_type; @@ -1464,7 +1464,7 @@ apmwrite(dev_t dev, struct uio *uio, int ioflag) } static int -apmpoll(dev_t dev, int events, struct thread *td) +apmpoll(struct cdev *dev, int events, struct thread *td) { struct apm_softc *sc = &apm_softc; int revents = 0; diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c index 883676cc3a6e..9879c90334de 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define ADDR2HDR(addr) ((struct smapi_bios_header *)BIOS_PADDRTOVADDR(addr)) struct smapi_softc { - dev_t cdev; + struct cdev *cdev; device_t dev; struct resource * res; int rid; @@ -98,7 +98,7 @@ extern int smapi32_new (u_long, u_short, static int smapi_ioctl (dev, cmd, data, fflag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int fflag; diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c index 70670eb1e327..2bda626d7f65 100644 --- a/sys/i386/i386/elan-mmcr.c +++ b/sys/i386/i386/elan-mmcr.c @@ -78,7 +78,7 @@ static u_int echo_a, echo_d; #endif /* CPU_ELAN_PPS */ static u_int led_cookie[32]; -static dev_t led_dev[32]; +static struct cdev *led_dev[32]; static void gpio_led(void *cookie, int state) @@ -405,7 +405,7 @@ elan_watchdog(void *foo __unused, u_int spec, int *error) } static int -elan_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +elan_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { if (offset >= 0x1000) @@ -414,7 +414,7 @@ elan_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) return (0); } static int -elan_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr) +elan_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr) { int error; diff --git a/sys/i386/i386/geode.c b/sys/i386/i386/geode.c index 6896686d2a37..2702f21eb25a 100644 --- a/sys/i386/i386/geode.c +++ b/sys/i386/i386/geode.c @@ -43,7 +43,7 @@ static unsigned cba; static unsigned gpio; static unsigned geode_counter; -static dev_t led1, led2, led3; +static struct cdev *led1, *led2, *led3; static int led1b, led2b, led3b; static void diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 3a41bbedfb1b..d1eb5c091fab 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1215,9 +1215,9 @@ SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -u_long bootdev; /* not a dev_t - encoding is different */ +u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in dev_t format)"); + CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); /* * Initialize 386 and configure to run kernel diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index f296d6860384..379b59c88919 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include -static dev_t memdev, kmemdev, iodev; +static struct cdev *memdev, *kmemdev, *iodev; static d_open_t mmopen; static d_close_t mmclose; @@ -94,7 +94,7 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); struct mem_range_softc mem_range_softc; static int -mmclose(dev_t dev, int flags, int fmt, struct thread *td) +mmclose(struct cdev *dev, int flags, int fmt, struct thread *td) { switch (minor(dev)) { case 14: @@ -104,7 +104,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -mmopen(dev_t dev, int flags, int fmt, struct thread *td) +mmopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int error; @@ -132,7 +132,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) /*ARGSUSED*/ static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(struct cdev *dev, struct uio *uio, int flags) { int o; u_int c = 0, v; @@ -209,7 +209,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { switch (minor(dev)) { @@ -237,7 +237,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) * and mem_range_attr_set. */ static int -mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +mmioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int nd, error = 0; struct mem_range_op *mo = (struct mem_range_op *)data; diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index eaccb5a6ba1b..d085261547c2 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -299,7 +299,7 @@ static int writer; static int writerpmc; static int -perfmon_open(dev_t dev, int flags, int fmt, struct thread *td) +perfmon_open(struct cdev *dev, int flags, int fmt, struct thread *td) { if (!perfmon_cpuok) return ENXIO; @@ -316,7 +316,7 @@ perfmon_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -perfmon_close(dev_t dev, int flags, int fmt, struct thread *td) +perfmon_close(struct cdev *dev, int flags, int fmt, struct thread *td) { if (flags & FWRITE) { int i; @@ -331,7 +331,7 @@ perfmon_close(dev_t dev, int flags, int fmt, struct thread *td) } static int -perfmon_ioctl(dev_t dev, u_long cmd, caddr_t param, int flags, struct thread *td) +perfmon_ioctl(struct cdev *dev, u_long cmd, caddr_t param, int flags, struct thread *td) { struct pmc *pmc; struct pmc_data *pmcd; diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index ad5665b27b7d..0702b06d3c86 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -65,7 +65,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_BOOTINFO 4 /* struct: bootinfo */ diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index ddc0742db232..31c85f89f108 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -96,8 +96,8 @@ typedef struct mse_softc { u_char sc_bytes[MOUSE_SYS_PACKETSIZE]; struct callout_handle sc_callout; int sc_watchdog; - dev_t sc_dev; - dev_t sc_ndev; + struct cdev *sc_dev; + struct cdev *sc_ndev; mousehw_t hw; mousemode_t mode; mousestatus_t status; @@ -386,7 +386,7 @@ mse_detach(dev) */ static int mseopen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -426,7 +426,7 @@ mseopen(dev, flags, fmt, td) */ static int mseclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -450,7 +450,7 @@ mseclose(dev, flags, fmt, td) */ static int mseread(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -517,7 +517,7 @@ mseread(dev, uio, ioflag) */ static int mseioctl(dev, cmd, addr, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flag; @@ -634,7 +634,7 @@ mseioctl(dev, cmd, addr, flag, td) */ static int msepoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { @@ -667,10 +667,10 @@ static void msetimeout(arg) void *arg; { - dev_t dev; + struct cdev *dev; mse_softc_t *sc; - dev = (dev_t)arg; + dev = (struct cdev *)arg; sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); if (sc->sc_watchdog) { if (bootverbose) diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 39c7b837ebdc..ac387332654d 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -271,7 +271,7 @@ pcvt_attach(device_t dev) * driver open *---------------------------------------------------------------------------*/ static int -pcvt_open(dev_t dev, int flag, int mode, struct thread *td) +pcvt_open(struct cdev *dev, int flag, int mode, struct thread *td) { register struct tty *tp; register struct video_state *vsx; @@ -339,7 +339,7 @@ pcvt_open(dev_t dev, int flag, int mode, struct thread *td) * driver close *---------------------------------------------------------------------------*/ static int -pcvt_close(dev_t dev, int flag, int mode, struct thread *td) +pcvt_close(struct cdev *dev, int flag, int mode, struct thread *td) { register struct tty *tp; register struct video_state *vsx; @@ -369,7 +369,7 @@ pcvt_close(dev_t dev, int flag, int mode, struct thread *td) * driver ioctl *---------------------------------------------------------------------------*/ static int -pcvt_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +pcvt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { register int error; register struct tty *tp; @@ -404,7 +404,7 @@ pcvt_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * driver mmap *---------------------------------------------------------------------------*/ static int -pcvt_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +pcvt_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { if (offset > 0x20000 - PAGE_SIZE) return -1; diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c index 639c50cdf9bb..035c2af37a15 100644 --- a/sys/i386/isa/pcvt/pcvt_ext.c +++ b/sys/i386/isa/pcvt/pcvt_ext.c @@ -2393,7 +2393,7 @@ vgapage(int new_screen) * ioctl handling for VT_USL mode *---------------------------------------------------------------------------*/ int -usl_vt_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct thread *td) +usl_vt_ioctl(struct cdev *dev, int cmd, caddr_t data, int flag, struct thread *td) { struct proc *p; int i, j, error, opri; diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h index 44b65a4f0eec..a100de78799c 100644 --- a/sys/i386/isa/pcvt/pcvt_hdr.h +++ b/sys/i386/isa/pcvt/pcvt_hdr.h @@ -948,7 +948,7 @@ void get_usl_keymap( keymap_t *map ); void init_sfkl ( struct video_state *svsp ); void init_ufkl ( struct video_state *svsp ); -int kbdioctl ( dev_t dev, int cmd, caddr_t data, int flag ); +int kbdioctl ( struct cdev *dev, int cmd, caddr_t data, int flag ); void kbd_code_init ( void ); void kbd_code_init1 ( void ); @@ -1001,14 +1001,14 @@ void update_hp ( struct video_state *svsp ); void update_led ( void ); #ifdef XSERVER -int usl_vt_ioctl (dev_t dev, int cmd, caddr_t data, int flag, struct thread *); +int usl_vt_ioctl (struct cdev *dev, int cmd, caddr_t data, int flag, struct thread *); #endif void vga10_vga10 ( u_char *invga, u_char *outvga ); void vga10_vga14 ( u_char *invga, u_char *outvga ); void vga10_vga16 ( u_char *invga, u_char *outvga ); void vga10_vga8 ( u_char *invga, u_char *outvga ); -int vgaioctl ( dev_t dev, int cmd, caddr_t data, int flag ); +int vgaioctl ( struct cdev *dev, int cmd, caddr_t data, int flag ); #ifdef XSERVER int vgapage ( int n ); diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c index d3f060a42085..343f38508e27 100644 --- a/sys/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/i386/isa/pcvt/pcvt_kbd.c @@ -1199,7 +1199,7 @@ setkeydef(Ovl_tbl *data) * keyboard ioctl's entry *---------------------------------------------------------------------------*/ int -kbdioctl(dev_t dev, int cmd, caddr_t data, int flag) +kbdioctl(struct cdev *dev, int cmd, caddr_t data, int flag) { int key; diff --git a/sys/i386/isa/pcvt/pcvt_sup.c b/sys/i386/isa/pcvt/pcvt_sup.c index 49fe2892adf3..16d5f603c28c 100644 --- a/sys/i386/isa/pcvt/pcvt_sup.c +++ b/sys/i386/isa/pcvt/pcvt_sup.c @@ -58,13 +58,13 @@ static void vid_cursor ( struct cursorshape *data ); static void vgasetfontattr ( struct vgafontattr *data ); static void vgagetfontattr ( struct vgafontattr *data ); static void vgaloadchar ( struct vgaloadchar *data ); -static void vid_getscreen ( struct screeninfo *data, dev_t dev ); -static void vid_setscreen ( struct screeninfo *data, dev_t dev ); +static void vid_getscreen ( struct screeninfo *data, struct cdev *dev ); +static void vid_setscreen ( struct screeninfo *data, struct cdev *dev ); static void setchargen ( void ); static void setchargen3 ( void ); static void resetchargen ( void ); -static void vgareadpel ( struct vgapel *data, dev_t dev ); -static void vgawritepel ( struct vgapel *data, dev_t dev ); +static void vgareadpel ( struct vgapel *data, struct cdev *dev ); +static void vgawritepel ( struct vgapel *data, struct cdev *dev ); static void vgapcvtid ( struct pcvtid *data ); static void vgapcvtinfo ( struct pcvtinfo *data ); @@ -102,7 +102,7 @@ static u_short getrand ( void ); * execute vga ioctls *---------------------------------------------------------------------------*/ int -vgaioctl(dev_t dev, int cmd, caddr_t data, int flag) +vgaioctl(struct cdev *dev, int cmd, caddr_t data, int flag) { if(minor(dev) >= PCVT_NSCREENS) return -1; @@ -553,7 +553,7 @@ vgaloadchar(struct vgaloadchar *data) * video ioctl - get screen information *---------------------------------------------------------------------------*/ static void -vid_getscreen(struct screeninfo *data, dev_t dev) +vid_getscreen(struct screeninfo *data, struct cdev *dev) { int device = minor(dev); data->adaptor_type = adaptor_type; /* video adapter installed */ @@ -576,7 +576,7 @@ vid_getscreen(struct screeninfo *data, dev_t dev) * video ioctl - set screen information *---------------------------------------------------------------------------*/ static void -vid_setscreen(struct screeninfo *data, dev_t dev) +vid_setscreen(struct screeninfo *data, struct cdev *dev) { int screen; @@ -770,7 +770,7 @@ reallocate_scrollbuffer(struct video_state *svsp, int pages) * VGA ioctl - read DAC palette entry *---------------------------------------------------------------------------*/ static void -vgareadpel(struct vgapel *data, dev_t dev) +vgareadpel(struct vgapel *data, struct cdev *dev) { register unsigned vpage = minor(dev); register unsigned idx = data->idx; @@ -788,7 +788,7 @@ vgareadpel(struct vgapel *data, dev_t dev) * VGA ioctl - write DAC palette entry *---------------------------------------------------------------------------*/ static void -vgawritepel(struct vgapel *data, dev_t dev) +vgawritepel(struct vgapel *data, struct cdev *dev) { register unsigned vpage = minor(dev); register unsigned idx = data->idx; diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c index 3b0a4199c1e2..1ded09c429be 100644 --- a/sys/i386/isa/spic.c +++ b/sys/i386/isa/spic.c @@ -443,7 +443,7 @@ spictimeout(void *arg) } static int -spicopen(dev_t dev, int flag, int fmt, struct thread *td) +spicopen(struct cdev *dev, int flag, int fmt, struct thread *td) { struct spic_softc *sc; @@ -461,7 +461,7 @@ spicopen(dev_t dev, int flag, int fmt, struct thread *td) } static int -spicclose(dev_t dev, int flag, int fmt, struct thread *td) +spicclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct spic_softc *sc; @@ -474,7 +474,7 @@ spicclose(dev_t dev, int flag, int fmt, struct thread *td) } static int -spicread(dev_t dev, struct uio *uio, int flag) +spicread(struct cdev *dev, struct uio *uio, int flag) { struct spic_softc *sc; int l, s, error; @@ -508,7 +508,7 @@ spicread(dev_t dev, struct uio *uio, int flag) } static int -spicioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +spicioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct spic_softc *sc; @@ -518,7 +518,7 @@ spicioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) } static int -spicpoll(dev_t dev, int events, struct thread *td) +spicpoll(struct cdev *dev, int events, struct thread *td) { struct spic_softc *sc; int revents = 0, s; diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index e73ab8d73324..2dc74e37682b 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -472,7 +472,7 @@ static char *spkr_inbuf; /* incoming buf */ static int spkropen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -499,7 +499,7 @@ spkropen(dev, flags, fmt, td) static int spkrwrite(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -531,7 +531,7 @@ spkrwrite(dev, uio, ioflag) static int spkrclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -554,7 +554,7 @@ spkrclose(dev, flags, fmt, td) static int spkrioctl(dev, cmd, cmdarg, flags, td) - dev_t dev; + struct cdev *dev; unsigned long cmd; caddr_t cmdarg; int flags; @@ -610,7 +610,7 @@ static struct isa_pnp_id speaker_ids[] = { { 0 } }; -static dev_t speaker_dev; +static struct cdev *speaker_dev; static int speaker_probe(device_t dev) diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c index 630c064f537a..4ba3e0582eac 100644 --- a/sys/i4b/driver/i4b_ctl.c +++ b/sys/i4b/driver/i4b_ctl.c @@ -84,7 +84,7 @@ i4bctlattach(void *dummy) * i4bctlopen - device driver open routine *---------------------------------------------------------------------------*/ static int -i4bctlopen(dev_t dev, int flag, int fmt, struct thread *td) +i4bctlopen(struct cdev *dev, int flag, int fmt, struct thread *td) { if(minor(dev)) return (ENXIO); @@ -101,7 +101,7 @@ i4bctlopen(dev_t dev, int flag, int fmt, struct thread *td) * i4bctlclose - device driver close routine *---------------------------------------------------------------------------*/ static int -i4bctlclose(dev_t dev, int flag, int fmt, struct thread *td) +i4bctlclose(struct cdev *dev, int flag, int fmt, struct thread *td) { openflag = 0; return (0); @@ -111,7 +111,7 @@ i4bctlclose(dev_t dev, int flag, int fmt, struct thread *td) * i4bctlioctl - device driver ioctl routine *---------------------------------------------------------------------------*/ static int -i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +i4bctlioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { #if DO_I4B_DEBUG ctl_debug_t *cdbg; @@ -206,7 +206,7 @@ i4bctlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * i4bctlpoll - device driver poll routine *---------------------------------------------------------------------------*/ static int -i4bctlpoll (dev_t dev, int events, struct thread *td) +i4bctlpoll (struct cdev *dev, int events, struct thread *td) { return (ENODEV); } diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c index 5738335e3ddb..f44dcaf7f03d 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -166,7 +166,7 @@ i4brbchattach(void *dummy) * open rbch device *---------------------------------------------------------------------------*/ static int -i4brbchopen(dev_t dev, int flag, int fmt, struct thread *td) +i4brbchopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = minor(dev); @@ -191,7 +191,7 @@ i4brbchopen(dev_t dev, int flag, int fmt, struct thread *td) * close rbch device *---------------------------------------------------------------------------*/ static int -i4brbchclose(dev_t dev, int flag, int fmt, struct thread *td) +i4brbchclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = minor(dev); struct rbch_softc *sc = &rbch_softc[unit]; @@ -212,7 +212,7 @@ i4brbchclose(dev_t dev, int flag, int fmt, struct thread *td) * read from rbch device *---------------------------------------------------------------------------*/ static int -i4brbchread(dev_t dev, struct uio *uio, int ioflag) +i4brbchread(struct cdev *dev, struct uio *uio, int ioflag) { struct mbuf *m; int error = 0; @@ -314,7 +314,7 @@ i4brbchread(dev_t dev, struct uio *uio, int ioflag) * write to rbch device *---------------------------------------------------------------------------*/ static int -i4brbchwrite(dev_t dev, struct uio * uio, int ioflag) +i4brbchwrite(struct cdev *dev, struct uio * uio, int ioflag) { struct mbuf *m; int error = 0; @@ -432,7 +432,7 @@ i4brbchwrite(dev_t dev, struct uio * uio, int ioflag) * rbch device ioctl handlibg *---------------------------------------------------------------------------*/ static int -i4brbchioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +i4brbchioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int error = 0; int unit = minor(dev); @@ -529,7 +529,7 @@ i4brbchioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * device driver poll *---------------------------------------------------------------------------*/ static int -i4brbchpoll(dev_t dev, int events, struct thread *td) +i4brbchpoll(struct cdev *dev, int events, struct thread *td) { int revents = 0; /* Events we found */ int s; diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c index 703bfc1688b2..c4fc0e35b3cd 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -196,7 +196,7 @@ i4btelattach(void *dummy) * open tel device *---------------------------------------------------------------------------*/ static int -i4btelopen(dev_t dev, int flag, int fmt, struct thread *td) +i4btelopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = UNIT(dev); int func = FUNC(dev); @@ -225,7 +225,7 @@ i4btelopen(dev_t dev, int flag, int fmt, struct thread *td) * close tel device *---------------------------------------------------------------------------*/ static int -i4btelclose(dev_t dev, int flag, int fmt, struct thread *td) +i4btelclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = UNIT(dev); int func = FUNC(dev); @@ -268,7 +268,7 @@ i4btelclose(dev_t dev, int flag, int fmt, struct thread *td) * i4btelioctl - device driver ioctl routine *---------------------------------------------------------------------------*/ static int -i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +i4btelioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int unit = UNIT(dev); int func = FUNC(dev); @@ -390,7 +390,7 @@ i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * read from tel device *---------------------------------------------------------------------------*/ static int -i4btelread(dev_t dev, struct uio *uio, int ioflag) +i4btelread(struct cdev *dev, struct uio *uio, int ioflag) { int unit = UNIT(dev); int func = FUNC(dev); @@ -523,7 +523,7 @@ i4btelread(dev_t dev, struct uio *uio, int ioflag) * write to tel device *---------------------------------------------------------------------------*/ static int -i4btelwrite(dev_t dev, struct uio * uio, int ioflag) +i4btelwrite(struct cdev *dev, struct uio * uio, int ioflag) { int unit = UNIT(dev); int func = FUNC(dev); @@ -683,7 +683,7 @@ tel_tone(tel_sc_t *sc) * device driver poll *---------------------------------------------------------------------------*/ static int -i4btelpoll(dev_t dev, int events, struct thread *td) +i4btelpoll(struct cdev *dev, int events, struct thread *td) { int revents = 0; /* Events we found */ int s; diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index c5c3832d116a..e165d960f452 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -223,7 +223,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf) * open trace device *---------------------------------------------------------------------------*/ static int -i4btrcopen(dev_t dev, int flag, int fmt, struct thread *td) +i4btrcopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int x; int unit = minor(dev); @@ -250,7 +250,7 @@ i4btrcopen(dev_t dev, int flag, int fmt, struct thread *td) * close trace device *---------------------------------------------------------------------------*/ static int -i4btrcclose(dev_t dev, int flag, int fmt, struct thread *td) +i4btrcclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = minor(dev); int i, x; @@ -296,7 +296,7 @@ i4btrcclose(dev_t dev, int flag, int fmt, struct thread *td) * read from trace device *---------------------------------------------------------------------------*/ static int -i4btrcread(dev_t dev, struct uio * uio, int ioflag) +i4btrcread(struct cdev *dev, struct uio * uio, int ioflag) { struct mbuf *m; int x; @@ -346,7 +346,7 @@ i4btrcread(dev_t dev, struct uio * uio, int ioflag) * poll device *---------------------------------------------------------------------------*/ static int -i4btrcpoll(dev_t dev, int events, struct thread *td) +i4btrcpoll(struct cdev *dev, int events, struct thread *td) { return(ENODEV); } @@ -355,7 +355,7 @@ i4btrcpoll(dev_t dev, int events, struct thread *td) * device driver ioctl routine *---------------------------------------------------------------------------*/ static int -i4btrcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +i4btrcioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int error = 0; int unit = minor(dev); diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c index 7b19aec6a460..671cba40bd27 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -111,7 +111,7 @@ i4battach(void *dummy) * i4bopen - device driver open routine *---------------------------------------------------------------------------*/ static int -i4bopen(dev_t dev, int flag, int fmt, struct thread *td) +i4bopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int x; @@ -133,7 +133,7 @@ i4bopen(dev_t dev, int flag, int fmt, struct thread *td) * i4bclose - device driver close routine *---------------------------------------------------------------------------*/ static int -i4bclose(dev_t dev, int flag, int fmt, struct thread *td) +i4bclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int x = splimp(); openflag = 0; @@ -147,7 +147,7 @@ i4bclose(dev_t dev, int flag, int fmt, struct thread *td) * i4bread - device driver read routine *---------------------------------------------------------------------------*/ static int -i4bread(dev_t dev, struct uio *uio, int ioflag) +i4bread(struct cdev *dev, struct uio *uio, int ioflag) { struct mbuf *m; int x; @@ -192,7 +192,7 @@ i4bread(dev_t dev, struct uio *uio, int ioflag) * i4bioctl - device driver ioctl routine *---------------------------------------------------------------------------*/ static int -i4bioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +i4bioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { call_desc_t *cd; int error = 0; @@ -755,7 +755,7 @@ diag_done: * i4bpoll - device driver poll routine *---------------------------------------------------------------------------*/ static int -i4bpoll(dev_t dev, int events, struct thread *td) +i4bpoll(struct cdev *dev, int events, struct thread *td) { int x; diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c index 3d48bfd40fa4..d03051f58e99 100644 --- a/sys/ia64/ia64/mem.c +++ b/sys/ia64/ia64/mem.c @@ -66,9 +66,9 @@ #include #include -static dev_t memdev, kmemdev; +static struct cdev *memdev, *kmemdev; #ifdef PERFMON -static dev_t perfdev; +static struct cdev *perfdev; #endif /* PERFMON */ static d_open_t mmopen; @@ -100,7 +100,7 @@ ia64_pa_access(vm_offset_t pa) } static int -mmclose(dev_t dev, int flags, int fmt, struct thread *td) +mmclose(struct cdev *dev, int flags, int fmt, struct thread *td) { switch (minor(dev)) { #ifdef PERFMON @@ -114,7 +114,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -mmopen(dev_t dev, int flags, int fmt, struct thread *td) +mmopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int error; @@ -141,7 +141,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) /*ARGSUSED*/ static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; vm_offset_t addr, eaddr, o, v; @@ -225,7 +225,7 @@ kmemphys: * instead of going through read/write * \*******************************************************/ static int -memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { /* * /dev/mem is the only one that makes sense through this @@ -246,7 +246,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) } static int -mmioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td) +mmioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td) { switch(minor(dev)) { #ifdef PERFMON diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index d87aa7609448..eb035929b8af 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -133,7 +133,7 @@ ssccncheckc(struct consdev *cp) } static int -sscopen(dev_t dev, int flag, int mode, struct thread *td) +sscopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp; int s; @@ -176,7 +176,7 @@ sscopen(dev_t dev, int flag, int mode, struct thread *td) } static int -sscclose(dev_t dev, int flag, int mode, struct thread *td) +sscclose(struct cdev *dev, int flag, int mode, struct thread *td) { int unit = minor(dev); struct tty *tp = ssc_tp; diff --git a/sys/ia64/ia64/sscdisk.c b/sys/ia64/ia64/sscdisk.c index d831ab99db0e..726fec4140c2 100644 --- a/sys/ia64/ia64/sscdisk.c +++ b/sys/ia64/ia64/sscdisk.c @@ -85,7 +85,7 @@ struct ssc_s { LIST_ENTRY(ssc_s) list; struct bio_queue_head bio_queue; struct disk *disk; - dev_t dev; + struct cdev *dev; int busy; int fd; }; diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h index f6f6b5cba430..b2bffe8a7acc 100644 --- a/sys/ia64/include/cpu.h +++ b/sys/ia64/include/cpu.h @@ -62,7 +62,7 @@ struct clockframe { /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_WALLCLOCK 4 /* int: indicates wall CMOS clock */ diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 376c0dcfe17d..2d30d657670e 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -176,8 +176,8 @@ struct psm_softc { /* Driver status information */ int watchdog; /* watchdog timer flag */ struct callout_handle callout; /* watchdog timer call out */ struct callout_handle softcallout; /* buffer timer call out */ - dev_t dev; - dev_t bdev; + struct cdev *dev; + struct cdev *bdev; int lasterr; int cmdcount; }; @@ -1307,7 +1307,7 @@ psmdetach(device_t dev) } static int -psmopen(dev_t dev, int flag, int fmt, struct thread *td) +psmopen(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = PSM_UNIT(dev); struct psm_softc *sc; @@ -1391,7 +1391,7 @@ psmopen(dev_t dev, int flag, int fmt, struct thread *td) } static int -psmclose(dev_t dev, int flag, int fmt, struct thread *td) +psmclose(struct cdev *dev, int flag, int fmt, struct thread *td) { int unit = PSM_UNIT(dev); struct psm_softc *sc = PSM_SOFTC(unit); @@ -1533,7 +1533,7 @@ tame_mouse(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *status, unsigne } static int -psmread(dev_t dev, struct uio *uio, int flag) +psmread(struct cdev *dev, struct uio *uio, int flag) { register struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); unsigned char buf[PSM_SMALLBUFSIZE]; @@ -1681,7 +1681,7 @@ unblock_mouse_data(struct psm_softc *sc, int c) } static int -psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); mousemode_t mode; @@ -2506,7 +2506,7 @@ psmsoftintr(void *arg) } static int -psmpoll(dev_t dev, int events, struct thread *td) +psmpoll(struct cdev *dev, int events, struct thread *td) { struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); int s; diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c index fb6520416221..e1538f810e1a 100644 --- a/sys/isa/vga_isa.c +++ b/sys/isa/vga_isa.c @@ -163,37 +163,37 @@ isavga_attach(device_t dev) #ifdef FB_INSTALL_CDEV static int -isavga_open(dev_t dev, int flag, int mode, struct thread *td) +isavga_open(struct cdev *dev, int flag, int mode, struct thread *td) { return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); } static int -isavga_close(dev_t dev, int flag, int mode, struct thread *td) +isavga_close(struct cdev *dev, int flag, int mode, struct thread *td) { return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), flag, mode, td); } static int -isavga_read(dev_t dev, struct uio *uio, int flag) +isavga_read(struct cdev *dev, struct uio *uio, int flag) { return vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); } static int -isavga_write(dev_t dev, struct uio *uio, int flag) +isavga_write(struct cdev *dev, struct uio *uio, int flag) { return vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), uio, flag); } static int -isavga_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +isavga_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), cmd, arg, flag, td); } static int -isavga_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +isavga_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { return vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), offset, paddr, prot); } diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index b51f15dc4c26..687ec66515cf 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -92,7 +92,7 @@ cd9660_uninit(vfsp) */ int cd9660_ihashget(dev, inum, flags, vpp) - dev_t dev; + struct cdev *dev; ino_t inum; int flags; struct vnode **vpp; diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index 8e7d6c12d8e5..a5b228c45f06 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -113,7 +113,7 @@ void cd9660_defattr(struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); void cd9660_deftstamp(struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); -int cd9660_ihashget(dev_t, ino_t, int, struct vnode **); +int cd9660_ihashget(struct cdev *, ino_t, int, struct vnode **); void cd9660_ihashins(struct iso_node *); int cd9660_tstamp_conv7(u_char *, struct timespec *, enum ISO_FTYPE); int cd9660_tstamp_conv17(u_char *, struct timespec *); diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index ceb60f90e1c2..dc0b240dff23 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -92,7 +92,7 @@ MODULE_VERSION(cd9660, 1); * Called by vfs_mountroot when iso is going to be mounted as root. */ -static int iso_get_ssector(dev_t dev, struct thread *td); +static int iso_get_ssector(struct cdev *dev, struct thread *td); static int iso_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct iso_args *argp); @@ -103,7 +103,7 @@ static int iso_mountfs(struct vnode *devvp, struct mount *mp, */ static int iso_get_ssector(dev, td) - dev_t dev; + struct cdev *dev; struct thread *td; { struct ioc_toc_header h; @@ -272,7 +272,7 @@ iso_mountfs(devvp, mp, td, argp) register struct iso_mnt *isomp = (struct iso_mnt *)0; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; - dev_t dev = devvp->v_rdev; + struct cdev *dev = devvp->v_rdev; int error = EINVAL; int needclose = 0; int high_sierra = 0; @@ -707,7 +707,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) struct iso_node *ip; struct buf *bp; struct vnode *vp; - dev_t dev; + struct cdev *dev; int error; imp = VFSTOISOFS(mp); diff --git a/sys/isofs/cd9660/iso.h b/sys/isofs/cd9660/iso.h index 4789e50c296f..412f130b1f62 100644 --- a/sys/isofs/cd9660/iso.h +++ b/sys/isofs/cd9660/iso.h @@ -223,7 +223,7 @@ struct iso_mnt { int im_flags; struct mount *im_mountp; - dev_t im_dev; + struct cdev *im_dev; struct vnode *im_devvp; int logical_block_size; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 18ede10cbabe..216a7772c543 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include -static MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage"); +static MALLOC_DEFINE(M_DEVT, "struct cdev *", "struct cdev *storage"); /* Built at compile time from sys/conf/majors */ extern unsigned char reserved_majors[256]; @@ -56,7 +56,7 @@ extern unsigned char reserved_majors[256]; */ #define DEVT_HASH 83 -/* The number of dev_t's we can create before malloc(9) kick in. */ +/* The number of struct cdev *'s we can create before malloc(9) kick in. */ #define DEVT_STASH 50 static struct cdev devt_stash[DEVT_STASH]; @@ -69,13 +69,13 @@ static int free_devt; SYSCTL_INT(_debug, OID_AUTO, free_devt, CTLFLAG_RW, &free_devt, 0, ""); static struct mtx devmtx; -static void freedev(dev_t dev); +static void freedev(struct cdev *dev); static void devlock(void) { if (!mtx_initialized(&devmtx)) - mtx_init(&devmtx, "dev_t", NULL, MTX_DEF); + mtx_init(&devmtx, "struct cdev *", NULL, MTX_DEF); mtx_lock(&devmtx); } @@ -86,7 +86,7 @@ devunlock(void) } void -dev_ref(dev_t dev) +dev_ref(struct cdev *dev) { devlock(); dev->si_refcount++; @@ -94,7 +94,7 @@ dev_ref(dev_t dev) } void -dev_rel(dev_t dev) +dev_rel(struct cdev *dev) { devlock(); dev->si_refcount--; @@ -125,7 +125,7 @@ cdevsw_rel(struct cdevsw *csw) devunlock(); } -static dev_t makedev(int x, int y); +static struct cdev *makedev(int x, int y); int nullop(void) @@ -200,7 +200,7 @@ static struct cdevsw dead_cdevsw = { #define no_mmap (d_mmap_t *)enodev static int -no_kqfilter(dev_t dev __unused, struct knote *kn __unused) +no_kqfilter(struct cdev *dev __unused, struct knote *kn __unused) { return (1); @@ -214,7 +214,7 @@ no_strategy(struct bio *bp) } static int -no_poll(dev_t dev __unused, int events, struct thread *td __unused) +no_poll(struct cdev *dev __unused, int events, struct thread *td __unused) { /* * Return true for read/write. If the user asked for something @@ -233,7 +233,7 @@ no_poll(dev_t dev __unused, int events, struct thread *td __unused) #define no_dump (dumper_t *)enodev struct cdevsw * -devsw(dev_t dev) +devsw(struct cdev *dev) { if (dev->si_devsw != NULL) return (dev->si_devsw); @@ -241,11 +241,11 @@ devsw(dev_t dev) } /* - * dev_t and u_dev_t primitives + * struct cdev *and u_dev_t primitives */ int -major(dev_t x) +major(struct cdev *x) { if (x == NODEV) return NOUDEV; @@ -253,7 +253,7 @@ major(dev_t x) } int -minor(dev_t x) +minor(struct cdev *x) { if (x == NODEV) return NOUDEV; @@ -261,7 +261,7 @@ minor(dev_t x) } int -dev2unit(dev_t x) +dev2unit(struct cdev *x) { int i; @@ -279,7 +279,7 @@ unit2minor(int unit) return ((unit & 0xff) | ((unit << 8) & ~0xffff)); } -static dev_t +static struct cdev * allocdev(void) { static int stashed; @@ -303,7 +303,7 @@ allocdev(void) return (si); } -static dev_t +static struct cdev * makedev(int x, int y) { struct cdev *si; @@ -325,7 +325,7 @@ makedev(int x, int y) } static void -freedev(dev_t dev) +freedev(struct cdev *dev) { if (dev->si_flags & SI_STASHED) { @@ -338,14 +338,14 @@ freedev(dev_t dev) } udev_t -dev2udev(dev_t x) +dev2udev(struct cdev *x) { if (x == NODEV) return (NOUDEV); return (x->si_udev); } -dev_t +struct cdev * udev2dev(udev_t udev) { struct cdev *si; @@ -467,10 +467,10 @@ prep_cdevsw(struct cdevsw *devsw) devunlock(); } -dev_t +struct cdev * make_dev(struct cdevsw *devsw, int minornr, uid_t uid, gid_t gid, int perms, const char *fmt, ...) { - dev_t dev; + struct cdev *dev; va_list ap; int i; @@ -515,9 +515,9 @@ make_dev(struct cdevsw *devsw, int minornr, uid_t uid, gid_t gid, int perms, con } int -dev_named(dev_t pdev, const char *name) +dev_named(struct cdev *pdev, const char *name) { - dev_t cdev; + struct cdev *cdev; if (strcmp(devtoname(pdev), name) == 0) return (1); @@ -528,7 +528,7 @@ dev_named(dev_t pdev, const char *name) } void -dev_depends(dev_t pdev, dev_t cdev) +dev_depends(struct cdev *pdev, struct cdev *cdev) { devlock(); @@ -538,10 +538,10 @@ dev_depends(dev_t pdev, dev_t cdev) devunlock(); } -dev_t -make_dev_alias(dev_t pdev, const char *fmt, ...) +struct cdev * +make_dev_alias(struct cdev *pdev, const char *fmt, ...) { - dev_t dev; + struct cdev *dev; va_list ap; int i; @@ -564,7 +564,7 @@ make_dev_alias(dev_t pdev, const char *fmt, ...) } static void -idestroy_dev(dev_t dev) +idestroy_dev(struct cdev *dev) { if (!(dev->si_flags & SI_NAMED)) { printf( "WARNING: Driver mistake: destroy_dev on %d/%d\n", @@ -597,7 +597,7 @@ idestroy_dev(dev_t dev) /* Remove from cdevsw list */ LIST_REMOVE(dev, si_list); - /* If cdevsw has no dev_t's, clean it */ + /* If cdevsw has no struct cdev *'s, clean it */ if (LIST_EMPTY(&dev->si_devsw->d_devs)) fini_cdevsw(dev->si_devsw); @@ -616,7 +616,7 @@ idestroy_dev(dev_t dev) } void -destroy_dev(dev_t dev) +destroy_dev(struct cdev *dev) { devlock(); @@ -625,7 +625,7 @@ destroy_dev(dev_t dev) } const char * -devtoname(dev_t dev) +devtoname(struct cdev *dev) { char *p; int mynor; @@ -681,7 +681,7 @@ dev_stdclone(char *name, char **namep, const char *stem, int *unit) * we do "on-demand" devices, using rman or other "private" methods * will be very tricky to lock down properly once we lock down this file. * - * Instead we give the drivers these routines which puts the dev_t's that + * Instead we give the drivers these routines which puts the struct cdev *'s that * are to be managed on their own list, and gives the driver the ability * to ask for the first free unit number or a given specified unit number. * @@ -703,10 +703,10 @@ clone_setup(struct clonedevs **cdp) } int -clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, dev_t *dp, u_int extra) +clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev **dp, u_int extra) { struct clonedevs *cd; - dev_t dev, dl, de; + struct cdev *dev, *dl, *de; int unit, low, u; KASSERT(*cdp != NULL, @@ -766,12 +766,12 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, dev_t *dp, u_i /* * Kill everything still on the list. The driver should already have - * disposed of any softc hung of the dev_t's at this time. + * disposed of any softc hung of the struct cdev *'s at this time. */ void clone_cleanup(struct clonedevs **cdp) { - dev_t dev, tdev; + struct cdev *dev, *tdev; struct clonedevs *cd; cd = *cdp; @@ -787,7 +787,7 @@ clone_cleanup(struct clonedevs **cdp) } /* - * Helper sysctl for devname(3). We're given a {u}dev_t and return + * Helper sysctl for devname(3). We're given a {u}struct cdev *and return * the name, if any, registered by the device driver. */ static int @@ -795,7 +795,7 @@ sysctl_devname(SYSCTL_HANDLER_ARGS) { int error; udev_t ud; - dev_t dev; + struct cdev *dev; error = SYSCTL_IN(req, &ud, sizeof (ud)); if (error) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 8e955ca72c1f..c61e0ed457bb 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2153,7 +2153,7 @@ done2: /* ARGSUSED */ static int fdopen(dev, mode, type, td) - dev_t dev; + struct cdev *dev; int mode, type; struct thread *td; { @@ -2393,7 +2393,7 @@ SYSCTL_INT(_kern, OID_AUTO, openfiles, CTLFLAG_RD, static void fildesc_drvinit(void *unused) { - dev_t dev; + struct cdev *dev; dev = make_dev(&fildesc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "fd/0"); make_dev_alias(dev, "stdin"); diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 83b7b822922f..c2c9b3f198b9 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include int -physio(dev_t dev, struct uio *uio, int ioflag) +physio(struct cdev *dev, struct uio *uio, int ioflag) { int i; int error; diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b0271f9cca8e..fd2e9d4b2068 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -390,7 +390,7 @@ static struct dev_softc struct proc *async_proc; } devsoftc; -static dev_t devctl_dev; +static struct cdev *devctl_dev; static void devinit(void) @@ -403,7 +403,7 @@ devinit(void) } static int -devopen(dev_t dev, int oflags, int devtype, d_thread_t *td) +devopen(struct cdev *dev, int oflags, int devtype, d_thread_t *td) { if (devsoftc.inuse) return (EBUSY); @@ -415,7 +415,7 @@ devopen(dev_t dev, int oflags, int devtype, d_thread_t *td) } static int -devclose(dev_t dev, int fflag, int devtype, d_thread_t *td) +devclose(struct cdev *dev, int fflag, int devtype, d_thread_t *td) { devsoftc.inuse = 0; mtx_lock(&devsoftc.mtx); @@ -434,7 +434,7 @@ devclose(dev_t dev, int fflag, int devtype, d_thread_t *td) * programs are expected to cope. */ static int -devread(dev_t dev, struct uio *uio, int ioflag) +devread(struct cdev *dev, struct uio *uio, int ioflag) { struct dev_event_info *n1; int rv; @@ -464,7 +464,7 @@ devread(dev_t dev, struct uio *uio, int ioflag) } static int -devioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) +devioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) { switch (cmd) { @@ -494,7 +494,7 @@ devioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) } static int -devpoll(dev_t dev, int events, d_thread_t *td) +devpoll(struct cdev *dev, int events, d_thread_t *td) { int revents = 0; diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 04abe89494c3..f7fda10fefce 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -453,7 +453,7 @@ static TAILQ_HEAD(, statspage) pagelist = TAILQ_HEAD_INITIALIZER(pagelist); static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics"); static int -devstat_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +devstat_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct statspage *spp; diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index a2323357141c..bdb18fdabf14 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -92,7 +92,7 @@ SYSCTL_INT(_kern, OID_AUTO, log_wakeups_per_second, CTLFLAG_RW, /*ARGSUSED*/ static int -logopen(dev_t dev, int flags, int mode, struct thread *td) +logopen(struct cdev *dev, int flags, int mode, struct thread *td) { if (log_open) return (EBUSY); @@ -110,7 +110,7 @@ logopen(dev_t dev, int flags, int mode, struct thread *td) /*ARGSUSED*/ static int -logclose(dev_t dev, int flag, int mode, struct thread *td) +logclose(struct cdev *dev, int flag, int mode, struct thread *td) { log_open = 0; @@ -122,7 +122,7 @@ logclose(dev_t dev, int flag, int mode, struct thread *td) /*ARGSUSED*/ static int -logread(dev_t dev, struct uio *uio, int flag) +logread(struct cdev *dev, struct uio *uio, int flag) { char buf[128]; struct msgbuf *mbp = msgbufp; @@ -157,7 +157,7 @@ logread(dev_t dev, struct uio *uio, int flag) /*ARGSUSED*/ static int -logpoll(dev_t dev, int events, struct thread *td) +logpoll(struct cdev *dev, int events, struct thread *td) { int s; int revents = 0; @@ -203,7 +203,7 @@ logtimeout(void *arg) /*ARGSUSED*/ static int -logioctl(dev_t dev, u_long com, caddr_t data, int flag, struct thread *td) +logioctl(struct cdev *dev, u_long com, caddr_t data, int flag, struct thread *td) { switch (com) { diff --git a/sys/kern/tty.c b/sys/kern/tty.c index aeecbb848669..6c5f4d5714d5 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -227,7 +227,7 @@ SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait, * Initial open of tty, or (re)entry to standard tty line discipline. */ int -ttyopen(dev_t device, struct tty *tp) +ttyopen(struct cdev *device, struct tty *tp) { int s; @@ -1015,7 +1015,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) } case TIOCSETD: { /* set line discipline */ int t = *(int *)data; - dev_t device = tp->t_dev; + struct cdev *device = tp->t_dev; if ((u_int)t >= nlinesw) return (ENXIO); @@ -1140,7 +1140,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) } int -ttypoll(dev_t dev, int events, struct thread *td) +ttypoll(struct cdev *dev, int events, struct thread *td) { int s; int revents = 0; @@ -1180,7 +1180,7 @@ static struct filterops ttywrite_filtops = { 1, NULL, filt_ttywdetach, filt_ttywrite }; int -ttykqfilter(dev_t dev, struct knote *kn) +ttykqfilter(struct cdev *dev, struct knote *kn) { struct tty *tp; struct klist *klist; @@ -1216,7 +1216,7 @@ ttykqfilter(dev_t dev, struct knote *kn) static void filt_ttyrdetach(struct knote *kn) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((struct cdev *)kn->kn_hook)->si_tty; int s = spltty(); SLIST_REMOVE(&tp->t_rsel.si_note, kn, knote, kn_selnext); @@ -1226,7 +1226,7 @@ filt_ttyrdetach(struct knote *kn) static int filt_ttyread(struct knote *kn, long hint) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((struct cdev *)kn->kn_hook)->si_tty; kn->kn_data = ttnread(tp); if (ISSET(tp->t_state, TS_ZOMBIE)) { @@ -1239,7 +1239,7 @@ filt_ttyread(struct knote *kn, long hint) static void filt_ttywdetach(struct knote *kn) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((struct cdev *)kn->kn_hook)->si_tty; int s = spltty(); SLIST_REMOVE(&tp->t_wsel.si_note, kn, knote, kn_selnext); @@ -1249,7 +1249,7 @@ filt_ttywdetach(struct knote *kn) static int filt_ttywrite(struct knote *kn, long hint) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((struct cdev *)kn->kn_hook)->si_tty; kn->kn_data = tp->t_outq.c_cc; if (ISSET(tp->t_state, TS_ZOMBIE)) @@ -2789,7 +2789,7 @@ nottystop(struct tty *tp, int rw) } int -ttyread(dev_t dev, struct uio *uio, int flag) +ttyread(struct cdev *dev, struct uio *uio, int flag) { struct tty *tp; @@ -2804,7 +2804,7 @@ ttyread(dev_t dev, struct uio *uio, int flag) } int -ttywrite(dev_t dev, struct uio *uio, int flag) +ttywrite(struct cdev *dev, struct uio *uio, int flag) { struct tty *tp; @@ -2819,7 +2819,7 @@ ttywrite(dev_t dev, struct uio *uio, int flag) } int -ttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +ttyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct tty *tp; int error; diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 827fe424a8c3..488e383d4ae1 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -156,7 +156,7 @@ ldisc_deregister(int discipline) */ static int -l_noopen(dev_t dev, struct tty *tp) +l_noopen(struct cdev *dev, struct tty *tp) { return (ENODEV); diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index 2c38d56e479a..a9bea7cea674 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -105,7 +105,7 @@ static STAILQ_HEAD(, cn_device) cn_devlist = static udev_t cn_udev_t; SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLFLAG_RD, - &cn_udev_t, sizeof cn_udev_t, "T,dev_t", ""); + &cn_udev_t, sizeof cn_udev_t, "T,struct cdev *", ""); int cons_avail_mask = 0; /* Bit mask. Each registered low level console * which is currently unavailable for inpit @@ -388,7 +388,7 @@ cn_devopen(struct cn_device *cnd, struct thread *td, int forceopen) char path[CNDEVPATHMAX]; struct nameidata nd; struct vnode *vp; - dev_t dev; + struct cdev *dev; int error; if ((vp = cnd->cnd_vp) != NULL) { @@ -414,7 +414,7 @@ cn_devopen(struct cn_device *cnd, struct thread *td, int forceopen) } static int -cnopen(dev_t dev, int flag, int mode, struct thread *td) +cnopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct cn_device *cnd; @@ -428,7 +428,7 @@ cnopen(dev_t dev, int flag, int mode, struct thread *td) } static int -cnclose(dev_t dev, int flag, int mode, struct thread *td) +cnclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct cn_device *cnd; struct vnode *vp; @@ -444,7 +444,7 @@ cnclose(dev_t dev, int flag, int mode, struct thread *td) } static int -cnread(dev_t dev, struct uio *uio, int flag) +cnread(struct cdev *dev, struct uio *uio, int flag) { struct cn_device *cnd; @@ -456,7 +456,7 @@ cnread(dev_t dev, struct uio *uio, int flag) } static int -cnwrite(dev_t dev, struct uio *uio, int flag) +cnwrite(struct cdev *dev, struct uio *uio, int flag) { struct cn_device *cnd; @@ -477,7 +477,7 @@ done: } static int -cnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +cnioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct cn_device *cnd; int error; @@ -507,7 +507,7 @@ cnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * poll/kqfilter do not appear to be correct */ static int -cnpoll(dev_t dev, int events, struct thread *td) +cnpoll(struct cdev *dev, int events, struct thread *td) { struct cn_device *cnd; @@ -521,7 +521,7 @@ cnpoll(dev_t dev, int events, struct thread *td) } static int -cnkqfilter(dev_t dev, struct knote *kn) +cnkqfilter(struct cdev *dev, struct knote *kn) { struct cn_device *cnd; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 96ccbf482bc3..b4082a384690 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -61,7 +61,7 @@ static MALLOC_DEFINE(M_PTY, "ptys", "pty data structures"); static void ptsstart(struct tty *tp); static void ptsstop(struct tty *tp, int rw); static void ptcwakeup(struct tty *tp, int flag); -static dev_t ptyinit(dev_t cdev); +static struct cdev *ptyinit(struct cdev *cdev); static d_open_t ptsopen; static d_close_t ptsclose; @@ -109,7 +109,7 @@ struct ptsc { u_char pt_send; u_char pt_ucntl; struct tty *pt_tty; - dev_t devs, devc; + struct cdev *devs, *devc; struct prison *pt_prison; }; @@ -133,10 +133,10 @@ static char *names = "pqrsPQRS"; * XXX: define and add mapping of upper minor bits to allow more * than 256 ptys. */ -static dev_t -ptyinit(dev_t devc) +static struct cdev * +ptyinit(struct cdev *devc) { - dev_t devs; + struct cdev *devs; struct ptsc *pt; int n; @@ -161,7 +161,7 @@ ptyinit(dev_t devc) /*ARGSUSED*/ static int -ptsopen(dev_t dev, int flag, int devtype, struct thread *td) +ptsopen(struct cdev *dev, int flag, int devtype, struct thread *td) { struct tty *tp; int error; @@ -199,7 +199,7 @@ ptsopen(dev_t dev, int flag, int devtype, struct thread *td) } static int -ptsclose(dev_t dev, int flag, int mode, struct thread *td) +ptsclose(struct cdev *dev, int flag, int mode, struct thread *td) { struct tty *tp; int err; @@ -211,7 +211,7 @@ ptsclose(dev_t dev, int flag, int mode, struct thread *td) } static int -ptsread(dev_t dev, struct uio *uio, int flag) +ptsread(struct cdev *dev, struct uio *uio, int flag) { struct thread *td = curthread; struct proc *p = td->td_proc; @@ -274,7 +274,7 @@ again: * indirectly, when tty driver calls ptsstart. */ static int -ptswrite(dev_t dev, struct uio *uio, int flag) +ptswrite(struct cdev *dev, struct uio *uio, int flag) { struct tty *tp; @@ -318,7 +318,7 @@ ptcwakeup(struct tty *tp, int flag) } static int -ptcopen(dev_t dev, int flag, int devtype, struct thread *td) +ptcopen(struct cdev *dev, int flag, int devtype, struct thread *td) { struct tty *tp; struct ptsc *pt; @@ -344,7 +344,7 @@ ptcopen(dev_t dev, int flag, int devtype, struct thread *td) } static int -ptcclose(dev_t dev, int flags, int fmt, struct thread *td) +ptcclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct tty *tp; @@ -370,7 +370,7 @@ ptcclose(dev_t dev, int flags, int fmt, struct thread *td) } static int -ptcread(dev_t dev, struct uio *uio, int flag) +ptcread(struct cdev *dev, struct uio *uio, int flag) { struct tty *tp = dev->si_tty; struct ptsc *pt = dev->si_drv1; @@ -450,7 +450,7 @@ ptsstop(struct tty *tp, int flush) } static int -ptcpoll(dev_t dev, int events, struct thread *td) +ptcpoll(struct cdev *dev, int events, struct thread *td) { struct tty *tp = dev->si_tty; struct ptsc *pt = dev->si_drv1; @@ -498,7 +498,7 @@ ptcpoll(dev_t dev, int events, struct thread *td) } static int -ptcwrite(dev_t dev, struct uio *uio, int flag) +ptcwrite(struct cdev *dev, struct uio *uio, int flag) { struct tty *tp = dev->si_tty; u_char *cp = 0; @@ -606,7 +606,7 @@ block: /*ARGSUSED*/ static int -ptyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +ptyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct tty *tp = dev->si_tty; struct ptsc *pt = dev->si_drv1; @@ -773,7 +773,7 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) } static void -pty_clone(void *arg, char *name, int namelen, dev_t *dev) +pty_clone(void *arg, char *name, int namelen, struct cdev **dev) { int u; diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 96fa84ba27fb..85b0eacba66e 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -45,17 +45,17 @@ static struct cdevsw ctty_cdevsw = { .d_flags = D_TTY | D_NEEDGIANT, }; -static dev_t ctty; +static struct cdev *ctty; static int -cttyopen(dev_t dev, int flag, int mode, struct thread *td) +cttyopen(struct cdev *dev, int flag, int mode, struct thread *td) { return (ENXIO); } static void -ctty_clone(void *arg, char *name, int namelen, dev_t *dev) +ctty_clone(void *arg, char *name, int namelen, struct cdev **dev) { if (*dev != NODEV) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 30daba78c71e..19b672621857 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3083,7 +3083,7 @@ dev_strategy(struct buf *bp) bp->b_io.bio_caller2 = bp; csw = devsw(bp->b_io.bio_dev); KASSERT(bp->b_io.bio_dev->si_refcount > 0, - ("dev_strategy on un-referenced dev_t (%s)", + ("dev_strategy on un-referenced struct cdev *(%s)", devtoname(bp->b_io.bio_dev))); cdevsw_ref(csw); (*devsw(bp->b_io.bio_dev)->d_strategy)(&bp->b_io); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 229309dd44fe..8eaa6e9ce8b9 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -147,7 +147,7 @@ static char *cdrom_rootdevnames[] = { /* legacy find-root code */ char *rootdevnames[2] = {NULL, NULL}; static int setrootbyname(char *name); -dev_t rootdev = NODEV; +struct cdev *rootdev = NODEV; /* * Has to be dynamic as the value of rootdev can change; however, it can't @@ -1445,13 +1445,13 @@ gets(char *cp) } /* - * Convert a given name to the dev_t of the disk-like device + * Convert a given name to the struct cdev *of the disk-like device * it refers to. */ -dev_t +struct cdev * getdiskbyname(char *name) { char *cp; - dev_t dev; + struct cdev *dev; cp = name; if (!bcmp(cp, "/dev/", 5)) @@ -1469,7 +1469,7 @@ getdiskbyname(char *name) { static int setrootbyname(char *name) { - dev_t diskdev; + struct cdev *diskdev; diskdev = getdiskbyname(name); if (diskdev != NODEV) { @@ -1480,11 +1480,11 @@ setrootbyname(char *name) return (1); } -/* Show the dev_t for a disk specified by name */ +/* Show the struct cdev *for a disk specified by name */ #ifdef DDB DB_SHOW_COMMAND(disk, db_getdiskbyname) { - dev_t dev; + struct cdev *dev; if (modif[0] == '\0') { db_error("usage: show disk/devicename"); @@ -1492,7 +1492,7 @@ DB_SHOW_COMMAND(disk, db_getdiskbyname) } dev = getdiskbyname(modif); if (dev != NODEV) - db_printf("dev_t = %p\n", dev); + db_printf("struct cdev *= %p\n", dev); else db_printf("No disk device matched.\n"); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2caad255e853..0346fa2130d1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); -static void addalias(struct vnode *vp, dev_t nvp_rdev); +static void addalias(struct vnode *vp, struct cdev *nvp_rdev); static void insmntque(struct vnode *vp, struct mount *mp); static void vclean(struct vnode *vp, int flags, struct thread *td); static void vlruvp(struct vnode *vp); @@ -1737,7 +1737,7 @@ reassignbuf(bp, newvp) */ int bdevvp(dev, vpp) - dev_t dev; + struct cdev *dev; struct vnode **vpp; { register struct vnode *vp; @@ -1776,7 +1776,7 @@ v_incr_usecount(struct vnode *vp, int delta) } /* - * Add vnode to the alias list hung off the dev_t. + * Add vnode to the alias list hung off the struct cdev *. * * The reason for this gunk is that multiple vnodes can reference * the same physical device, so checking vp->v_usecount to see @@ -1790,7 +1790,7 @@ addaliasu(nvp, nvp_rdev) { struct vnode *ovp; vop_t **ops; - dev_t dev; + struct cdev *dev; if (nvp->v_type == VBLK) return (nvp); @@ -1836,11 +1836,11 @@ addaliasu(nvp, nvp_rdev) } /* This is a local helper function that do the same as addaliasu, but for a - * dev_t instead of an udev_t. */ + * struct cdev *instead of an udev_t. */ static void addalias(nvp, dev) struct vnode *nvp; - dev_t dev; + struct cdev *dev; { KASSERT(nvp->v_type == VCHR, ("addalias on non-special vnode")); @@ -2440,7 +2440,7 @@ vop_revoke(ap) } */ *ap; { struct vnode *vp, *vq; - dev_t dev; + struct cdev *dev; KASSERT((ap->a_flags & REVOKEALL) != 0, ("vop_revoke")); vp = ap->a_vp; @@ -2622,7 +2622,7 @@ vgonel(vp, td) */ int vfinddev(dev, vpp) - dev_t dev; + struct cdev *dev; struct vnode **vpp; { struct vnode *vp; @@ -2653,11 +2653,11 @@ vcount(vp) } /* - * Same as above, but using the dev_t as argument + * Same as above, but using the struct cdev *as argument */ int count_dev(dev) - dev_t dev; + struct cdev *dev; { int count; @@ -3399,9 +3399,9 @@ sync_reclaim(ap) } /* - * extract the dev_t from a VCHR + * extract the struct cdev *from a VCHR */ -dev_t +struct cdev * vn_todev(vp) struct vnode *vp; { diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8bb0fe5481fe..4b3cf45fa9d0 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -319,7 +319,7 @@ bpf_detachd(d) /* ARGSUSED */ static int bpfopen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -364,7 +364,7 @@ bpfopen(dev, flags, fmt, td) /* ARGSUSED */ static int bpfclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -408,7 +408,7 @@ bpfclose(dev, flags, fmt, td) */ static int bpfread(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -545,7 +545,7 @@ bpf_timed_out(arg) static int bpfwrite(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -633,7 +633,7 @@ reset_d(d) /* ARGSUSED */ static int bpfioctl(dev, cmd, addr, flags, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flags; @@ -1043,7 +1043,7 @@ bpf_setif(d, ifr) */ static int bpfpoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { @@ -1079,7 +1079,7 @@ bpfpoll(dev, events, td) */ int bpfkqfilter(dev, kn) - dev_t dev; + struct cdev *dev; struct knote *kn; { struct bpf_d *d = (struct bpf_d *)dev->si_drv1; @@ -1567,14 +1567,14 @@ bpf_setdlt(d, dlt) static void bpf_drvinit(void *unused); -static void bpf_clone(void *arg, char *name, int namelen, dev_t *dev); +static void bpf_clone(void *arg, char *name, int namelen, struct cdev **dev); static void bpf_clone(arg, name, namelen, dev) void *arg; char *name; int namelen; - dev_t *dev; + struct cdev **dev; { int u; diff --git a/sys/net/if.c b/sys/net/if.c index 79420656abc1..2b3805e1fe3a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -144,19 +144,19 @@ static struct cdevsw net_cdevsw = { }; static int -netopen(dev_t dev, int flag, int mode, struct thread *td) +netopen(struct cdev *dev, int flag, int mode, struct thread *td) { return (0); } static int -netclose(dev_t dev, int flags, int fmt, struct thread *td) +netclose(struct cdev *dev, int flags, int fmt, struct thread *td) { return (0); } static int -netioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +netioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct ifnet *ifp; int error, idx; @@ -185,7 +185,7 @@ netioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) } static int -netkqfilter(dev_t dev, struct knote *kn) +netkqfilter(struct cdev *dev, struct knote *kn) { struct klist *klist; struct ifnet *ifp; diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 5037742ae596..c05ecd02c2d6 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -179,7 +179,7 @@ static l_close_t slclose; static l_rint_t slinput; static l_ioctl_t sltioctl; static int slioctl(struct ifnet *, u_long, caddr_t); -static int slopen(dev_t, struct tty *); +static int slopen(struct cdev *, struct tty *); static int sloutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static int slstart(struct tty *); @@ -340,7 +340,7 @@ slcreate() /* ARGSUSED */ static int slopen(dev, tp) - dev_t dev; + struct cdev *dev; register struct tty *tp; { register struct sl_softc *sc; diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index a9ea72553b6d..7f2f8564277e 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -81,8 +81,8 @@ static int tapmodevent(module_t, int, void *); /* device */ -static void tapclone(void *, char *, int, dev_t *); -static void tapcreate(dev_t); +static void tapclone(void *, char *, int, struct cdev **); +static void tapcreate(struct cdev *); /* network interface */ static void tapifstart(struct ifnet *); @@ -222,7 +222,7 @@ tapclone(arg, name, namelen, dev) void *arg; char *name; int namelen; - dev_t *dev; + struct cdev **dev; { u_int extra; int i, unit; @@ -264,7 +264,7 @@ tapclone(arg, name, namelen, dev) */ static void tapcreate(dev) - dev_t dev; + struct cdev *dev; { struct ifnet *ifp = NULL; struct tap_softc *tp = NULL; @@ -334,7 +334,7 @@ tapcreate(dev) */ static int tapopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -384,7 +384,7 @@ tapopen(dev, flag, mode, td) */ static int tapclose(dev, foo, bar, td) - dev_t dev; + struct cdev *dev; int foo; int bar; struct thread *td; @@ -588,7 +588,7 @@ tapifstart(ifp) */ static int tapioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; @@ -712,7 +712,7 @@ tapioctl(dev, cmd, data, flag, td) */ static int tapread(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -786,7 +786,7 @@ tapread(dev, uio, flag) */ static int tapwrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -858,7 +858,7 @@ tapwrite(dev, uio, flag) */ static int tappoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { diff --git a/sys/net/if_tapvar.h b/sys/net/if_tapvar.h index acd4528e166b..512a33d7e95c 100644 --- a/sys/net/if_tapvar.h +++ b/sys/net/if_tapvar.h @@ -63,7 +63,7 @@ struct tap_softc { struct selinfo tap_rsel; /* read select */ SLIST_ENTRY(tap_softc) tap_next; /* next device in chain */ - dev_t tap_dev; + struct cdev *tap_dev; struct mtx tap_mtx; /* per-softc mutex */ }; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 90eafeb3af76..975b1c0474d0 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -62,7 +62,7 @@ */ struct tun_softc { TAILQ_ENTRY(tun_softc) tun_list; - dev_t tun_dev; + struct cdev *tun_dev; u_short tun_flags; /* misc flags */ #define TUN_OPEN 0x0001 #define TUN_INITED 0x0002 @@ -105,8 +105,8 @@ static struct clonedevs *tunclones; static TAILQ_HEAD(,tun_softc) tunhead = TAILQ_HEAD_INITIALIZER(tunhead); SYSCTL_INT(_debug, OID_AUTO, if_tun_debug, CTLFLAG_RW, &tundebug, 0, ""); -static void tunclone(void *arg, char *name, int namelen, dev_t *dev); -static void tuncreate(dev_t dev); +static void tunclone(void *arg, char *name, int namelen, struct cdev **dev); +static void tuncreate(struct cdev *dev); static int tunifioctl(struct ifnet *, u_long, caddr_t); static int tuninit(struct ifnet *); static int tunmodevent(module_t, int, void *); @@ -134,7 +134,7 @@ static struct cdevsw tun_cdevsw = { }; static void -tunclone(void *arg, char *name, int namelen, dev_t *dev) +tunclone(void *arg, char *name, int namelen, struct cdev **dev) { int u, i; @@ -151,7 +151,7 @@ tunclone(void *arg, char *name, int namelen, dev_t *dev) /* find any existing device, or allocate new unit number */ i = clone_create(&tunclones, &tun_cdevsw, &u, dev, 0); if (i) { - /* No preexisting dev_t, create one */ + /* No preexisting struct cdev *, create one */ *dev = make_dev(&tun_cdevsw, unit2minor(u), UID_UUCP, GID_DIALER, 0600, "tun%d", u); if (*dev != NULL) @@ -162,7 +162,7 @@ tunclone(void *arg, char *name, int namelen, dev_t *dev) static void tun_destroy(struct tun_softc *tp) { - dev_t dev; + struct cdev *dev; /* Unlocked read. */ KASSERT((tp->tun_flags & TUN_OPEN) == 0, @@ -235,7 +235,7 @@ tunstart(struct ifnet *ifp) } static void -tuncreate(dev_t dev) +tuncreate(struct cdev *dev) { struct tun_softc *sc; struct ifnet *ifp; @@ -266,7 +266,7 @@ tuncreate(dev_t dev) } static int -tunopen(dev_t dev, int flag, int mode, struct thread *td) +tunopen(struct cdev *dev, int flag, int mode, struct thread *td) { struct ifnet *ifp; struct tun_softc *tp; @@ -307,7 +307,7 @@ tunopen(dev_t dev, int flag, int mode, struct thread *td) * routing info */ static int -tunclose(dev_t dev, int foo, int bar, struct thread *td) +tunclose(struct cdev *dev, int foo, int bar, struct thread *td) { struct tun_softc *tp; struct ifnet *ifp; @@ -535,7 +535,7 @@ tunoutput( * the cdevsw interface is now pretty minimal. */ static int -tunioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int s; int error; @@ -658,7 +658,7 @@ tunioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * least as much of a packet as can be read. */ static int -tunread(dev_t dev, struct uio *uio, int flag) +tunread(struct cdev *dev, struct uio *uio, int flag) { struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tun_if; @@ -714,7 +714,7 @@ tunread(dev_t dev, struct uio *uio, int flag) * the cdevsw write interface - an atomic write is a packet - or else! */ static int -tunwrite(dev_t dev, struct uio *uio, int flag) +tunwrite(struct cdev *dev, struct uio *uio, int flag) { struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tun_if; @@ -829,7 +829,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag) * anyway, it either accepts the packet or drops it. */ static int -tunpoll(dev_t dev, int events, struct thread *td) +tunpoll(struct cdev *dev, int events, struct thread *td) { int s; struct tun_softc *tp = dev->si_drv1; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 68cebe6f1837..9fd82c7aa0c6 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -643,7 +643,7 @@ extern struct mtx ifnet_lock; struct ifindex_entry { struct ifnet *ife_ifnet; struct ifaddr *ife_ifnet_addr; - dev_t ife_dev; + struct cdev *ife_dev; }; #define ifnet_byindex(idx) ifindex_table[(idx)].ife_ifnet diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 135ddebe0358..0270acbb95bf 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -93,7 +93,7 @@ #include #include -static int pppopen(dev_t dev, struct tty *tp); +static int pppopen(struct cdev *dev, struct tty *tp); static int pppclose(struct tty *tp, int flag); static int pppread(struct tty *tp, struct uio *uio, int flag); static int pppwrite(struct tty *tp, struct uio *uio, int flag); @@ -173,7 +173,7 @@ pppasyncdetach() /* ARGSUSED */ static int pppopen(dev, tp) - dev_t dev; + struct cdev *dev; register struct tty *tp; { struct thread *td = curthread; /* XXX */ diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c index 3aeb21a58520..27b66414a9f7 100644 --- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c +++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c @@ -78,7 +78,7 @@ MALLOC_DEFINE(M_NETGRAPH_H4, "netgraph_h4", "Netgraph Bluetooth H4 node"); #endif /* NG_SEPARATE_MALLOC */ /* Line discipline methods */ -static int ng_h4_open (dev_t, struct tty *); +static int ng_h4_open (struct cdev *, struct tty *); static int ng_h4_close (struct tty *, int); static int ng_h4_read (struct tty *, struct uio *, int); static int ng_h4_write (struct tty *, struct uio *, int); @@ -147,7 +147,7 @@ static int ng_h4_node = 0; */ static int -ng_h4_open(dev_t dev, struct tty *tp) +ng_h4_open(struct cdev *dev, struct tty *tp) { char name[NG_NODESIZ]; ng_h4_info_p sc = NULL; diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index 5c48c53734cb..c28e772351a1 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -2291,7 +2291,7 @@ done: */ Static int -ubt_open(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubt_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { ubt_softc_p sc = NULL; int ep = UBT_ENDPOINT(dev); @@ -2331,7 +2331,7 @@ ubt_open(dev_t dev, int flag, int mode, usb_proc_ptr p) */ Static int -ubt_close(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubt_close(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { ubt_softc_p sc = NULL; int ep = UBT_ENDPOINT(dev); @@ -2368,7 +2368,7 @@ ubt_close(dev_t dev, int flag, int mode, usb_proc_ptr p) */ Static int -ubt_read(dev_t dev, struct uio *uio, int flag) +ubt_read(struct cdev *dev, struct uio *uio, int flag) { ubt_softc_p sc = NULL; int error = 0, n, tn, ep = UBT_ENDPOINT(dev); @@ -2436,7 +2436,7 @@ ubt_read(dev_t dev, struct uio *uio, int flag) */ Static int -ubt_write(dev_t dev, struct uio *uio, int flag) +ubt_write(struct cdev *dev, struct uio *uio, int flag) { ubt_softc_p sc = NULL; int error = 0, n, ep = UBT_ENDPOINT(dev); @@ -2495,7 +2495,7 @@ ubt_write(dev_t dev, struct uio *uio, int flag) */ Static int -ubt_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +ubt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { ubt_softc_p sc = NULL; int len, error = 0, ep = UBT_ENDPOINT(dev); @@ -2613,7 +2613,7 @@ ret: */ Static int -ubt_poll(dev_t dev, int events, usb_proc_ptr p) +ubt_poll(struct cdev *dev, int events, usb_proc_ptr p) { ubt_softc_p sc = NULL; int revents = 0, ep = UBT_ENDPOINT(dev); diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h index 3fc33227d463..fef818977ef0 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h @@ -139,9 +139,9 @@ struct ubt_softc { hook_p sc_hook; /* upstream hook */ /* Device specific */ - dev_t sc_ctrl_dev; /* control device */ - dev_t sc_intr_dev; /* interrupt device */ - dev_t sc_bulk_dev; /* bulk device */ + struct cdev *sc_ctrl_dev; /* control device */ + struct cdev *sc_intr_dev; /* interrupt device */ + struct cdev *sc_bulk_dev; /* bulk device */ int sc_refcnt; /* device ref. count */ int sc_dying; diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c index 19e18014c0ae..f957cf52e8ed 100644 --- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c +++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c @@ -61,9 +61,9 @@ struct ubtbcmfw_softc { USBBASEDEVICE sc_dev; /* base device */ usbd_device_handle sc_udev; /* USB device handle */ - dev_t sc_ctrl_dev; /* control device */ - dev_t sc_intr_in_dev; /* interrupt device */ - dev_t sc_bulk_out_dev; /* bulk device */ + struct cdev *sc_ctrl_dev; /* control device */ + struct cdev *sc_intr_in_dev; /* interrupt device */ + struct cdev *sc_bulk_out_dev; /* bulk device */ usbd_pipe_handle sc_intr_in_pipe; /* interrupt pipe */ usbd_pipe_handle sc_bulk_out_pipe; /* bulk out pipe */ int sc_flags; @@ -264,7 +264,7 @@ USB_DETACH(ubtbcmfw) */ Static int -ubtbcmfw_open(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubtbcmfw_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { ubtbcmfw_softc_p sc = NULL; int error = 0; @@ -316,7 +316,7 @@ ubtbcmfw_open(dev_t dev, int flag, int mode, usb_proc_ptr p) */ Static int -ubtbcmfw_close(dev_t dev, int flag, int mode, usb_proc_ptr p) +ubtbcmfw_close(struct cdev *dev, int flag, int mode, usb_proc_ptr p) { ubtbcmfw_softc_p sc = NULL; @@ -353,7 +353,7 @@ ubtbcmfw_close(dev_t dev, int flag, int mode, usb_proc_ptr p) */ Static int -ubtbcmfw_read(dev_t dev, struct uio *uio, int flag) +ubtbcmfw_read(struct cdev *dev, struct uio *uio, int flag) { ubtbcmfw_softc_p sc = NULL; u_int8_t buf[UBTBCMFW_BSIZE]; @@ -417,7 +417,7 @@ ubtbcmfw_read(dev_t dev, struct uio *uio, int flag) */ Static int -ubtbcmfw_write(dev_t dev, struct uio *uio, int flag) +ubtbcmfw_write(struct cdev *dev, struct uio *uio, int flag) { ubtbcmfw_softc_p sc = NULL; u_int8_t buf[UBTBCMFW_BSIZE]; @@ -482,7 +482,7 @@ ubtbcmfw_write(dev_t dev, struct uio *uio, int flag) */ Static int -ubtbcmfw_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) +ubtbcmfw_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) { ubtbcmfw_softc_p sc = NULL; int error = 0; @@ -519,7 +519,7 @@ ubtbcmfw_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, usb_proc_ptr p) */ Static int -ubtbcmfw_poll(dev_t dev, int events, usb_proc_ptr p) +ubtbcmfw_poll(struct cdev *dev, int events, usb_proc_ptr p) { ubtbcmfw_softc_p sc = NULL; int revents = 0; diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index c0666b996502..49d86b9ebbf8 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -81,7 +81,7 @@ NETGRAPH_INIT(device, &typestruct); struct ngd_connection { SLIST_ENTRY(ngd_connection) links; - dev_t ngddev; + struct cdev *ngddev; struct ng_hook *active_hook; char *readq; int loc; @@ -412,7 +412,7 @@ ng_device_disconnect(hook_p hook) * the device is opened */ static int -ngdopen(dev_t dev, int flag, int mode, struct thread *td) +ngdopen(struct cdev *dev, int flag, int mode, struct thread *td) { #ifdef NGD_DEBUG @@ -426,7 +426,7 @@ ngdopen(dev_t dev, int flag, int mode, struct thread *td) * the device is closed */ static int -ngdclose(dev_t dev, int flag, int mode, struct thread *td) +ngdclose(struct cdev *dev, int flag, int mode, struct thread *td) { #ifdef NGD_DEBUG @@ -444,7 +444,7 @@ ngdclose(dev_t dev, int flag, int mode, struct thread *td) * */ static int -ngdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ngdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct ngd_softc *sc = &ngd_softc; struct ngd_connection * connection = NULL; @@ -496,7 +496,7 @@ nomsg: * uiomove. */ static int -ngdread(dev_t dev, struct uio *uio, int flag) +ngdread(struct cdev *dev, struct uio *uio, int flag) { int ret = 0, amnt; char buffer[uio->uio_resid+1]; @@ -547,7 +547,7 @@ error: * */ static int -ngdwrite(dev_t dev, struct uio *uio, int flag) +ngdwrite(struct cdev *dev, struct uio *uio, int flag) { int ret; int error = 0; @@ -597,7 +597,7 @@ error: * check if there is data available for read */ static int -ngdpoll(dev_t dev, int events, struct thread *td) +ngdpoll(struct cdev *dev, int events, struct thread *td) { int revents = 0; struct ngd_softc *sc = &ngd_softc; diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 186cad6c5e1c..0ce67a58c3b2 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -115,7 +115,7 @@ typedef struct ngt_sc *sc_p; #endif /* Line discipline methods */ -static int ngt_open(dev_t dev, struct tty *tp); +static int ngt_open(struct cdev *dev, struct tty *tp); static int ngt_close(struct tty *tp, int flag); static int ngt_read(struct tty *tp, struct uio *uio, int flag); static int ngt_write(struct tty *tp, struct uio *uio, int flag); @@ -180,7 +180,7 @@ static int ngt_ldisc; * Called from device open routine or ttioctl() at >= splsofttty() */ static int -ngt_open(dev_t dev, struct tty *tp) +ngt_open(struct cdev *dev, struct tty *tp) { struct thread *const td = curthread; /* XXX */ char name[sizeof(NG_TTY_NODE_TYPE) + 8]; diff --git a/sys/netncp/ncp_mod.c b/sys/netncp/ncp_mod.c index 497e203f0247..83e970868a3c 100644 --- a/sys/netncp/ncp_mod.c +++ b/sys/netncp/ncp_mod.c @@ -62,7 +62,7 @@ SYSCTL_INT(_net_ncp, OID_AUTO, version, CTLFLAG_RD, &ncp_version, 0, ""); MODULE_VERSION(ncp, 1); MODULE_DEPEND(ncp, libmchain, 1, 1, 1); -static dev_t ncp_dev; +static struct cdev *ncp_dev; static d_ioctl_t ncp_ioctl; @@ -82,7 +82,7 @@ static int sncp_connect(struct thread *, struct ncpioc_connect *); static int sncp_request(struct thread *, struct ncpioc_request *); static int -ncp_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +ncp_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { switch (cmd) { diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c index 16e4819225cb..78a60680f925 100644 --- a/sys/netsmb/smb_dev.c +++ b/sys/netsmb/smb_dev.c @@ -99,7 +99,7 @@ static struct cdevsw nsmb_cdevsw = { static eventhandler_tag nsmb_dev_tag; static void -nsmb_dev_clone(void *arg, char *name, int namelen, dev_t *dev) +nsmb_dev_clone(void *arg, char *name, int namelen, struct cdev **dev) { int u; @@ -112,7 +112,7 @@ nsmb_dev_clone(void *arg, char *name, int namelen, dev_t *dev) } static int -nsmb_dev_open(dev_t dev, int oflags, int devtype, struct thread *td) +nsmb_dev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct smb_dev *sdp; struct ucred *cred = td->td_ucred; @@ -146,7 +146,7 @@ nsmb_dev_open(dev_t dev, int oflags, int devtype, struct thread *td) } static int -nsmb_dev_close(dev_t dev, int flag, int fmt, struct thread *td) +nsmb_dev_close(struct cdev *dev, int flag, int fmt, struct thread *td) { struct smb_dev *sdp; struct smb_vc *vcp; @@ -180,7 +180,7 @@ nsmb_dev_close(dev_t dev, int flag, int fmt, struct thread *td) static int -nsmb_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +nsmb_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct smb_dev *sdp; struct smb_vc *vcp; @@ -385,7 +385,7 @@ smb_dev2share(int fd, int mode, struct smb_cred *scred, struct vnode *vp; struct smb_dev *sdp; struct smb_share *ssp; - dev_t dev; + struct cdev *dev; int error; fp = nsmb_getfp(scred->scr_td->td_proc->p_fd, fd, FREAD | FWRITE); diff --git a/sys/nfs4client/nfs4_dev.c b/sys/nfs4client/nfs4_dev.c index 645c4ea2e138..b675e5508b27 100644 --- a/sys/nfs4client/nfs4_dev.c +++ b/sys/nfs4client/nfs4_dev.c @@ -75,7 +75,7 @@ struct nfs4dev_upcall { static int nfs4dev_nopen = 0; static struct thread * nfs4dev_reader = NULL; -static dev_t nfs4device = 0; +static struct cdev *nfs4device = 0; static struct mtx nfs4dev_daemon_mtx; static int nfs4dev_xid = 0; @@ -252,7 +252,7 @@ nfs4dev_uninit(void) /* device interface functions */ static int -nfs4dev_open(dev_t dev, int flags, int fmt, d_thread_t *td) +nfs4dev_open(struct cdev *dev, int flags, int fmt, d_thread_t *td) { if (dev != nfs4device) return ENODEV; @@ -271,7 +271,7 @@ nfs4dev_open(dev_t dev, int flags, int fmt, d_thread_t *td) } static int -nfs4dev_close(dev_t dev, int flags, int fmt, d_thread_t *td) +nfs4dev_close(struct cdev *dev, int flags, int fmt, d_thread_t *td) { struct nfs4dev_upcall * u; @@ -303,7 +303,7 @@ nfs4dev_close(dev_t dev, int flags, int fmt, d_thread_t *td) } static int -nfs4dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) +nfs4dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { int error; @@ -333,7 +333,7 @@ nfs4dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) } static int -nfs4dev_poll(dev_t dev, int events, struct thread *td) +nfs4dev_poll(struct cdev *dev, int events, struct thread *td) { int revents; diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 9feb48b7a6c8..9b0da7ce3026 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -712,25 +712,25 @@ csefree(struct csession *cse) } static int -cryptoopen(dev_t dev, int oflags, int devtype, struct thread *td) +cryptoopen(struct cdev *dev, int oflags, int devtype, struct thread *td) { return (0); } static int -cryptoread(dev_t dev, struct uio *uio, int ioflag) +cryptoread(struct cdev *dev, struct uio *uio, int ioflag) { return (EIO); } static int -cryptowrite(dev_t dev, struct uio *uio, int ioflag) +cryptowrite(struct cdev *dev, struct uio *uio, int ioflag) { return (EIO); } static int -cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +cryptoioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct file *f; struct fcrypt *fcr; @@ -775,7 +775,7 @@ static struct cdevsw crypto_cdevsw = { .d_name = "crypto", .d_maj = CRYPTO_MAJOR, }; -static dev_t crypto_dev; +static struct cdev *crypto_dev; /* * Initialization code, both for static and dynamic loading. diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index dc6668aab656..a8ed55660b9d 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -379,7 +379,7 @@ struct fd_data { struct callout_handle toffhandle; struct callout_handle tohandle; struct devstat *device_stats; - dev_t masterdev; + struct cdev *masterdev; device_t dev; fdu_t fdu; #ifdef PC98 @@ -532,11 +532,11 @@ static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; static driver_intr_t fdc_intr; static int fdcpio(fdc_p, long, caddr_t, u_int); -static int fdautoselect(dev_t); +static int fdautoselect(struct cdev *); static int fdstate(struct fdc_data *); static int retrier(struct fdc_data *); static void fdbiodone(struct bio *); -static int fdmisccmd(dev_t, u_int, void *); +static int fdmisccmd(struct cdev *, u_int, void *); static d_ioctl_t fdioctl; static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */ @@ -1881,7 +1881,7 @@ out_fdc(struct fdc_data *fdc, int x) * auxiliary functions). */ static int -fdopen(dev_t dev, int flags, int mode, struct thread *td) +fdopen(struct cdev *dev, int flags, int mode, struct thread *td) { fd_p fd; fdc_p fdc; @@ -1985,7 +1985,7 @@ fdopen(dev_t dev, int flags, int mode, struct thread *td) } static int -fdclose(dev_t dev, int flags, int mode, struct thread *td) +fdclose(struct cdev *dev, int flags, int mode, struct thread *td) { struct fd_data *fd; @@ -2184,7 +2184,7 @@ fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count) * Try figuring out the density of the media present in our device. */ static int -fdautoselect(dev_t dev) +fdautoselect(struct cdev *dev) { fd_p fd; struct fd_type *fdtp; @@ -2993,7 +2993,7 @@ fdbiodone(struct bio *bp) } static int -fdmisccmd(dev_t dev, u_int cmd, void *data) +fdmisccmd(struct cdev *dev, u_int cmd, void *data) { fdu_t fdu; fd_p fd; @@ -3044,7 +3044,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) } static int -fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +fdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { fdu_t fdu; fd_p fd; diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c index eca0454dca2e..a22ad992f56c 100644 --- a/sys/pc98/cbus/gdc.c +++ b/sys/pc98/cbus/gdc.c @@ -346,7 +346,7 @@ gdc_release_resource(device_t dev) #ifdef FB_INSTALL_CDEV static int -gdcopen(dev_t dev, int flag, int mode, struct thread *td) +gdcopen(struct cdev *dev, int flag, int mode, struct thread *td) { gdc_softc_t *sc; @@ -360,7 +360,7 @@ gdcopen(dev_t dev, int flag, int mode, struct thread *td) } static int -gdcclose(dev_t dev, int flag, int mode, struct thread *td) +gdcclose(struct cdev *dev, int flag, int mode, struct thread *td) { gdc_softc_t *sc; @@ -369,7 +369,7 @@ gdcclose(dev_t dev, int flag, int mode, struct thread *td) } static int -gdcread(dev_t dev, struct uio *uio, int flag) +gdcread(struct cdev *dev, struct uio *uio, int flag) { gdc_softc_t *sc; @@ -378,7 +378,7 @@ gdcread(dev_t dev, struct uio *uio, int flag) } static int -gdcwrite(dev_t dev, struct uio *uio, int flag) +gdcwrite(struct cdev *dev, struct uio *uio, int flag) { gdc_softc_t *sc; @@ -387,7 +387,7 @@ gdcwrite(dev_t dev, struct uio *uio, int flag) } static int -gdcioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +gdcioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { gdc_softc_t *sc; @@ -396,7 +396,7 @@ gdcioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } static int -gdcmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +gdcmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { gdc_softc_t *sc; diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index 49e78e01fa05..dc523db8db4b 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -466,7 +466,7 @@ lpt_attach(device_t dev) */ static int -lptopen (dev_t dev, int flags, int fmt, struct thread *td) +lptopen (struct cdev *dev, int flags, int fmt, struct thread *td) { struct lpt_softc *sc; int s; @@ -605,7 +605,7 @@ lptout (void *arg) */ static int -lptclose(dev_t dev, int flags, int fmt, struct thread *td) +lptclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct lpt_softc *sc; #ifndef PC98 @@ -718,7 +718,7 @@ pushbytes(struct lpt_softc * sc) */ static int -lptwrite(dev_t dev, struct uio * uio, int ioflag) +lptwrite(struct cdev *dev, struct uio * uio, int ioflag) { register unsigned n; int pl, err; @@ -776,7 +776,7 @@ lpt_intr(void *arg) } static int -lptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +lptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int error = 0; struct lpt_softc *sc; diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 708c4a7534ee..9a98b65fe60e 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -351,7 +351,7 @@ struct com_s { struct resource *ioportres; int ioportrid; void *cookie; - dev_t devs[6]; + struct cdev *devs[6]; /* * Data area for output buffers. Someday we should build the output @@ -452,13 +452,13 @@ static int sysclock; #define IS_8251(if_type) (!(if_type & 0x10)) #define COM1_EXT_CLOCK 0x40000 -static void commint(dev_t dev); +static void commint(struct cdev *dev); static void com_tiocm_set(struct com_s *com, int msr); static void com_tiocm_bis(struct com_s *com, int msr); static void com_tiocm_bic(struct com_s *com, int msr); static int com_tiocm_get(struct com_s *com); static int com_tiocm_get_delta(struct com_s *com); -static void pc98_msrint_start(dev_t dev); +static void pc98_msrint_start(struct cdev *dev); static void com_cflag_and_speed_set(struct com_s *com, int cflag, int speed); static int pc98_ttspeedtab(struct com_s *com, int speed, u_int *divisor); static int pc98_get_modem_status(struct com_s *com); @@ -1847,7 +1847,7 @@ determined_type: ; static int sioopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -2080,7 +2080,7 @@ out: static int sioclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -2221,7 +2221,7 @@ comhardclose(com) static int sioread(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -2239,7 +2239,7 @@ sioread(dev, uio, flag) static int siowrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -2934,7 +2934,7 @@ txrdy: static int sioioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; @@ -3861,7 +3861,7 @@ comwakeup(chan) #ifdef PC98 /* commint is called when modem control line changes */ static void -commint(dev_t dev) +commint(struct cdev *dev) { register struct tty *tp; int stat,delta; @@ -4551,9 +4551,9 @@ pc98_check_msr(void* chan) struct com_s *com; int mynor; int unit; - dev_t dev; + struct cdev *dev; - dev=(dev_t)chan; + dev=(struct cdev *)chan; mynor = minor(dev); unit = MINOR_TO_UNIT(mynor); com = com_addr(unit); @@ -4591,7 +4591,7 @@ pc98_check_msr(void* chan) } static void -pc98_msrint_start(dev_t dev) +pc98_msrint_start(struct cdev *dev) { struct com_s *com; int mynor; diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index a3a0b9720c88..315b4d3eca7c 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -1232,9 +1232,9 @@ SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -u_long bootdev; /* not a dev_t - encoding is different */ +u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in dev_t format)"); + CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); /* * Initialize 386 and configure to run kernel diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index dc6668aab656..a8ed55660b9d 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -379,7 +379,7 @@ struct fd_data { struct callout_handle toffhandle; struct callout_handle tohandle; struct devstat *device_stats; - dev_t masterdev; + struct cdev *masterdev; device_t dev; fdu_t fdu; #ifdef PC98 @@ -532,11 +532,11 @@ static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; static driver_intr_t fdc_intr; static int fdcpio(fdc_p, long, caddr_t, u_int); -static int fdautoselect(dev_t); +static int fdautoselect(struct cdev *); static int fdstate(struct fdc_data *); static int retrier(struct fdc_data *); static void fdbiodone(struct bio *); -static int fdmisccmd(dev_t, u_int, void *); +static int fdmisccmd(struct cdev *, u_int, void *); static d_ioctl_t fdioctl; static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */ @@ -1881,7 +1881,7 @@ out_fdc(struct fdc_data *fdc, int x) * auxiliary functions). */ static int -fdopen(dev_t dev, int flags, int mode, struct thread *td) +fdopen(struct cdev *dev, int flags, int mode, struct thread *td) { fd_p fd; fdc_p fdc; @@ -1985,7 +1985,7 @@ fdopen(dev_t dev, int flags, int mode, struct thread *td) } static int -fdclose(dev_t dev, int flags, int mode, struct thread *td) +fdclose(struct cdev *dev, int flags, int mode, struct thread *td) { struct fd_data *fd; @@ -2184,7 +2184,7 @@ fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count) * Try figuring out the density of the media present in our device. */ static int -fdautoselect(dev_t dev) +fdautoselect(struct cdev *dev) { fd_p fd; struct fd_type *fdtp; @@ -2993,7 +2993,7 @@ fdbiodone(struct bio *bp) } static int -fdmisccmd(dev_t dev, u_int cmd, void *data) +fdmisccmd(struct cdev *dev, u_int cmd, void *data) { fdu_t fdu; fd_p fd; @@ -3044,7 +3044,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data) } static int -fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +fdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { fdu_t fdu; fd_p fd; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index a3a0b9720c88..315b4d3eca7c 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1232,9 +1232,9 @@ SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -u_long bootdev; /* not a dev_t - encoding is different */ +u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in dev_t format)"); + CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); /* * Initialize 386 and configure to run kernel diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index 163931460245..9b8b83bcc12e 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -93,8 +93,8 @@ typedef struct mse_softc { u_char sc_bytes[MOUSE_SYS_PACKETSIZE]; struct callout_handle sc_callout; int sc_watchdog; - dev_t sc_dev; - dev_t sc_ndev; + struct cdev *sc_dev; + struct cdev *sc_ndev; mousehw_t hw; mousemode_t mode; mousestatus_t status; @@ -446,7 +446,7 @@ mse_detach(dev) */ static int mseopen(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -486,7 +486,7 @@ mseopen(dev, flags, fmt, td) */ static int mseclose(dev, flags, fmt, td) - dev_t dev; + struct cdev *dev; int flags; int fmt; struct thread *td; @@ -510,7 +510,7 @@ mseclose(dev, flags, fmt, td) */ static int mseread(dev, uio, ioflag) - dev_t dev; + struct cdev *dev; struct uio *uio; int ioflag; { @@ -577,7 +577,7 @@ mseread(dev, uio, ioflag) */ static int mseioctl(dev, cmd, addr, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t addr; int flag; @@ -694,7 +694,7 @@ mseioctl(dev, cmd, addr, flag, td) */ static int msepoll(dev, events, td) - dev_t dev; + struct cdev *dev; int events; struct thread *td; { @@ -727,10 +727,10 @@ static void msetimeout(arg) void *arg; { - dev_t dev; + struct cdev *dev; mse_softc_t *sc; - dev = (dev_t)arg; + dev = (struct cdev *)arg; sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); if (sc->sc_watchdog) { if (bootverbose) diff --git a/sys/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c index 49e78e01fa05..dc523db8db4b 100644 --- a/sys/pc98/pc98/olpt.c +++ b/sys/pc98/pc98/olpt.c @@ -466,7 +466,7 @@ lpt_attach(device_t dev) */ static int -lptopen (dev_t dev, int flags, int fmt, struct thread *td) +lptopen (struct cdev *dev, int flags, int fmt, struct thread *td) { struct lpt_softc *sc; int s; @@ -605,7 +605,7 @@ lptout (void *arg) */ static int -lptclose(dev_t dev, int flags, int fmt, struct thread *td) +lptclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct lpt_softc *sc; #ifndef PC98 @@ -718,7 +718,7 @@ pushbytes(struct lpt_softc * sc) */ static int -lptwrite(dev_t dev, struct uio * uio, int ioflag) +lptwrite(struct cdev *dev, struct uio * uio, int ioflag) { register unsigned n; int pl, err; @@ -776,7 +776,7 @@ lpt_intr(void *arg) } static int -lptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) +lptioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { int error = 0; struct lpt_softc *sc; diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c index eca0454dca2e..a22ad992f56c 100644 --- a/sys/pc98/pc98/pc98gdc.c +++ b/sys/pc98/pc98/pc98gdc.c @@ -346,7 +346,7 @@ gdc_release_resource(device_t dev) #ifdef FB_INSTALL_CDEV static int -gdcopen(dev_t dev, int flag, int mode, struct thread *td) +gdcopen(struct cdev *dev, int flag, int mode, struct thread *td) { gdc_softc_t *sc; @@ -360,7 +360,7 @@ gdcopen(dev_t dev, int flag, int mode, struct thread *td) } static int -gdcclose(dev_t dev, int flag, int mode, struct thread *td) +gdcclose(struct cdev *dev, int flag, int mode, struct thread *td) { gdc_softc_t *sc; @@ -369,7 +369,7 @@ gdcclose(dev_t dev, int flag, int mode, struct thread *td) } static int -gdcread(dev_t dev, struct uio *uio, int flag) +gdcread(struct cdev *dev, struct uio *uio, int flag) { gdc_softc_t *sc; @@ -378,7 +378,7 @@ gdcread(dev_t dev, struct uio *uio, int flag) } static int -gdcwrite(dev_t dev, struct uio *uio, int flag) +gdcwrite(struct cdev *dev, struct uio *uio, int flag) { gdc_softc_t *sc; @@ -387,7 +387,7 @@ gdcwrite(dev_t dev, struct uio *uio, int flag) } static int -gdcioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) +gdcioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { gdc_softc_t *sc; @@ -396,7 +396,7 @@ gdcioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) } static int -gdcmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +gdcmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { gdc_softc_t *sc; diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 708c4a7534ee..9a98b65fe60e 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -351,7 +351,7 @@ struct com_s { struct resource *ioportres; int ioportrid; void *cookie; - dev_t devs[6]; + struct cdev *devs[6]; /* * Data area for output buffers. Someday we should build the output @@ -452,13 +452,13 @@ static int sysclock; #define IS_8251(if_type) (!(if_type & 0x10)) #define COM1_EXT_CLOCK 0x40000 -static void commint(dev_t dev); +static void commint(struct cdev *dev); static void com_tiocm_set(struct com_s *com, int msr); static void com_tiocm_bis(struct com_s *com, int msr); static void com_tiocm_bic(struct com_s *com, int msr); static int com_tiocm_get(struct com_s *com); static int com_tiocm_get_delta(struct com_s *com); -static void pc98_msrint_start(dev_t dev); +static void pc98_msrint_start(struct cdev *dev); static void com_cflag_and_speed_set(struct com_s *com, int cflag, int speed); static int pc98_ttspeedtab(struct com_s *com, int speed, u_int *divisor); static int pc98_get_modem_status(struct com_s *com); @@ -1847,7 +1847,7 @@ determined_type: ; static int sioopen(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -2080,7 +2080,7 @@ out: static int sioclose(dev, flag, mode, td) - dev_t dev; + struct cdev *dev; int flag; int mode; struct thread *td; @@ -2221,7 +2221,7 @@ comhardclose(com) static int sioread(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -2239,7 +2239,7 @@ sioread(dev, uio, flag) static int siowrite(dev, uio, flag) - dev_t dev; + struct cdev *dev; struct uio *uio; int flag; { @@ -2934,7 +2934,7 @@ txrdy: static int sioioctl(dev, cmd, data, flag, td) - dev_t dev; + struct cdev *dev; u_long cmd; caddr_t data; int flag; @@ -3861,7 +3861,7 @@ comwakeup(chan) #ifdef PC98 /* commint is called when modem control line changes */ static void -commint(dev_t dev) +commint(struct cdev *dev) { register struct tty *tp; int stat,delta; @@ -4551,9 +4551,9 @@ pc98_check_msr(void* chan) struct com_s *com; int mynor; int unit; - dev_t dev; + struct cdev *dev; - dev=(dev_t)chan; + dev=(struct cdev *)chan; mynor = minor(dev); unit = MINOR_TO_UNIT(mynor); com = com_addr(unit); @@ -4591,7 +4591,7 @@ pc98_check_msr(void* chan) } static void -pc98_msrint_start(dev_t dev) +pc98_msrint_start(struct cdev *dev) { struct com_s *com; int mynor; diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c index ef508c0394e8..5ac001ea018d 100644 --- a/sys/pc98/pc98/wd_cd.c +++ b/sys/pc98/pc98/wd_cd.c @@ -97,7 +97,7 @@ struct acd * acd_init_lun(struct atapi *ata, int unit, struct atapi_params *ap, int lun) { struct acd *ptr; - dev_t pdev; + struct cdev *pdev; if (!(ptr = malloc(sizeof(struct acd), M_TEMP, M_NOWAIT | M_ZERO))) return NULL; @@ -360,7 +360,7 @@ acd_describe(struct acd *cdp) } static int -acdopen(dev_t dev, int flags, int fmt, struct thread *td) +acdopen(struct cdev *dev, int flags, int fmt, struct thread *td) { struct acd *cdp; @@ -385,7 +385,7 @@ acdopen(dev_t dev, int flags, int fmt, struct thread *td) } int -acdclose(dev_t dev, int flags, int fmt, struct thread *td) +acdclose(struct cdev *dev, int flags, int fmt, struct thread *td) { struct acd *cdp = dev->si_drv1; @@ -550,7 +550,7 @@ msf2lba(u_char m, u_char s, u_char f) } int -acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +acdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct acd *cdp = dev->si_drv1; int error = 0; diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index b4d15ffdd23f..876c2414f10e 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -349,7 +349,7 @@ pccard_event(struct slot *slt, enum card_event event) * Device driver interface. */ static int -crdopen(dev_t dev, int oflags, int devtype, d_thread_t *td) +crdopen(struct cdev *dev, int oflags, int devtype, d_thread_t *td) { struct slot *slt = PCCARD_DEV2SOFTC(dev); @@ -365,7 +365,7 @@ crdopen(dev_t dev, int oflags, int devtype, d_thread_t *td) * slots may be assigned to drivers already. */ static int -crdclose(dev_t dev, int fflag, int devtype, d_thread_t *td) +crdclose(struct cdev *dev, int fflag, int devtype, d_thread_t *td) { return (0); } @@ -375,7 +375,7 @@ crdclose(dev_t dev, int fflag, int devtype, d_thread_t *td) * then transfer to user space. */ static int -crdread(dev_t dev, struct uio *uio, int ioflag) +crdread(struct cdev *dev, struct uio *uio, int ioflag) { struct slot *slt = PCCARD_DEV2SOFTC(dev); struct mem_desc *mp, oldmap; @@ -421,7 +421,7 @@ crdread(dev_t dev, struct uio *uio, int ioflag) * window is used. */ static int -crdwrite(dev_t dev, struct uio *uio, int ioflag) +crdwrite(struct cdev *dev, struct uio *uio, int ioflag) { struct slot *slt = PCCARD_DEV2SOFTC(dev); struct mem_desc *mp, oldmap; @@ -466,7 +466,7 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag) * descriptors, and assignment of drivers. */ static int -crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) +crdioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) { u_int32_t addr; int err; @@ -667,7 +667,7 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td) * when a change in card status occurs. */ static int -crdpoll(dev_t dev, int events, d_thread_t *td) +crdpoll(struct cdev *dev, int events, d_thread_t *td) { int revents = 0; int s; diff --git a/sys/pccard/slot.h b/sys/pccard/slot.h index ff248aef77a0..a91098328553 100644 --- a/sys/pccard/slot.h +++ b/sys/pccard/slot.h @@ -125,7 +125,7 @@ struct slot { void *cdata; /* Controller specific data */ int pwr_off_pending;/* Power status of slot */ device_t dev; /* Config system device. */ - dev_t d; /* fs device */ + struct cdev *d; /* fs device */ }; #define PCCARD_DEVICE2SOFTC(d) ((struct slot *) device_get_softc(d)) diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 46f10a3c5c54..239b5bff93d0 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -762,7 +762,7 @@ agp_unbind_user(device_t dev, agp_unbind *unbind) } static int -agp_open(dev_t kdev, int oflags, int devtype, struct thread *td) +agp_open(struct cdev *kdev, int oflags, int devtype, struct thread *td) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); @@ -776,7 +776,7 @@ agp_open(dev_t kdev, int oflags, int devtype, struct thread *td) } static int -agp_close(dev_t kdev, int fflag, int devtype, struct thread *td) +agp_close(struct cdev *kdev, int fflag, int devtype, struct thread *td) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); @@ -799,7 +799,7 @@ agp_close(dev_t kdev, int fflag, int devtype, struct thread *td) } static int -agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) +agp_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) { device_t dev = KDEV2DEV(kdev); @@ -834,7 +834,7 @@ agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td) } static int -agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); diff --git a/sys/pci/agppriv.h b/sys/pci/agppriv.h index 6ba4ed60b4af..7e846d17cdff 100644 --- a/sys/pci/agppriv.h +++ b/sys/pci/agppriv.h @@ -75,7 +75,7 @@ struct agp_softc { struct agp_memory_list as_memory; /* list of allocated memory */ int as_nextid; /* next memory block id */ int as_isopen; /* user device is open */ - dev_t as_devnode; /* from make_dev */ + struct cdev *as_devnode; /* from make_dev */ struct mtx as_lock; /* lock for access to GATT */ }; diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index ad5366e8aebc..b80191657260 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -3121,7 +3121,7 @@ ti_ioctl(ifp, command, data) } static int -ti_open(dev_t dev, int flags, int fmt, struct thread *td) +ti_open(struct cdev *dev, int flags, int fmt, struct thread *td) { struct ti_softc *sc; @@ -3137,7 +3137,7 @@ ti_open(dev_t dev, int flags, int fmt, struct thread *td) } static int -ti_close(dev_t dev, int flag, int fmt, struct thread *td) +ti_close(struct cdev *dev, int flag, int fmt, struct thread *td) { struct ti_softc *sc; @@ -3156,7 +3156,7 @@ ti_close(dev_t dev, int flag, int fmt, struct thread *td) * This ioctl routine goes along with the Tigon character device. */ static int -ti_ioctl2(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ti_ioctl2(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { int error; struct ti_softc *sc; diff --git a/sys/pci/if_tireg.h b/sys/pci/if_tireg.h index 71d9661a5eb0..35525149996f 100644 --- a/sys/pci/if_tireg.h +++ b/sys/pci/if_tireg.h @@ -1025,7 +1025,7 @@ struct ti_softc { int ti_txcnt; struct mtx ti_mtx; ti_flag_vals ti_flags; - dev_t dev; + struct cdev *dev; }; #define TI_LOCK(_sc) mtx_lock(&(_sc)->ti_mtx) diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index 38014a3f8911..7ec18a5c6124 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -113,7 +113,7 @@ xrpu_poll_pps(struct timecounter *tc) } static int -xrpu_open(dev_t dev, int flag, int mode, struct thread *td) +xrpu_open(struct cdev *dev, int flag, int mode, struct thread *td) { struct softc *sc = devclass_get_softc(xrpu_devclass, dev2unit(dev)); @@ -124,13 +124,13 @@ xrpu_open(dev_t dev, int flag, int mode, struct thread *td) } static int -xrpu_close(dev_t dev, int flag, int mode, struct thread *td) +xrpu_close(struct cdev *dev, int flag, int mode, struct thread *td) { return (0); } static int -xrpu_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +xrpu_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct softc *sc = dev->si_drv1; if (offset >= 0x1000000) @@ -140,7 +140,7 @@ xrpu_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) } static int -xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr) +xrpu_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *tdr) { struct softc *sc = dev->si_drv1; int i, error; diff --git a/sys/powerpc/ofw/ofw_syscons.h b/sys/powerpc/ofw/ofw_syscons.h index de7308e856ad..5c7f46d077d9 100644 --- a/sys/powerpc/ofw/ofw_syscons.h +++ b/sys/powerpc/ofw/ofw_syscons.h @@ -31,7 +31,7 @@ struct ofwfb_softc { video_adapter_t sc_va; - dev_t sc_si; + struct cdev *sc_si; phandle_t sc_node; int sc_console; diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 45abe171eccf..172c8c2eb21e 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -106,6 +106,7 @@ __END_DECLS * Kernel functions to manage and evaluate labels. */ struct bpf_d; +struct cdev; struct componentname; struct devfs_dirent; struct ifnet; @@ -178,7 +179,7 @@ void mac_associate_vnode_devfs(struct mount *mp, struct devfs_dirent *de, struct vnode *vp); int mac_associate_vnode_extattr(struct mount *mp, struct vnode *vp); void mac_associate_vnode_singlelabel(struct mount *mp, struct vnode *vp); -void mac_create_devfs_device(struct mount *mp, dev_t dev, +void mac_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *de); void mac_create_devfs_directory(struct mount *mp, char *dirname, int dirnamelen, struct devfs_dirent *de); diff --git a/sys/security/mac/mac_policy.h b/sys/security/mac/mac_policy.h index 8bcc1beee358..1748a40d8ed3 100644 --- a/sys/security/mac/mac_policy.h +++ b/sys/security/mac/mac_policy.h @@ -167,7 +167,7 @@ struct mac_policy_ops { void (*mpo_associate_vnode_singlelabel)(struct mount *mp, struct label *fslabel, struct vnode *vp, struct label *vlabel); - void (*mpo_create_devfs_device)(struct mount *mp, dev_t dev, + void (*mpo_create_devfs_device)(struct mount *mp, struct cdev *dev, struct devfs_dirent *de, struct label *label); void (*mpo_create_devfs_directory)(struct mount *mp, char *dirname, int dirnamelen, struct devfs_dirent *de, diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index efcb7105e67e..647260733e5c 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -938,7 +938,7 @@ mac_check_mount_stat(struct ucred *cred, struct mount *mount) } void -mac_create_devfs_device(struct mount *mp, dev_t dev, struct devfs_dirent *de) +mac_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *de) { MAC_PERFORM(create_devfs_device, mp, dev, de, de->de_label); diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 545ba43bed03..005c967775a3 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -772,7 +772,7 @@ mac_biba_copy_label(struct label *src, struct label *dest) * a lot like file system objects. */ static void -mac_biba_create_devfs_device(struct mount *mp, dev_t dev, +mac_biba_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *devfs_dirent, struct label *label) { struct mac_biba *mac_biba; diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 9502c05bcf09..9d4ef7b8a032 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -897,7 +897,7 @@ mac_lomac_copy_label(struct label *src, struct label *dest) * a lot like file system objects. */ static void -mac_lomac_create_devfs_device(struct mount *mp, dev_t dev, +mac_lomac_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *devfs_dirent, struct label *label) { struct mac_lomac *mac_lomac; diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c index 3e883ee3f6c8..e683790e9986 100644 --- a/sys/security/mac_mls/mac_mls.c +++ b/sys/security/mac_mls/mac_mls.c @@ -739,7 +739,7 @@ mac_mls_copy_label(struct label *src, struct label *dest) * a lot like file system objects. */ static void -mac_mls_create_devfs_device(struct mount *mp, dev_t dev, +mac_mls_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *devfs_dirent, struct label *label) { struct mac_mls *mac_mls; diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c index ea113e126b5a..f6874880d4f8 100644 --- a/sys/security/mac_stub/mac_stub.c +++ b/sys/security/mac_stub/mac_stub.c @@ -178,7 +178,7 @@ stub_associate_vnode_singlelabel(struct mount *mp, } static void -stub_create_devfs_device(struct mount *mp, dev_t dev, +stub_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *devfs_dirent, struct label *label) { diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c index 16f1a98f4b4b..21be15533060 100644 --- a/sys/security/mac_test/mac_test.c +++ b/sys/security/mac_test/mac_test.c @@ -692,7 +692,7 @@ mac_test_associate_vnode_singlelabel(struct mount *mp, } static void -mac_test_create_devfs_device(struct mount *mp, dev_t dev, +mac_test_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *devfs_dirent, struct label *label) { diff --git a/sys/sparc64/creator/creator.h b/sys/sparc64/creator/creator.h index 6fa42f731525..b3be9e2ae5d3 100644 --- a/sys/sparc64/creator/creator.h +++ b/sys/sparc64/creator/creator.h @@ -142,7 +142,7 @@ struct creator_softc { video_adapter_t sc_va; /* XXX must be first */ - dev_t sc_si; + struct cdev *sc_si; struct resource *sc_reg[FFB_NREG]; bus_space_tag_t sc_bt[FFB_NREG]; diff --git a/sys/sparc64/creator/creator_upa.c b/sys/sparc64/creator/creator_upa.c index 255d70160211..864f0b8f2c33 100644 --- a/sys/sparc64/creator/creator_upa.c +++ b/sys/sparc64/creator/creator_upa.c @@ -212,19 +212,19 @@ creator_upa_attach(device_t dev) } static int -creator_open(dev_t dev, int flags, int mode, struct thread *td) +creator_open(struct cdev *dev, int flags, int mode, struct thread *td) { return (0); } static int -creator_close(dev_t dev, int flags, int mode, struct thread *td) +creator_close(struct cdev *dev, int flags, int mode, struct thread *td) { return (0); } static int -creator_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +creator_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td) { struct creator_softc *sc; @@ -262,7 +262,7 @@ creator_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, } static int -creator_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) +creator_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) { struct creator_softc *sc; struct ffb_map *fm; diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h index b00280d7edcf..6778d0447593 100644 --- a/sys/sparc64/include/cpu.h +++ b/sys/sparc64/include/cpu.h @@ -52,7 +52,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_BOOTINFO 4 /* struct: bootinfo */ diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c index fca7c49eaa8f..d7a18185341f 100644 --- a/sys/sparc64/sparc64/mem.c +++ b/sys/sparc64/sparc64/mem.c @@ -73,7 +73,7 @@ #include #include -static dev_t memdev, kmemdev; +static struct cdev *memdev, *kmemdev; static d_open_t mmopen; static d_close_t mmclose; @@ -92,14 +92,14 @@ static struct cdevsw mem_cdevsw = { }; static int -mmclose(dev_t dev, int flags, int fmt, struct thread *td) +mmclose(struct cdev *dev, int flags, int fmt, struct thread *td) { return (0); } static int -mmopen(dev_t dev, int flags, int fmt, struct thread *td) +mmopen(struct cdev *dev, int flags, int fmt, struct thread *td) { int error; @@ -120,7 +120,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) /*ARGSUSED*/ static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; vm_offset_t eva; diff --git a/sys/sys/_types.h b/sys/sys/_types.h index f233c7005e9d..478fd419543d 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -80,12 +80,7 @@ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ -/* - * dev_t has differing meanings in userland and the kernel. - */ -#ifdef _KERNEL -typedef struct cdev *__dev_t; -#else +#ifndef _KERNEL typedef __udev_t __dev_t; /* device number */ #endif diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 12a9c0e59ccb..be9b20e02053 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -50,7 +50,7 @@ typedef void bio_task_t(void *); */ struct bio { u_int bio_cmd; /* I/O operation. */ - dev_t bio_dev; /* Device to do I/O on. */ + struct cdev *bio_dev; /* Device to do I/O on. */ struct disk *bio_disk; /* Valid below geom_disk.c only */ off_t bio_offset; /* Offset into file. */ long bio_bcount; /* Valid bytes in buffer. */ @@ -120,7 +120,7 @@ void bioq_remove(struct bio_queue_head *head, struct bio *bp); void bio_taskqueue(struct bio *bp, bio_task_t *fund, void *arg); -int physio(dev_t dev, struct uio *uio, int ioflag); +int physio(struct cdev *dev, struct uio *uio, int ioflag); #define physread physio #define physwrite physio diff --git a/sys/sys/conf.h b/sys/sys/conf.h index acbd04b2e05e..d97db9350a93 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -55,7 +55,7 @@ struct cdev { #define SI_ALIAS 0x0002 /* carrier of alias name */ #define SI_NAMED 0x0004 /* make_dev{_alias} has been called */ #define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ -#define SI_CHILD 0x0010 /* child of another dev_t */ +#define SI_CHILD 0x0010 /* child of another struct cdev **/ #define SI_DEVOPEN 0x0020 /* opened by device */ #define SI_CONSOPEN 0x0040 /* opened by console */ #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ @@ -72,7 +72,7 @@ struct cdev { SLIST_HEAD(, vnode) si_hlist; LIST_HEAD(, cdev) si_children; LIST_ENTRY(cdev) si_siblings; - dev_t si_parent; + struct cdev *si_parent; u_int si_inode; char *si_name; void *si_drv1, *si_drv2; @@ -145,18 +145,18 @@ struct clonedevs; typedef struct thread d_thread_t; -typedef int d_open_t(dev_t dev, int oflags, int devtype, struct thread *td); -typedef int d_fdopen_t(dev_t dev, int oflags, struct thread *td, int fdidx); -typedef int d_close_t(dev_t dev, int fflag, int devtype, struct thread *td); +typedef int d_open_t(struct cdev *dev, int oflags, int devtype, struct thread *td); +typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, int fdidx); +typedef int d_close_t(struct cdev *dev, int fflag, int devtype, struct thread *td); typedef void d_strategy_t(struct bio *bp); -typedef int d_ioctl_t(dev_t dev, u_long cmd, caddr_t data, +typedef int d_ioctl_t(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td); -typedef int d_read_t(dev_t dev, struct uio *uio, int ioflag); -typedef int d_write_t(dev_t dev, struct uio *uio, int ioflag); -typedef int d_poll_t(dev_t dev, int events, struct thread *td); -typedef int d_kqfilter_t(dev_t dev, struct knote *kn); -typedef int d_mmap_t(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, +typedef int d_read_t(struct cdev *dev, struct uio *uio, int ioflag); +typedef int d_write_t(struct cdev *dev, struct uio *uio, int ioflag); +typedef int d_poll_t(struct cdev *dev, int events, struct thread *td); +typedef int d_kqfilter_t(struct cdev *dev, struct knote *kn); +typedef int d_mmap_t(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot); typedef int dumper_t( @@ -262,30 +262,30 @@ void clone_setup(struct clonedevs **cdp); void clone_cleanup(struct clonedevs **); #define CLONE_UNITMASK 0xfffff #define CLONE_FLAG0 (CLONE_UNITMASK + 1) -int clone_create(struct clonedevs **, struct cdevsw *, int *unit, dev_t *dev, u_int extra); +int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, u_int extra); -int count_dev(dev_t _dev); -void destroy_dev(dev_t _dev); -struct cdevsw *devsw(dev_t _dev); +int count_dev(struct cdev *_dev); +void destroy_dev(struct cdev *_dev); +struct cdevsw *devsw(struct cdev *_dev); void cdevsw_ref(struct cdevsw *); void cdevsw_rel(struct cdevsw *); -const char *devtoname(dev_t _dev); -int dev_named(dev_t _pdev, const char *_name); -void dev_depends(dev_t _pdev, dev_t _cdev); -void dev_ref(dev_t dev); -void dev_rel(dev_t dev); +const char *devtoname(struct cdev *_dev); +int dev_named(struct cdev *_pdev, const char *_name); +void dev_depends(struct cdev *_pdev, struct cdev *_cdev); +void dev_ref(struct cdev *dev); +void dev_rel(struct cdev *dev); void dev_strategy(struct buf *bp); -dev_t makebdev(int _maj, int _min); -dev_t make_dev(struct cdevsw *_devsw, int _minor, uid_t _uid, gid_t _gid, +struct cdev *makebdev(int _maj, int _min); +struct cdev *make_dev(struct cdevsw *_devsw, int _minor, uid_t _uid, gid_t _gid, int _perms, const char *_fmt, ...) __printflike(6, 7); -dev_t make_dev_alias(dev_t _pdev, const char *_fmt, ...) __printflike(2, 3); -int dev2unit(dev_t _dev); +struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) __printflike(2, 3); +int dev2unit(struct cdev *_dev); int unit2minor(int _unit); void setconf(void); -dev_t getdiskbyname(char *_name); +struct cdev *getdiskbyname(char *_name); -void devfs_create(dev_t dev); -void devfs_destroy(dev_t dev); +void devfs_create(struct cdev *dev); +void devfs_destroy(struct cdev *dev); #define UID_ROOT 0 #define UID_BIN 3 @@ -298,7 +298,7 @@ void devfs_destroy(dev_t dev); #define GID_GAMES 13 #define GID_DIALER 68 -typedef void (*dev_clone_fn)(void *arg, char *name, int namelen, dev_t *result); +typedef void (*dev_clone_fn)(void *arg, char *name, int namelen, struct cdev **result); int dev_stdclone(char *_name, char **_namep, const char *_stem, int *_unit); EVENTHANDLER_DECLARE(dev_clone, dev_clone_fn); diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index c24194d48cc6..5c378f782d83 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -44,7 +44,7 @@ struct tty; -typedef int l_open_t(dev_t dev, struct tty *tp); +typedef int l_open_t(struct cdev *dev, struct tty *tp); typedef int l_close_t(struct tty *tp, int flag); typedef int l_read_t(struct tty *tp, struct uio *uio, int flag); typedef int l_write_t(struct tty *tp, struct uio *uio, int flag); @@ -81,7 +81,7 @@ l_write_t l_nowrite; l_ioctl_t l_nullioctl; static __inline int -ttyld_open(struct tty *tp, dev_t dev) +ttyld_open(struct tty *tp, struct cdev *dev) { return ((*linesw[tp->t_line]->l_open)(dev, tp)); diff --git a/sys/sys/mac.h b/sys/sys/mac.h index 45abe171eccf..172c8c2eb21e 100644 --- a/sys/sys/mac.h +++ b/sys/sys/mac.h @@ -106,6 +106,7 @@ __END_DECLS * Kernel functions to manage and evaluate labels. */ struct bpf_d; +struct cdev; struct componentname; struct devfs_dirent; struct ifnet; @@ -178,7 +179,7 @@ void mac_associate_vnode_devfs(struct mount *mp, struct devfs_dirent *de, struct vnode *vp); int mac_associate_vnode_extattr(struct mount *mp, struct vnode *vp); void mac_associate_vnode_singlelabel(struct mount *mp, struct vnode *vp); -void mac_create_devfs_device(struct mount *mp, dev_t dev, +void mac_create_devfs_device(struct mount *mp, struct cdev *dev, struct devfs_dirent *de); void mac_create_devfs_directory(struct mount *mp, char *dirname, int dirnamelen, struct devfs_dirent *de); diff --git a/sys/sys/mac_policy.h b/sys/sys/mac_policy.h index 8bcc1beee358..1748a40d8ed3 100644 --- a/sys/sys/mac_policy.h +++ b/sys/sys/mac_policy.h @@ -167,7 +167,7 @@ struct mac_policy_ops { void (*mpo_associate_vnode_singlelabel)(struct mount *mp, struct label *fslabel, struct vnode *vp, struct label *vlabel); - void (*mpo_create_devfs_device)(struct mount *mp, dev_t dev, + void (*mpo_create_devfs_device)(struct mount *mp, struct cdev *dev, struct devfs_dirent *de, struct label *label); void (*mpo_create_devfs_directory)(struct mount *mp, char *dirname, int dirnamelen, struct devfs_dirent *de, diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 07d8d5906023..e1ab3ce084c4 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -496,7 +496,7 @@ struct netcred *vfs_export_lookup /* lookup host in fs export list */ (struct mount *, struct sockaddr *); int vfs_allocate_syncvnode(struct mount *); void vfs_getnewfsid(struct mount *); -dev_t vfs_getrootfsid(struct mount *); +struct cdev *vfs_getrootfsid(struct mount *); struct mount *vfs_getvfs(fsid_t *); /* return vfs given fsid */ int vfs_modevent(module_t, int, void *); int vfs_mountedon(struct vnode *); /* is a vfs mounted on vp */ diff --git a/sys/sys/param.h b/sys/sys/param.h index ad72535c1b7d..67a8e9831ae0 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -55,7 +55,7 @@ * scheme is: <0 if release branch, otherwise 1>xx */ #undef __FreeBSD_version -#define __FreeBSD_version 502115 /* Master, propagated to newvers */ +#define __FreeBSD_version 502116 /* Master, propagated to newvers */ #ifndef LOCORE #include diff --git a/sys/sys/stat.h b/sys/sys/stat.h index c4376da8eee9..0f7f4a33d8c0 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -44,7 +44,9 @@ /* XXX missing blkcnt_t, blksize_t. */ #ifndef _DEV_T_DECLARED +#ifndef _KERNEL typedef __dev_t dev_t; +#endif #define _DEV_T_DECLARED #endif diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 4ebbc715606e..2165c63832d0 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -351,7 +351,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define KERN_BOOTFILE 26 /* string: name of booted kernel */ #define KERN_MAXFILESPERPROC 27 /* int: max open files per proc */ #define KERN_MAXPROCPERUID 28 /* int: max processes per uid */ -#define KERN_DUMPDEV 29 /* dev_t: device to dump on */ +#define KERN_DUMPDEV 29 /* struct cdev *: device to dump on */ #define KERN_IPC 30 /* node: anything related to IPC */ #define KERN_DUMMY 31 /* unused */ #define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 44c57034d008..1a06d821ca22 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -63,8 +63,8 @@ extern struct cv selwait; /* select conditional variable */ extern long physmem; /* physical memory */ -extern dev_t rootdev; /* root device */ -extern dev_t rootdevs[2]; /* possible root devices */ +extern struct cdev *rootdev; /* root device */ +extern struct cdev *rootdevs[2]; /* possible root devices */ extern char *rootdevnames[2]; /* names of possible root devices */ extern struct vnode *rootvp; /* vnode equivalent to above */ @@ -311,13 +311,13 @@ void wakeup(void *chan) __nonnull(1); void wakeup_one(void *chan) __nonnull(1); /* - * Common `dev_t' stuff are declared here to avoid #include poisoning + * Common `struct cdev *' stuff are declared here to avoid #include poisoning */ -int major(dev_t x); -int minor(dev_t x); -udev_t dev2udev(dev_t x); -dev_t udev2dev(udev_t x); +int major(struct cdev *x); +int minor(struct cdev *x); +udev_t dev2udev(struct cdev *x); +struct cdev *udev2dev(udev_t x); int uminor(udev_t dev); int umajor(udev_t dev); udev_t makeudev(int x, int y); diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 3dada47dd6dc..1b8958bd6f35 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -81,7 +81,7 @@ struct tty { long t_outcc; /* Output queue statistics. */ int t_line; /* Interface to device drivers. */ union { - dev_t t_kdev; /* Device. */ + struct cdev *t_kdev; /* Device. */ udev_t t_udev; /* Userland (sysctl) instance. */ void *t_devp; /* Keep user/kernel size in sync. */ } ttyu; @@ -307,7 +307,7 @@ int ttylclose(struct tty *tp, int flag); int ttyldoptim(struct tty *tp); struct tty *ttymalloc(struct tty *tp); int ttymodem(struct tty *tp, int flag); -int ttyopen(dev_t device, struct tty *tp); +int ttyopen(struct cdev *device, struct tty *tp); int ttyref(struct tty *tp); int ttyrel(struct tty *tp); int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo); diff --git a/sys/sys/types.h b/sys/sys/types.h index 1cabc3f95c71..87d03d92d291 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -131,7 +131,9 @@ typedef __critical_t critical_t; /* Critical section value */ typedef __int64_t daddr_t; /* disk address */ #ifndef _DEV_T_DECLARED +#ifndef _KERNEL typedef __dev_t dev_t; /* device number or struct cdev */ +#endif #define _DEV_T_DECLARED #endif diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 9d5c2db079ec..10df935c595f 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -594,7 +594,7 @@ extern int (*softdep_fsync_hook)(struct vnode *); extern int (*softdep_process_worklist_hook)(struct mount *); struct vnode *addaliasu(struct vnode *vp, udev_t nvp_rdev); -int bdevvp(dev_t dev, struct vnode **vpp); +int bdevvp(struct cdev *dev, struct vnode **vpp); /* cache_* may belong in namei.h. */ void cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp); @@ -625,7 +625,7 @@ void vattr_null(struct vattr *vap); int vcount(struct vnode *vp); void vdrop(struct vnode *); void vdropl(struct vnode *); -int vfinddev(dev_t dev, struct vnode **vpp); +int vfinddev(struct cdev *dev, struct vnode **vpp); void vfs_add_vnodeops(const void *); void vfs_rm_vnodeops(const void *); int vflush(struct mount *mp, int rootrefs, int flags); @@ -668,7 +668,7 @@ int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, caddr_t base, int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred, struct ucred *file_cred, struct thread *td); int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); -dev_t vn_todev(struct vnode *vp); +struct cdev *vn_todev(struct vnode *vp); int vn_write_suspend_wait(struct vnode *vp, struct mount *mp, int flags); int vn_writechk(struct vnode *vp); diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 3974be4f7b5c..a48ea7859fbc 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1690,7 +1690,7 @@ ffs_blkfree(fs, devvp, bno, size, inum) ufs2_daddr_t cgblkno; int i, cg, blk, frags, bbase; u_int8_t *blksfree; - dev_t dev; + struct cdev *dev; cg = dtog(fs, bno); if (devvp->v_type != VCHR) { @@ -1886,7 +1886,7 @@ ffs_freefile(fs, devvp, ino, mode) ufs2_daddr_t cgbno; int error, cg; u_int8_t *inosused; - dev_t dev; + struct cdev *dev; cg = ino_to_cg(fs, ino); if (devvp->v_type != VCHR) { diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 8f205db74d32..f6de659bb48b 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -556,7 +556,7 @@ ffs_mountfs(devvp, mp, td) struct ufsmount *ump; struct buf *bp; struct fs *fs; - dev_t dev; + struct cdev *dev; void *space; ufs2_daddr_t sblockloc; int error, i, blks, size, ronly; @@ -1222,7 +1222,7 @@ ffs_vget(mp, ino, flags, vpp) struct ufsmount *ump; struct buf *bp; struct vnode *vp; - dev_t dev; + struct cdev *dev; int error; ump = VFSTOUFS(mp); diff --git a/sys/ufs/ufs/dinode.h b/sys/ufs/ufs/dinode.h index cedecd9f7cd5..78e7e2a1501f 100644 --- a/sys/ufs/ufs/dinode.h +++ b/sys/ufs/ufs/dinode.h @@ -131,7 +131,7 @@ struct ufs2_dinode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * struct cdev *value. Short symbolic links place their path in the * di_db area. */ #define di_rdev di_db[0] diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index cabad78dcf0a..56b48f284efc 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -72,11 +72,11 @@ int ufs_direnter(struct vnode *, struct vnode *, struct direct *, int ufs_dirremove(struct vnode *, struct inode *, int, int); int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); -int ufs_ihashget(dev_t, ino_t, int, struct vnode **); +int ufs_ihashget(struct cdev *, ino_t, int, struct vnode **); void ufs_ihashinit(void); int ufs_ihashins(struct inode *, int, struct vnode **); struct vnode * - ufs_ihashlookup(dev_t, ino_t); + ufs_ihashlookup(struct cdev *, ino_t); void ufs_ihashrem(struct inode *); void ufs_ihashuninit(void); int ufs_inactive(struct vop_inactive_args *); diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 6e6f7437e48d..ceaae673ceff 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -83,7 +83,7 @@ ufs_ihashuninit() */ struct vnode * ufs_ihashlookup(dev, inum) - dev_t dev; + struct cdev *dev; ino_t inum; { struct inode *ip; @@ -105,7 +105,7 @@ ufs_ihashlookup(dev, inum) */ int ufs_ihashget(dev, inum, flags, vpp) - dev_t dev; + struct cdev *dev; ino_t inum; int flags; struct vnode **vpp; diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index 43c22548d7ea..6d5352c22f89 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -59,7 +59,7 @@ struct ufs_extattr_per_mount; /* This structure describes the UFS specific mount structure data. */ struct ufsmount { struct mount *um_mountp; /* filesystem vfs structure */ - dev_t um_dev; /* device mounted */ + struct cdev *um_dev; /* device mounted */ struct vnode *um_devvp; /* block device mounted vnode */ u_long um_fstype; /* type of filesystem */ struct fs *um_fs; /* pointer to superblock */ diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 4a4c34ad65f5..e52d416cdd37 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -101,7 +101,7 @@ dev_pager_init() static vm_object_t dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff) { - dev_t dev; + struct cdev *dev; d_mmap_t *mapfunc; vm_object_t object; vm_pindex_t pindex; @@ -204,7 +204,7 @@ dev_pager_getpages(object, m, count, reqpage) vm_pindex_t offset; vm_paddr_t paddr; vm_page_t page; - dev_t dev; + struct cdev *dev; int i, ret; d_mmap_t *mapfunc; int prot; diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 258ee4dda2f3..586ec82117d9 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2441,7 +2441,7 @@ swapgeom_close(struct thread *td, struct swdevt *sw) struct swh0h0 { - dev_t dev; + struct cdev *dev; struct vnode *vp; int error; }; -- cgit v1.3 From f3732fd15b5a493a090a0453f937a78949c65f7d Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 17 Jun 2004 17:16:53 +0000 Subject: Second half of the dev_t cleanup. The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc. --- lib/libkvm/kvm_proc.c | 2 +- sys/cam/scsi/scsi_target.c | 2 +- sys/coda/coda.h | 2 +- sys/coda/coda_fbsd.c | 2 +- sys/coda/coda_venus.c | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 4 +- sys/compat/linux/linux_stats.c | 8 +-- sys/compat/svr4/svr4_socket.c | 2 +- sys/compat/svr4/svr4_socket.h | 4 +- sys/compat/svr4/svr4_stream.c | 2 +- sys/compat/svr4/svr4_types.h | 4 +- sys/dev/cp/if_cp.c | 4 +- sys/dev/ctau/if_ct.c | 4 +- sys/dev/cx/if_cx.c | 4 +- sys/dev/cy/cy.c | 2 +- sys/dev/dcons/dcons.c | 2 +- sys/dev/digi/digi.c | 2 +- sys/dev/firewire/fwdev.c | 2 +- sys/dev/led/led.c | 4 +- sys/dev/nmdm/nmdm.c | 2 +- sys/dev/snp/snp.c | 14 ++--- sys/dev/sound/pcm/dsp.c | 2 +- sys/dev/sound/pcm/mixer.c | 2 +- sys/dev/syscons/syscons.c | 2 +- sys/dev/vinum/vinum.c | 2 +- sys/dev/vinum/vinumconfig.c | 4 +- sys/dev/vinum/vinumio.c | 2 +- sys/fs/cd9660/cd9660_node.h | 2 +- sys/fs/cd9660/cd9660_rrip.c | 4 +- sys/fs/coda/coda.h | 2 +- sys/fs/coda/coda_fbsd.c | 2 +- sys/fs/coda/coda_venus.c | 2 +- sys/fs/devfs/devfs_vnops.c | 8 +-- sys/fs/specfs/spec_vnops.c | 2 +- sys/geom/geom_dev.c | 2 +- sys/isofs/cd9660/cd9660_node.h | 2 +- sys/isofs/cd9660/cd9660_rrip.c | 4 +- sys/kern/kern_acct.c | 2 +- sys/kern/kern_conf.c | 62 ++++++++++------------ sys/kern/kern_proc.c | 4 +- sys/kern/kern_shutdown.c | 2 +- sys/kern/tty_cons.c | 6 +-- sys/kern/tty_pty.c | 4 +- sys/kern/tty_tty.c | 2 +- sys/kern/uipc_usrreq.c | 2 +- sys/kern/vfs_bio.c | 8 +-- sys/kern/vfs_mount.c | 12 ++--- sys/kern/vfs_subr.c | 16 +++--- sys/net/bpf.c | 2 +- sys/net/if_tap.c | 2 +- sys/net/if_tun.c | 2 +- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 28 +++++----- sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c | 14 ++--- sys/netsmb/smb_dev.c | 4 +- sys/nfs4client/nfs4_vn_subs.c | 2 +- sys/nfsclient/nfs_subs.c | 2 +- sys/nfsserver/nfs_serv.c | 2 +- sys/sys/_types.h | 5 +- sys/sys/acct.h | 2 +- sys/sys/conf.h | 2 +- sys/sys/param.h | 9 +--- sys/sys/snoop.h | 4 +- sys/sys/stat.h | 10 ++-- sys/sys/systm.h | 9 ++-- sys/sys/tty.h | 4 +- sys/sys/types.h | 6 +-- sys/sys/user.h | 2 +- sys/sys/vnode.h | 12 ++--- sys/vm/swap_pager.c | 12 ++--- sys/vm/vm_param.h | 2 +- usr.bin/fstat/fstat.c | 12 ++--- usr.bin/fstat/fstat.h | 2 +- usr.bin/pkill/pkill.c | 2 +- 73 files changed, 186 insertions(+), 205 deletions(-) (limited to 'sys/dev/dcons') diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 1fc196c9ce69..5f846f61938f 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -251,7 +251,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt) "can't read tty at %x", sess.s_ttyp); return (-1); } - kp->ki_tdev = tty.t_dev; + kp->ki_tdev = tty.t_dev; /* XXX: wrong */ if (tty.t_pgrp != NULL) { if (KREAD(kd, (u_long)tty.t_pgrp, &pgrp)) { _kvm_err(kd, kd->program, diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index f3739ea4b4ea..198a70d66c60 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -1035,7 +1035,7 @@ targclone(void *arg, char *name, int namelen, struct cdev **dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name, NULL, "targ", &u) != 1) return; diff --git a/sys/coda/coda.h b/sys/coda/coda.h index 90e7e2ae7202..5fb352effb82 100644 --- a/sys/coda/coda.h +++ b/sys/coda/coda.h @@ -87,7 +87,7 @@ typedef unsigned long long u_quad_t; typedef unsigned long long u_quad_t; #endif #else -#define cdev_t udev_t +#define cdev_t dev_t #endif #ifdef __CYGWIN32__ diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 0ce6e466e87e..89d4de05dead 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -186,7 +186,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name,NULL,"cfs",&u) != 1) return; diff --git a/sys/coda/coda_venus.c b/sys/coda/coda_venus.c index f0bc3c296bdf..7e4d32109045 100644 --- a/sys/coda/coda_venus.c +++ b/sys/coda/coda_venus.c @@ -212,7 +212,7 @@ venus_open(void *mdp, CodaFid *fid, int flag, error = coda_call(mdp, Isize, &Osize, (char *)inp); if (!error) { - *dev = udev2dev(outp->dev); + *dev = findcdev(outp->dev); *inode = outp->inode; } diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 999af87d7594..6ff5910c7ebf 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1083,13 +1083,13 @@ freebsd32_sendfile(struct thread *td, struct freebsd32_sendfile_args *uap) } struct stat32 { - udev_t st_dev; + dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; - udev_t st_rdev; + dev_t st_rdev; struct timespec32 st_atimespec; struct timespec32 st_mtimespec; struct timespec32 st_ctimespec; diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 4a02042ddc5f..a9545fda7e6d 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -76,7 +76,7 @@ newstat_copyout(struct stat *buf, void *ubuf) * in FreeBSD but block devices under Linux. */ if (S_ISCHR(tbuf.st_mode) && - (dev = udev2dev(buf->st_rdev)) != NODEV) { + (dev = findcdev(buf->st_rdev)) != NULL) { cdevsw = devsw(dev); if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) { tbuf.st_mode &= ~S_IFMT; @@ -365,8 +365,8 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) * struct cdev *returned from previous syscalls. Just return a bzeroed * ustat in that case. */ - dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF)); - if (dev != NODEV && vfinddev(dev, &vp)) { + dev = findcdev(makedev(args->dev >> 8, args->dev & 0xFF)); + if (dev != NULL && vfinddev(dev, &vp)) { if (vp->v_mount == NULL) return (EINVAL); #ifdef MAC @@ -414,7 +414,7 @@ stat64_copyout(struct stat *buf, void *ubuf) * in FreeBSD but block devices under Linux. */ if (S_ISCHR(lbuf.st_mode) && - (dev = udev2dev(buf->st_rdev)) != NODEV) { + (dev = findcdev(buf->st_rdev)) != NULL) { cdevsw = devsw(dev); if (cdevsw != NULL && (cdevsw->d_flags & D_DISK)) { lbuf.st_mode &= ~S_IFMT; diff --git a/sys/compat/svr4/svr4_socket.c b/sys/compat/svr4/svr4_socket.c index 95014e019a32..65126d76cdf6 100644 --- a/sys/compat/svr4/svr4_socket.c +++ b/sys/compat/svr4/svr4_socket.c @@ -67,7 +67,7 @@ struct sockaddr_un * svr4_find_socket(td, fp, dev, ino) struct thread *td; struct file *fp; - udev_t dev; + dev_t dev; ino_t ino; { struct svr4_sockcache_entry *e; diff --git a/sys/compat/svr4/svr4_socket.h b/sys/compat/svr4/svr4_socket.h index b4b38f90e40a..1df1e43d7685 100644 --- a/sys/compat/svr4/svr4_socket.h +++ b/sys/compat/svr4/svr4_socket.h @@ -49,7 +49,7 @@ struct svr4_sockaddr_in { }; struct sockaddr_un *svr4_find_socket(struct thread *, struct file *, - udev_t, ino_t); + dev_t, ino_t); void svr4_delete_socket(struct proc *, struct file *); int svr4_add_socket(struct thread *, const char *, struct stat *); @@ -57,7 +57,7 @@ struct svr4_sockcache_entry { struct proc *p; /* Process for the socket */ void *cookie; /* Internal cookie used for matching */ struct sockaddr_un sock;/* Pathname for the socket */ - udev_t dev; /* Device where the socket lives on */ + dev_t dev; /* Device where the socket lives on */ ino_t ino; /* Inode where the socket lives on */ TAILQ_ENTRY(svr4_sockcache_entry) entries; }; diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index db7eabcd67af..853a2722aa8c 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -1873,7 +1873,7 @@ svr4_do_putmsg(td, uap, fp) } else { /* Maybe we've been given a device/inode pair */ - udev_t *dev = SVR4_ADDROF(&sc); + dev_t *dev = SVR4_ADDROF(&sc); ino_t *ino = (ino_t *) &dev[1]; skp = svr4_find_socket(td, fp, *dev, *ino); if (skp == NULL) { diff --git a/sys/compat/svr4/svr4_types.h b/sys/compat/svr4/svr4_types.h index 3421647793f9..410746b6adc9 100644 --- a/sys/compat/svr4/svr4_types.h +++ b/sys/compat/svr4/svr4_types.h @@ -68,14 +68,14 @@ typedef struct timespec svr4_timestruc_t; #define svr4_omakedev(x,y) ((svr4_o_dev_t)((((x) << 8) & 0x7f00) | \ (((y) << 0) & 0x00ff))) -#define svr4_to_bsd_odev_t(d) makeudev(svr4_omajor(d), svr4_ominor(d)) +#define svr4_to_bsd_odev_t(d) makedev(svr4_omajor(d), svr4_ominor(d)) #define bsd_to_svr4_odev_t(d) svr4_omakedev(umajor(d), uminor(d)) #define svr4_major(x) ((int32_t)((((x) & 0xfffc0000) >> 18))) #define svr4_minor(x) ((int32_t)((((x) & 0x0003ffff) >> 0))) #define svr4_makedev(x,y) ((svr4_dev_t)((((x) << 18) & 0xfffc0000) | \ (((y) << 0) & 0x0003ffff))) -#define svr4_to_bsd_dev_t(d) makeudev(svr4_major(d), svr4_minor(d)) +#define svr4_to_bsd_dev_t(d) makedev(svr4_major(d), svr4_minor(d)) #define bsd_to_svr4_dev_t(d) svr4_makedev(umajor(d), uminor(d)) #endif /* !_SVR4_TYPES_H_ */ diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 04427c3bfd03..13b3019d207f 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -2657,13 +2657,13 @@ static int cp_modevent (module_t mod, int type, void *unused) struct cdevsw *cdsw; #if __FreeBSD_version >= 502103 - dev = udev2dev (makeudev(CDEV_MAJOR, 0)); + dev = findcdev (makedev(CDEV_MAJOR, 0)); #else dev = makedev (CDEV_MAJOR, 0); #endif switch (type) { case MOD_LOAD: - if (dev != NODEV && + if (dev != NULL && (cdsw = devsw (dev)) && cdsw->d_maj == CDEV_MAJOR) { printf ("Tau-PCI driver is already in system\n"); diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index a7462ab2f4fd..de07c716e846 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -2629,13 +2629,13 @@ static int ct_modevent (module_t mod, int type, void *unused) struct cdevsw *cdsw; #if __FreeBSD_version >= 502103 - dev = udev2dev (makeudev(CDEV_MAJOR, 0)); + dev = findcdev (makedev(CDEV_MAJOR, 0)); #else dev = makedev (CDEV_MAJOR, 0); #endif switch (type) { case MOD_LOAD: - if (dev != NODEV && + if (dev != NULL && (cdsw = devsw (dev)) && cdsw->d_maj == CDEV_MAJOR) { printf ("Tau-ISA driver is already in system\n"); diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 45c7f9efc1ee..b6b55c7d3ba4 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -3177,13 +3177,13 @@ static int cx_modevent (module_t mod, int type, void *unused) struct cdevsw *cdsw; #if __FreeBSD_version >= 502103 - dev = udev2dev (makeudev(CDEV_MAJOR, 0)); + dev = findcdev (makedev(CDEV_MAJOR, 0)); #else dev = makedev (CDEV_MAJOR, 0); #endif switch (type) { case MOD_LOAD: - if (dev != NODEV && + if (dev != NULL && (cdsw = devsw (dev)) && cdsw->d_maj == CDEV_MAJOR) { printf ("Sigma driver is already in system\n"); diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 7808ecbf40f1..53e038dad14b 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -162,7 +162,7 @@ __FBSDID("$FreeBSD$"); #define MINOR_MAGIC_MASK (CALLOUT_MASK | CONTROL_MASK) /* * Not all of the magic is parametrized in the following macros. 16 and - * 0xff are related to the bitfields in a udev_t. CY_MAX_PORTS must be + * 0xff are related to the bitfields in a dev_t. CY_MAX_PORTS must be * ((0xff & ~MINOR_MAGIC_MASK) + 1) for things to work. */ #define MINOR_TO_UNIT(mynor) (((mynor) >> 16) * CY_MAX_PORTS \ diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 5bdbbfbaff7a..c1b320d797a8 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -598,7 +598,7 @@ dcons_modevent(module_t mode, int type, void *data) #if CONS_NODEV gdb_arg = NULL; #else - gdbdev = NODEV; + gdbdev = NULL; #endif #endif #if __FreeBSD_version >= 500000 diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index c330290d2ed8..2d9184cda597 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -1017,7 +1017,7 @@ digi_loadmoduledata(struct digi_softc *sc) modfile = malloc(modlen + 6, M_TEMP, M_WAITOK); snprintf(modfile, modlen + 6, "digi_%s", sc->module); if ((res = linker_reference_module(modfile, NULL, &lf)) != 0) { - if (res == ENOENT && rootdev == NODEV) + if (res == ENOENT && rootdev == NULL) printf("%s: Failed to autoload module: No filesystem\n", modfile); else diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 5d104156ba03..cffb6369b747 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -848,7 +848,7 @@ fwdev_clone(void *arg, char *name, int namelen, struct cdev **dev) int devflag[NDEVTYPE] = {0, FWMEM_FLAG}; int i, unit = 0, sub = 0; - if (*dev != NODEV) + if (*dev != NULL) return; for (i = 0; i < NDEVTYPE; i++) diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c index 4c19e274daf3..df9f27e1efe4 100644 --- a/sys/dev/led/led.c +++ b/sys/dev/led/led.c @@ -234,13 +234,13 @@ led_create(led_t *func, void *priv, char const *name) sb = sbuf_new(NULL, NULL, SPECNAMELEN, SBUF_FIXEDLEN); if (sb == NULL) - return (NODEV); + return (NULL); sbuf_cpy(sb, "led/"); sbuf_cat(sb, name); sbuf_finish(sb); if (sbuf_overflowed(sb)) { sbuf_delete(sb); - return (NODEV); + return (NULL); } sc = malloc(sizeof *sc, M_LED, M_WAITOK | M_ZERO); diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 683d06be2c85..e27347b5433e 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -100,7 +100,7 @@ nmdm_clone(void *arg, char *name, int nameen, struct cdev **dev) char *p; struct cdev *d1, *d2; - if (*dev != NODEV) + if (*dev != NULL) return; if (strcmp(name, "nmdm") == 0) { p = NULL; diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 752dc421eaf7..65448107565f 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -406,7 +406,7 @@ snpopen(dev, flag, mode, td) * snp_tty == NULL is for inactive snoop devices. */ snp->snp_tty = NULL; - snp->snp_target = NODEV; + snp->snp_target = NULL; LIST_INSERT_HEAD(&snp_sclist, snp, snp_list); return (0); @@ -439,7 +439,7 @@ snp_detach(snp) printf("snp%d: bad attached tty data\n", snp->snp_unit); snp->snp_tty = NULL; - snp->snp_target = NODEV; + snp->snp_target = NULL; detach_notty: selwakeuppri(&snp->snp_sel, PZERO + 1); @@ -500,8 +500,8 @@ snpioctl(dev, cmd, data, flags, td) snp = dev->si_drv1; switch (cmd) { case SNPSTTY: - tdev = udev2dev(*((udev_t *)data)); - if (tdev == NODEV) + tdev = findcdev(*((dev_t *)data)); + if (tdev == NULL) return (snp_down(snp)); tp = snpdevtotty(tdev); @@ -512,7 +512,7 @@ snpioctl(dev, cmd, data, flags, td) s = spltty(); - if (snp->snp_target == NODEV) { + if (snp->snp_target == NULL) { tpo = snp->snp_tty; if (tpo) tpo->t_state &= ~TS_SNOOP; @@ -540,7 +540,7 @@ snpioctl(dev, cmd, data, flags, td) * SNPGTTY happy, else we can't know what is device * major/minor for tty. */ - *((udev_t *)data) = dev2udev(snp->snp_target); + *((dev_t *)data) = dev2udev(snp->snp_target); break; case FIONBIO: @@ -609,7 +609,7 @@ snp_clone(arg, name, namelen, dev) { int u, i; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name, NULL, "snp", &u) != 1) return; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 92009414c076..29fe27f94637 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1123,7 +1123,7 @@ dsp_clone(void *arg, char *name, int namelen, struct cdev **dev) int devtypes[3] = {SND_DEV_DSP, SND_DEV_DSP16, SND_DEV_AUDIO}; char *devnames[3] = {"dsp", "dspW", "audio"}; - if (*dev != NODEV) + if (*dev != NULL) return; if (pcm_devclass == NULL) return; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 47812fe5a046..135a6281d40b 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -483,7 +483,7 @@ mixer_clone(void *arg, char *name, int namelen, struct cdev **dev) { struct snddev_info *sd; - if (*dev != NODEV) + if (*dev != NULL) return; if (strcmp(name, "mixer") == 0) { sd = devclass_get_softc(pcm_devclass, snd_unit); diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 12f0739300ee..6c1a5497c8be 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -2622,7 +2622,7 @@ sc_change_cursor_shape(scr_stat *scp, int flags, int base, int height) } for (i = sc->first_vty; i < sc->first_vty + sc->vtys; ++i) { - if ((dev = SC_DEV(sc, i)) == NODEV) + if ((dev = SC_DEV(sc, i)) == NULL) continue; if ((scp = sc_get_stat(dev)) == NULL) continue; diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 3306c96ed222..062176b4ab40 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -522,7 +522,7 @@ vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev) struct volume *vol; int i; - if (*dev != NODEV) + if (*dev != NULL) return; if (strncmp(name, "vinum/", sizeof("vinum/") - 1) != 0) return; diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c index 8c7e0386ce97..989af8888924 100644 --- a/sys/dev/vinum/vinumconfig.c +++ b/sys/dev/vinum/vinumconfig.c @@ -476,7 +476,7 @@ get_empty_drive(void) bzero(drive, sizeof(struct drive)); drive->driveno = driveno; /* put number in structure */ drive->flags |= VF_NEWBORN; /* newly born drive */ - drive->dev = NODEV; + drive->dev = NULL; strcpy(drive->devicename, "unknown"); /* and make the name ``unknown'' */ return driveno; /* return the index */ } @@ -595,7 +595,7 @@ free_drive(struct drive *drive) close_locked_drive(drive); /* close it */ if (drive->freelist) Free(drive->freelist); - if (drive->dev != NODEV) + if (drive->dev != NULL) dev_rel(drive->dev); bzero(drive, sizeof(struct drive)); /* this also sets drive_unallocated */ unlockdrive(drive); diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index e77291e32e9b..7edde1db8767 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -56,7 +56,7 @@ open_drive(struct drive *drive, struct thread *td, int verbose) return EBUSY; /* don't do it again */ drive->dev = getdiskbyname(drive->devicename); - if (drive->dev == NODEV) /* didn't find anything */ + if (drive->dev == NULL) /* didn't find anything */ return ENOENT; dev_ref(drive->dev); diff --git a/sys/fs/cd9660/cd9660_node.h b/sys/fs/cd9660/cd9660_node.h index a5b228c45f06..fb74f3998483 100644 --- a/sys/fs/cd9660/cd9660_node.h +++ b/sys/fs/cd9660/cd9660_node.h @@ -52,7 +52,7 @@ typedef struct { uid_t iso_uid; /* owner user id */ gid_t iso_gid; /* owner group id */ short iso_links; /* links of file */ - udev_t iso_rdev; /* Major/Minor number for special */ + dev_t iso_rdev; /* Major/Minor number for special */ } ISO_RRIP_INODE; diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c index 48eac6d2a3b1..f20b4db10516 100644 --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -413,9 +413,9 @@ cd9660_rrip_device(p,ana) low = isonum_733(p->dev_t_low); if (high == 0) - ana->inop->inode.iso_rdev = makeudev(umajor(low), uminor(low)); + ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low)); else - ana->inop->inode.iso_rdev = makeudev(high, uminor(low)); + ana->inop->inode.iso_rdev = makedev(high, uminor(low)); ana->fields &= ~ISO_SUSP_DEVICE; return ISO_SUSP_DEVICE; } diff --git a/sys/fs/coda/coda.h b/sys/fs/coda/coda.h index 90e7e2ae7202..5fb352effb82 100644 --- a/sys/fs/coda/coda.h +++ b/sys/fs/coda/coda.h @@ -87,7 +87,7 @@ typedef unsigned long long u_quad_t; typedef unsigned long long u_quad_t; #endif #else -#define cdev_t udev_t +#define cdev_t dev_t #endif #ifdef __CYGWIN32__ diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 0ce6e466e87e..89d4de05dead 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -186,7 +186,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name,NULL,"cfs",&u) != 1) return; diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index f0bc3c296bdf..7e4d32109045 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -212,7 +212,7 @@ venus_open(void *mdp, CodaFid *fid, int flag, error = coda_call(mdp, Isize, &Osize, (char *)inp); if (!error) { - *dev = udev2dev(outp->dev); + *dev = findcdev(outp->dev); *inode = outp->inode; } diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index cbc836a22d02..2d7468a12718 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -140,7 +140,7 @@ loop: if (dev == NULL) return (ENOENT); } else { - dev = NODEV; + dev = NULL; } error = getnewvnode("devfs", mp, devfs_vnodeop_p, &vp); if (error != 0) { @@ -382,9 +382,9 @@ devfs_lookupx(ap) if (pname == NULL) goto notfound; - cdev = NODEV; + cdev = NULL; EVENTHANDLER_INVOKE(dev_clone, pname, strlen(pname), &cdev); - if (cdev == NODEV) + if (cdev == NULL) goto notfound; devfs_populate(dmp); @@ -660,7 +660,7 @@ devfs_reclaim(ap) if (de != NULL) de->de_vnode = NULL; vp->v_data = NULL; - if (vp->v_rdev != NODEV && vp->v_rdev != NULL) { + if (vp->v_rdev != NULL && vp->v_rdev != NULL) { i = vcount(vp); if ((vp->v_rdev->si_flags & SI_CHEAPCLONE) && i == 0 && (vp->v_rdev->si_flags & SI_NAMED)) diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 7d12a58587a8..ec58af649ac8 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -144,7 +144,7 @@ spec_open(ap) if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV)) return (ENXIO); - if (dev == NODEV) + if (dev == NULL) return (ENXIO); dsw = devsw(dev); diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 54f585e03aa1..5c16763c659e 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -103,7 +103,7 @@ g_dev_clone(void *arg __unused, char *name, int namelen __unused, struct cdev ** { struct g_geom *gp; - if (*dev != NODEV) + if (*dev != NULL) return; g_waitidle(); diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index a5b228c45f06..fb74f3998483 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -52,7 +52,7 @@ typedef struct { uid_t iso_uid; /* owner user id */ gid_t iso_gid; /* owner group id */ short iso_links; /* links of file */ - udev_t iso_rdev; /* Major/Minor number for special */ + dev_t iso_rdev; /* Major/Minor number for special */ } ISO_RRIP_INODE; diff --git a/sys/isofs/cd9660/cd9660_rrip.c b/sys/isofs/cd9660/cd9660_rrip.c index 48eac6d2a3b1..f20b4db10516 100644 --- a/sys/isofs/cd9660/cd9660_rrip.c +++ b/sys/isofs/cd9660/cd9660_rrip.c @@ -413,9 +413,9 @@ cd9660_rrip_device(p,ana) low = isonum_733(p->dev_t_low); if (high == 0) - ana->inop->inode.iso_rdev = makeudev(umajor(low), uminor(low)); + ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low)); else - ana->inop->inode.iso_rdev = makeudev(high, uminor(low)); + ana->inop->inode.iso_rdev = makedev(high, uminor(low)); ana->fields &= ~ISO_SUSP_DEVICE; return ISO_SUSP_DEVICE; } diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 63d7891c74b7..5dca0f60dd13 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -285,7 +285,7 @@ acct_process(td) if ((p->p_flag & P_CONTROLT) && p->p_pgrp->pg_session->s_ttyp) acct.ac_tty = dev2udev(p->p_pgrp->pg_session->s_ttyp->t_dev); else - acct.ac_tty = NOUDEV; + acct.ac_tty = NODEV; SESS_UNLOCK(p->p_session); /* (8) The boolean flags that tell how the process terminated, etc. */ diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 216a7772c543..b417b730adfb 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -51,7 +51,7 @@ extern unsigned char reserved_majors[256]; /* * This is the number of hash-buckets. Experiements with 'real-life' - * udev_t's show that a prime halfway between two powers of two works + * dev_t's show that a prime halfway between two powers of two works * best. */ #define DEVT_HASH 83 @@ -70,6 +70,8 @@ SYSCTL_INT(_debug, OID_AUTO, free_devt, CTLFLAG_RW, &free_devt, 0, ""); static struct mtx devmtx; static void freedev(struct cdev *dev); +static struct cdev *newdev(int x, int y); + static void devlock(void) @@ -125,8 +127,6 @@ cdevsw_rel(struct cdevsw *csw) devunlock(); } -static struct cdev *makedev(int x, int y); - int nullop(void) { @@ -247,16 +247,16 @@ devsw(struct cdev *dev) int major(struct cdev *x) { - if (x == NODEV) - return NOUDEV; + if (x == NULL) + return NODEV; return((x->si_udev >> 8) & 0xff); } int minor(struct cdev *x) { - if (x == NODEV) - return NOUDEV; + if (x == NULL) + return NODEV; return(x->si_udev & 0xffff00ff); } @@ -265,8 +265,8 @@ dev2unit(struct cdev *x) { int i; - if (x == NODEV) - return NOUDEV; + if (x == NULL) + return NODEV; i = minor(x); return ((i & 0xff) | (i >> 8)); } @@ -304,14 +304,14 @@ allocdev(void) } static struct cdev * -makedev(int x, int y) +newdev(int x, int y) { struct cdev *si; - udev_t udev; + dev_t udev; int hash; - if (x == umajor(NOUDEV) && y == uminor(NOUDEV)) - panic("makedev of NOUDEV"); + if (x == umajor(NODEV) && y == uminor(NODEV)) + panic("newdev of NODEV"); udev = (x << 8) | y; hash = udev % DEVT_HASH; LIST_FOREACH(si, &dev_hash[hash], si_hash) { @@ -337,48 +337,42 @@ freedev(struct cdev *dev) } } -udev_t +dev_t dev2udev(struct cdev *x) { - if (x == NODEV) - return (NOUDEV); + if (x == NULL) + return (NODEV); return (x->si_udev); } struct cdev * -udev2dev(udev_t udev) +findcdev(dev_t udev) { struct cdev *si; int hash; - if (udev == NOUDEV) - return (NODEV); + if (udev == NODEV) + return (NULL); hash = udev % DEVT_HASH; LIST_FOREACH(si, &dev_hash[hash], si_hash) { if (si->si_udev == udev) return (si); } - return (NODEV); + return (NULL); } int -uminor(udev_t dev) +uminor(dev_t dev) { return (dev & 0xffff00ff); } int -umajor(udev_t dev) +umajor(dev_t dev) { return ((dev & 0xff00) >> 8); } -udev_t -makeudev(int x, int y) -{ - return ((x << 8) | y); -} - static void find_major(struct cdevsw *devsw) { @@ -479,7 +473,7 @@ make_dev(struct cdevsw *devsw, int minornr, uid_t uid, gid_t gid, int perms, con if (!(devsw->d_flags & D_INIT)) prep_cdevsw(devsw); - dev = makedev(devsw->d_maj, minornr); + dev = newdev(devsw->d_maj, minornr); if (dev->si_flags & SI_CHEAPCLONE && dev->si_flags & SI_NAMED && dev->si_devsw == devsw) { @@ -750,7 +744,7 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev ** } if (unit == -1) unit = low & CLONE_UNITMASK; - dev = makedev(csw->d_maj, unit2minor(unit | extra)); + dev = newdev(csw->d_maj, unit2minor(unit | extra)); KASSERT(!(dev->si_flags & SI_CLONELIST), ("Dev %p should not be on clonelist", dev)); if (dl != NULL) @@ -794,16 +788,16 @@ static int sysctl_devname(SYSCTL_HANDLER_ARGS) { int error; - udev_t ud; + dev_t ud; struct cdev *dev; error = SYSCTL_IN(req, &ud, sizeof (ud)); if (error) return (error); - if (ud == NOUDEV) + if (ud == NODEV) return(EINVAL); - dev = udev2dev(ud); - if (dev == NODEV) + dev = findcdev(ud); + if (dev == NULL) error = ENOENT; else error = SYSCTL_OUT(req, dev->si_name, strlen(dev->si_name) + 1); diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index daf51b034fbf..c7571245a247 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -800,7 +800,7 @@ fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp) if (tp->t_session) kp->ki_tsid = tp->t_session->s_sid; } else - kp->ki_tdev = NOUDEV; + kp->ki_tdev = NODEV; if (p->p_comm[0] != '\0') { strlcpy(kp->ki_comm, p->p_comm, sizeof(kp->ki_comm)); strlcpy(kp->ki_ocomm, p->p_comm, sizeof(kp->ki_ocomm)); @@ -1012,7 +1012,7 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) SESS_LOCK(p->p_session); if (p->p_session->s_ttyp == NULL || dev2udev(p->p_session->s_ttyp->t_dev) != - (udev_t)name[0]) { + (dev_t)name[0]) { SESS_UNLOCK(p->p_session); PROC_UNLOCK(p); continue; diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 49c6a4131350..491bc9ec183e 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -324,7 +324,7 @@ boot(int howto) for (bp = &buf[nbuf]; --bp >= buf; ) { if (((bp->b_flags&B_INVAL) == 0 && BUF_REFCNT(bp)) || ((bp->b_flags & (B_DELWRI|B_INVAL)) == B_DELWRI)) { - if (bp->b_dev == NODEV) { + if (bp->b_dev == NULL) { TAILQ_REMOVE(&mountlist, bp->b_vp->v_mount, mnt_list); continue; diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index a9bea7cea674..e44ea5f9dd05 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -103,7 +103,7 @@ static STAILQ_HEAD(, cn_device) cn_devlist = (cnd == NULL || cnd->cnd_vp == NULL || \ (cnd->cnd_vp->v_type == VBAD && !cn_devopen(cnd, td, 1))) -static udev_t cn_udev_t; +static dev_t cn_udev_t; SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLFLAG_RD, &cn_udev_t, sizeof cn_udev_t, "T,struct cdev *", ""); @@ -371,9 +371,9 @@ sysctl_kern_consmute(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); if (ocn_mute && !cn_mute && cn_is_open) - error = cnopen(NODEV, openflag, 0, curthread); + error = cnopen(NULL, openflag, 0, curthread); else if (!ocn_mute && cn_mute && cn_is_open) { - error = cnclose(NODEV, openflag, 0, curthread); + error = cnclose(NULL, openflag, 0, curthread); cn_is_open = 1; /* XXX hack */ } return (error); diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index b4082a384690..1e5d20228a52 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -143,7 +143,7 @@ ptyinit(struct cdev *devc) n = minor(devc); /* For now we only map the lower 8 bits of the minor */ if (n & ~0xff) - return (NODEV); + return (NULL); devc->si_flags &= ~SI_CHEAPCLONE; @@ -777,7 +777,7 @@ pty_clone(void *arg, char *name, int namelen, struct cdev **dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (bcmp(name, "pty", 3) != 0) return; diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 85b0eacba66e..e467dd304364 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -58,7 +58,7 @@ static void ctty_clone(void *arg, char *name, int namelen, struct cdev **dev) { - if (*dev != NODEV) + if (*dev != NULL) return; if (strcmp(name, "tty")) return; diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 18a4274c336f..16d80b43dd56 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -447,7 +447,7 @@ uipc_sense(struct socket *so, struct stat *sb) so2 = unp->unp_conn->unp_socket; sb->st_blksize += so2->so_rcv.sb_cc; } - sb->st_dev = NOUDEV; + sb->st_dev = NODEV; if (unp->unp_ino == 0) unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino; sb->st_ino = unp->unp_ino; diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 19b672621857..1bfb331a1fb6 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -517,7 +517,7 @@ bufinit(void) bp = &buf[i]; bzero(bp, sizeof *bp); bp->b_flags = B_INVAL; /* we're just an empty header */ - bp->b_dev = NODEV; + bp->b_dev = NULL; bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; bp->b_qindex = QUEUE_EMPTY; @@ -1413,7 +1413,7 @@ brelse(struct buf * bp) bp->b_qindex = QUEUE_EMPTY; } TAILQ_INSERT_HEAD(&bufqueues[bp->b_qindex], bp, b_freelist); - bp->b_dev = NODEV; + bp->b_dev = NULL; /* buffers with junk contents */ } else if (bp->b_flags & (B_INVAL | B_NOCACHE | B_RELBUF) || (bp->b_ioflags & BIO_ERROR)) { @@ -1423,7 +1423,7 @@ brelse(struct buf * bp) panic("losing buffer 2"); bp->b_qindex = QUEUE_CLEAN; TAILQ_INSERT_HEAD(&bufqueues[QUEUE_CLEAN], bp, b_freelist); - bp->b_dev = NODEV; + bp->b_dev = NULL; /* remaining buffers */ } else { if (bp->b_flags & B_DELWRI) @@ -1917,7 +1917,7 @@ restart: bp->b_ioflags = 0; bp->b_xflags = 0; bp->b_vflags = 0; - bp->b_dev = NODEV; + bp->b_dev = NULL; bp->b_vp = NULL; bp->b_blkno = bp->b_lblkno = 0; bp->b_offset = NOOFFSET; diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 8eaa6e9ce8b9..82086ad5b4bf 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -147,7 +147,7 @@ static char *cdrom_rootdevnames[] = { /* legacy find-root code */ char *rootdevnames[2] = {NULL, NULL}; static int setrootbyname(char *name); -struct cdev *rootdev = NODEV; +struct cdev *rootdev = NULL; /* * Has to be dynamic as the value of rootdev can change; however, it can't @@ -162,7 +162,7 @@ sysctl_rootdev(SYSCTL_HANDLER_ARGS) /* _RD prevents this from happening. */ KASSERT(req->newptr == NULL, ("Attempt to change root device name")); - if (rootdev != NODEV) + if (rootdev != NULL) error = sysctl_handle_string(oidp, rootdev->si_name, 0, req); else error = sysctl_handle_string(oidp, "", 0, req); @@ -1339,7 +1339,7 @@ vfs_mountroot_try(char *mountfrom) printf("setrootbyname failed\n"); /* If the root device is a type "memory disk", mount RW */ - if (rootdev != NODEV && devsw(rootdev) != NULL) { + if (rootdev != NULL && devsw(rootdev) != NULL) { devname = devtoname(rootdev); if (devname[0] == 'm' && devname[1] == 'd') mp->mnt_flag &= ~MNT_RDONLY; @@ -1457,7 +1457,7 @@ getdiskbyname(char *name) { if (!bcmp(cp, "/dev/", 5)) cp += 5; - dev = NODEV; + dev = NULL; EVENTHANDLER_INVOKE(dev_clone, cp, strlen(cp), &dev); return (dev); } @@ -1472,7 +1472,7 @@ setrootbyname(char *name) struct cdev *diskdev; diskdev = getdiskbyname(name); - if (diskdev != NODEV) { + if (diskdev != NULL) { rootdev = diskdev; return (0); } @@ -1491,7 +1491,7 @@ DB_SHOW_COMMAND(disk, db_getdiskbyname) return; } dev = getdiskbyname(modif); - if (dev != NODEV) + if (dev != NULL) db_printf("struct cdev *= %p\n", dev); else db_printf("No disk device matched.\n"); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0346fa2130d1..96fdaab59f45 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -367,7 +367,7 @@ vfs_getnewfsid(mp) tfsid.val[1] = mtype; mtype = (mtype & 0xFF) << 24; for (;;) { - tfsid.val[0] = makeudev(255, + tfsid.val[0] = makedev(255, mtype | ((mntid_base & 0xFF00) << 8) | (mntid_base & 0xFF)); mntid_base++; if (vfs_getvfs(&tfsid) == NULL) @@ -1744,7 +1744,7 @@ bdevvp(dev, vpp) struct vnode *nvp; int error; - if (dev == NODEV) { + if (dev == NULL) { *vpp = NULLVP; return (ENXIO); } @@ -1786,7 +1786,7 @@ v_incr_usecount(struct vnode *vp, int delta) struct vnode * addaliasu(nvp, nvp_rdev) struct vnode *nvp; - udev_t nvp_rdev; + dev_t nvp_rdev; { struct vnode *ovp; vop_t **ops; @@ -1796,8 +1796,8 @@ addaliasu(nvp, nvp_rdev) return (nvp); if (nvp->v_type != VCHR) panic("addaliasu on non-special vnode"); - dev = udev2dev(nvp_rdev); - if (dev == NODEV) + dev = findcdev(nvp_rdev); + if (dev == NULL) return (nvp); /* * Check to see if we have a bdevvp vnode with no associated @@ -1836,7 +1836,7 @@ addaliasu(nvp, nvp_rdev) } /* This is a local helper function that do the same as addaliasu, but for a - * struct cdev *instead of an udev_t. */ + * struct cdev *instead of an dev_t. */ static void addalias(nvp, dev) struct vnode *nvp; @@ -2581,7 +2581,7 @@ vgonel(vp, td) * if it is on one. */ VI_LOCK(vp); - if (vp->v_type == VCHR && vp->v_rdev != NODEV) { + if (vp->v_type == VCHR && vp->v_rdev != NULL) { mtx_lock(&spechash_mtx); SLIST_REMOVE(&vp->v_rdev->si_hlist, vp, vnode, v_specnext); vp->v_rdev->si_usecount -= vp->v_usecount; @@ -3407,7 +3407,7 @@ vn_todev(vp) { if (vp->v_type != VCHR) - return (NODEV); + return (NULL); return (vp->v_rdev); } diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 4b3cf45fa9d0..189b72fe4ffd 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1578,7 +1578,7 @@ bpf_clone(arg, name, namelen, dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name, NULL, "bpf", &u) != 1) return; diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index 7f2f8564277e..7eb4ac0c86bf 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -228,7 +228,7 @@ tapclone(arg, name, namelen, dev) int i, unit; char *device_name = name; - if (*dev != NODEV) + if (*dev != NULL) return; device_name = TAP; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 975b1c0474d0..b5b32987f1c5 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -138,7 +138,7 @@ tunclone(void *arg, char *name, int namelen, struct cdev **dev) { int u, i; - if (*dev != NODEV) + if (*dev != NULL) return; if (strcmp(name, TUNNAME) == 0) { diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index c28e772351a1..1068dad9a390 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -408,7 +408,7 @@ USB_ATTACH(ubt) sc->sc_hook = NULL; /* Device part */ - sc->sc_ctrl_dev = sc->sc_intr_dev = sc->sc_bulk_dev = NODEV; + sc->sc_ctrl_dev = sc->sc_intr_dev = sc->sc_bulk_dev = NULL; sc->sc_refcnt = sc->sc_dying = 0; /* @@ -1903,8 +1903,8 @@ ng_ubt_newhook(node_p node, hook_p hook, char const *name) ubt_softc_p sc = (ubt_softc_p) NG_NODE_PRIVATE(node); /* Refuse to create new hook if device interface is active */ - if (sc->sc_ctrl_dev != NODEV || sc->sc_intr_dev != NODEV || - sc->sc_bulk_dev != NODEV) + if (sc->sc_ctrl_dev != NULL || sc->sc_intr_dev != NULL || + sc->sc_bulk_dev != NULL) return (EBUSY); if (strcmp(name, NG_UBT_HOOK) != 0) @@ -1929,8 +1929,8 @@ ng_ubt_connect(hook_p hook) usbd_status status; /* Refuse to connect hook if device interface is active */ - if (sc->sc_ctrl_dev != NODEV || sc->sc_intr_dev != NODEV || - sc->sc_bulk_dev != NODEV) + if (sc->sc_ctrl_dev != NULL || sc->sc_intr_dev != NULL || + sc->sc_bulk_dev != NULL) return (EBUSY); NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook)); @@ -2658,14 +2658,14 @@ ubt_create_device_nodes(ubt_softc_p sc) "%s: %s - hook != NULL!\n", __func__, USBDEVNAME(sc->sc_dev))); /* Control device */ - if (sc->sc_ctrl_dev == NODEV) + if (sc->sc_ctrl_dev == NULL) sc->sc_ctrl_dev = make_dev(&ubt_cdevsw, UBT_MINOR(USBDEVUNIT(sc->sc_dev), 0), UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); /* Interrupt device */ - if (sc->sc_intr_dev == NODEV && sc->sc_intr_ep != -1) { + if (sc->sc_intr_dev == NULL && sc->sc_intr_ep != -1) { ep = UE_GET_ADDR(sc->sc_intr_ep); sc->sc_intr_dev = make_dev(&ubt_cdevsw, UBT_MINOR(USBDEVUNIT(sc->sc_dev), ep), @@ -2679,7 +2679,7 @@ ubt_create_device_nodes(ubt_softc_p sc) * XXX note that address of the in and out endpoint should be the same */ - if (sc->sc_bulk_dev == NODEV && + if (sc->sc_bulk_dev == NULL && sc->sc_bulk_in_ep != -1 && sc->sc_bulk_out_ep != -1 && UE_GET_ADDR(sc->sc_bulk_in_ep) == UE_GET_ADDR(sc->sc_bulk_out_ep)) { ep = UE_GET_ADDR(sc->sc_bulk_in_ep); @@ -2712,19 +2712,19 @@ ubt_destroy_device_nodes(ubt_softc_p sc) sc->sc_refcnt = 0; /* Destroy device nodes */ - if (sc->sc_bulk_dev != NODEV) { + if (sc->sc_bulk_dev != NULL) { destroy_dev(sc->sc_bulk_dev); - sc->sc_bulk_dev = NODEV; + sc->sc_bulk_dev = NULL; } - if (sc->sc_intr_dev != NODEV) { + if (sc->sc_intr_dev != NULL) { destroy_dev(sc->sc_intr_dev); - sc->sc_intr_dev = NODEV; + sc->sc_intr_dev = NULL; } - if (sc->sc_ctrl_dev != NODEV) { + if (sc->sc_ctrl_dev != NULL) { destroy_dev(sc->sc_ctrl_dev); - sc->sc_ctrl_dev = NODEV; + sc->sc_ctrl_dev = NULL; } } /* ubt_destroy_device_nodes */ diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c index f957cf52e8ed..53f367eb3e05 100644 --- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c +++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c @@ -149,7 +149,7 @@ USB_ATTACH(ubtbcmfw) USB_ATTACH_SETUP; printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); - sc->sc_ctrl_dev = sc->sc_intr_in_dev = sc->sc_bulk_out_dev = NODEV; + sc->sc_ctrl_dev = sc->sc_intr_in_dev = sc->sc_bulk_out_dev = NULL; sc->sc_intr_in_pipe = sc->sc_bulk_out_pipe = NULL; sc->sc_flags = sc->sc_refcnt = sc->sc_dying = 0; @@ -229,19 +229,19 @@ USB_DETACH(ubtbcmfw) } /* Destroy device nodes */ - if (sc->sc_bulk_out_dev != NODEV) { + if (sc->sc_bulk_out_dev != NULL) { destroy_dev(sc->sc_bulk_out_dev); - sc->sc_bulk_out_dev = NODEV; + sc->sc_bulk_out_dev = NULL; } - if (sc->sc_intr_in_dev != NODEV) { + if (sc->sc_intr_in_dev != NULL) { destroy_dev(sc->sc_intr_in_dev); - sc->sc_intr_in_dev = NODEV; + sc->sc_intr_in_dev = NULL; } - if (sc->sc_ctrl_dev != NODEV) { + if (sc->sc_ctrl_dev != NULL) { destroy_dev(sc->sc_ctrl_dev); - sc->sc_ctrl_dev = NODEV; + sc->sc_ctrl_dev = NULL; } /* Close pipes */ diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c index 78a60680f925..a69d0f0d100b 100644 --- a/sys/netsmb/smb_dev.c +++ b/sys/netsmb/smb_dev.c @@ -103,7 +103,7 @@ nsmb_dev_clone(void *arg, char *name, int namelen, struct cdev **dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name, NULL, NSMB_NAME, &u) != 1) return; @@ -397,7 +397,7 @@ smb_dev2share(int fd, int mode, struct smb_cred *scred, return EBADF; } dev = vn_todev(vp); - if (dev == NODEV) { + if (dev == NULL) { fdrop(fp, curthread); return EBADF; } diff --git a/sys/nfs4client/nfs4_vn_subs.c b/sys/nfs4client/nfs4_vn_subs.c index 28eb52d88a40..cded7f57a5de 100644 --- a/sys/nfs4client/nfs4_vn_subs.c +++ b/sys/nfs4client/nfs4_vn_subs.c @@ -83,7 +83,7 @@ nfs4_vnop_loadattrcache(struct vnode *vp, struct nfsv4_fattr *fap, vtyp = nv3tov_type[fap->fa4_type & 0x7]; vmode = (fap->fa4_valid & FA4V_MODE) ? fap->fa4_mode : 0777; rdev = (fap->fa4_valid & FA4V_RDEV) ? - makeudev(fap->fa4_rdev_major, fap->fa4_rdev_minor) : 0; + makedev(fap->fa4_rdev_major, fap->fa4_rdev_minor) : 0; if (fap->fa4_valid & FA4V_MTIME) mtime = fap->fa4_mtime; else diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 6a3fea3d7cff..af8f3c312e8f 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -495,7 +495,7 @@ nfs_loadattrcache(struct vnode **vpp, struct mbuf **mdp, caddr_t *dposp, if (v3) { vtyp = nfsv3tov_type(fp->fa_type); vmode = fxdr_unsigned(u_short, fp->fa_mode); - rdev = makeudev(fxdr_unsigned(int, fp->fa3_rdev.specdata1), + rdev = makedev(fxdr_unsigned(int, fp->fa3_rdev.specdata1), fxdr_unsigned(int, fp->fa3_rdev.specdata2)); fxdr_nfsv3time(&fp->fa3_mtime, &mtime); } else { diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index e57840159e8e..a861c3946f01 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -2060,7 +2060,7 @@ nfsrv_mknod(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, tl = nfsm_dissect(u_int32_t *, 2 * NFSX_UNSIGNED); major = fxdr_unsigned(u_int32_t, *tl++); minor = fxdr_unsigned(u_int32_t, *tl); - vap->va_rdev = makeudev(major, minor); + vap->va_rdev = makedev(major, minor); } /* diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 478fd419543d..0b3467d266ed 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -53,7 +53,6 @@ typedef __uint8_t __sa_family_t; typedef __uint32_t __socklen_t; typedef long __suseconds_t; /* microseconds (signed) */ typedef __int32_t __timer_t; /* timer_gettime()... */ -typedef __uint32_t __udev_t; /* device number */ typedef __uint32_t __uid_t; typedef unsigned int __useconds_t; /* microseconds (unsigned) */ @@ -80,9 +79,7 @@ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ -#ifndef _KERNEL -typedef __udev_t __dev_t; /* device number */ -#endif +typedef __uint32_t __dev_t; /* device number */ typedef __uint32_t __fixpt_t; /* fixed point number */ diff --git a/sys/sys/acct.h b/sys/sys/acct.h index ecd6a5d505a1..167a90ccb922 100644 --- a/sys/sys/acct.h +++ b/sys/sys/acct.h @@ -56,7 +56,7 @@ struct acct { gid_t ac_gid; /* group id */ u_int16_t ac_mem; /* average memory usage */ comp_t ac_io; /* count of IO blocks */ - __udev_t ac_tty; /* controlling tty */ + __dev_t ac_tty; /* controlling tty */ #define AFORK 0x01 /* forked but not exec'ed */ /* ASU is no longer supported */ diff --git a/sys/sys/conf.h b/sys/sys/conf.h index d97db9350a93..e90713db213c 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -64,7 +64,7 @@ struct cdev { struct timespec si_atime; struct timespec si_ctime; struct timespec si_mtime; - udev_t si_udev; + dev_t si_udev; int si_refcount; LIST_ENTRY(cdev) si_list; LIST_ENTRY(cdev) si_clone; diff --git a/sys/sys/param.h b/sys/sys/param.h index 67a8e9831ae0..08fe7e85de55 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -55,7 +55,7 @@ * scheme is: <0 if release branch, otherwise 1>xx */ #undef __FreeBSD_version -#define __FreeBSD_version 502116 /* Master, propagated to newvers */ +#define __FreeBSD_version 502117 /* Master, propagated to newvers */ #ifndef LOCORE #include @@ -185,13 +185,8 @@ #define NBPW sizeof(int) /* number of bytes per word (integer) */ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ -#ifdef _KERNEL -#define NOUDEV (udev_t)(-1) /* non-existent device */ -#define NOMAJ 256 /* non-existent device */ -#define NODEV NULL /* non-existent device */ -#else + #define NODEV (dev_t)(-1) /* non-existent device */ -#endif #define CBLOCK 128 /* Clist block size, must be a power of 2. */ #define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h index 026dd7aa1eab..992be9b43aad 100644 --- a/sys/sys/snoop.h +++ b/sys/sys/snoop.h @@ -30,8 +30,8 @@ * detached from its current tty. */ -#define SNPSTTY _IOW('T', 90, udev_t) -#define SNPGTTY _IOR('T', 89, udev_t) +#define SNPSTTY _IOW('T', 90, dev_t) +#define SNPGTTY _IOR('T', 89, dev_t) /* * These values would be returned by FIONREAD ioctl diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 0f7f4a33d8c0..0f7e349404b5 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -44,9 +44,7 @@ /* XXX missing blkcnt_t, blksize_t. */ #ifndef _DEV_T_DECLARED -#ifndef _KERNEL typedef __dev_t dev_t; -#endif #define _DEV_T_DECLARED #endif @@ -123,13 +121,13 @@ struct ostat { #endif /* __BSD_VISIBLE */ struct stat { - __udev_t st_dev; /* inode's device */ + __dev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ mode_t st_mode; /* inode protection mode */ nlink_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ - __udev_t st_rdev; /* device type */ + __dev_t st_rdev; /* device type */ #if __BSD_VISIBLE struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ @@ -170,13 +168,13 @@ struct stat { #if __BSD_VISIBLE struct nstat { - __udev_t st_dev; /* inode's device */ + __dev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */ __uint32_t st_mode; /* inode protection mode */ __uint32_t st_nlink; /* number of hard links */ uid_t st_uid; /* user ID of the file's owner */ gid_t st_gid; /* group ID of the file's group */ - __udev_t st_rdev; /* device type */ + __dev_t st_rdev; /* device type */ struct timespec st_atimespec; /* time of last access */ struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last file status change */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 1a06d821ca22..a1f67bb07302 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -316,11 +316,10 @@ void wakeup_one(void *chan) __nonnull(1); int major(struct cdev *x); int minor(struct cdev *x); -udev_t dev2udev(struct cdev *x); -struct cdev *udev2dev(udev_t x); -int uminor(udev_t dev); -int umajor(udev_t dev); -udev_t makeudev(int x, int y); +dev_t dev2udev(struct cdev *x); +struct cdev *findcdev(dev_t x); +int uminor(dev_t dev); +int umajor(dev_t dev); /* XXX: Should be void nanodelay(u_int nsec); */ void DELAY(int usec); diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 1b8958bd6f35..a51a6e4b8692 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -82,7 +82,7 @@ struct tty { int t_line; /* Interface to device drivers. */ union { struct cdev *t_kdev; /* Device. */ - udev_t t_udev; /* Userland (sysctl) instance. */ + dev_t t_udev; /* Userland (sysctl) instance. */ void *t_devp; /* Keep user/kernel size in sync. */ } ttyu; int t_state; /* Device and driver (TS*) state. */ @@ -141,7 +141,7 @@ struct xtty { long xt_cancc; /* Canonical queue statistics. */ long xt_outcc; /* Output queue statistics. */ int xt_line; /* Interface to device drivers. */ - udev_t xt_dev; /* Userland (sysctl) instance. */ + dev_t xt_dev; /* Userland (sysctl) instance. */ int xt_state; /* Device and driver (TS*) state. */ int xt_flags; /* Tty flags. */ int xt_timeout; /* Timeout for ttywait(). */ diff --git a/sys/sys/types.h b/sys/sys/types.h index 87d03d92d291..6de77ac53b67 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -131,9 +131,7 @@ typedef __critical_t critical_t; /* Critical section value */ typedef __int64_t daddr_t; /* disk address */ #ifndef _DEV_T_DECLARED -#ifndef _KERNEL typedef __dev_t dev_t; /* device number or struct cdev */ -#endif #define _DEV_T_DECLARED #endif @@ -235,7 +233,6 @@ typedef __timer_t timer_t; #endif typedef __u_register_t u_register_t; -typedef __udev_t udev_t; /* device number */ #ifndef _UID_T_DECLARED typedef __uid_t uid_t; /* user id */ @@ -292,9 +289,10 @@ typedef struct vm_page *vm_page_t; */ #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ #endif /* !_KERNEL */ +#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ + /* * These declarations belong elsewhere, but are repeated here and in * to give broken programs a better chance of working with diff --git a/sys/sys/user.h b/sys/sys/user.h index 0c1d00543423..c6fc22da2aa4 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -108,7 +108,7 @@ struct kinfo_proc { pid_t ki_sid; /* Process session ID */ pid_t ki_tsid; /* Terminal session ID */ short ki_jobc; /* job control counter */ - udev_t ki_tdev; /* controlling tty dev */ + dev_t ki_tdev; /* controlling tty dev */ sigset_t ki_siglist; /* Signals arrived but not delivered */ sigset_t ki_sigmask; /* Current signal mask */ sigset_t ki_sigignore; /* Signals being ignored */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 10df935c595f..3fc66c4ee913 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -153,7 +153,7 @@ struct vnode { const char *filename; /* Source file doing locking */ int line; /* Line number doing locking */ #endif - udev_t v_cachedfs; /* cached fs id */ + dev_t v_cachedfs; /* cached fs id */ ino_t v_cachedid; /* cached file id */ }; #define v_mountedhere v_un.vu_mountedhere @@ -179,9 +179,9 @@ struct xvnode { union { void *xvu_socket; /* socket, if VSOCK */ void *xvu_fifo; /* fifo, if VFIFO */ - udev_t xvu_rdev; /* maj/min, if VBLK/VCHR */ + dev_t xvu_rdev; /* maj/min, if VBLK/VCHR */ struct { - udev_t xvu_dev; /* device, if VDIR/VREG/VLNK */ + dev_t xvu_dev; /* device, if VDIR/VREG/VLNK */ ino_t xvu_ino; /* id, if VDIR/VREG/VLNK */ } xv_uns; } xv_un; @@ -247,7 +247,7 @@ struct vattr { short va_nlink; /* number of references to file */ uid_t va_uid; /* owner user id */ gid_t va_gid; /* owner group id */ - udev_t va_fsid; /* filesystem id */ + dev_t va_fsid; /* filesystem id */ long va_fileid; /* file id */ u_quad_t va_size; /* file size in bytes */ long va_blocksize; /* blocksize preferred for i/o */ @@ -257,7 +257,7 @@ struct vattr { struct timespec va_birthtime; /* time file created */ u_long va_gen; /* generation number of file */ u_long va_flags; /* flags defined for file */ - udev_t va_rdev; /* device the special file represents */ + dev_t va_rdev; /* device the special file represents */ u_quad_t va_bytes; /* bytes of disk space held by file */ u_quad_t va_filerev; /* file modification number */ u_int va_vaflags; /* operations flags, see below */ @@ -593,7 +593,7 @@ extern int (*lease_check_hook)(struct vop_lease_args *); extern int (*softdep_fsync_hook)(struct vnode *); extern int (*softdep_process_worklist_hook)(struct mount *); -struct vnode *addaliasu(struct vnode *vp, udev_t nvp_rdev); +struct vnode *addaliasu(struct vnode *vp, dev_t nvp_rdev); int bdevvp(struct cdev *dev, struct vnode **vpp); /* cache_* may belong in namei.h. */ void cache_enter(struct vnode *dvp, struct vnode *vp, diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 586ec82117d9..66483e69c199 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -154,7 +154,7 @@ struct swdevt { int sw_flags; int sw_nblks; int sw_used; - udev_t sw_udev; + dev_t sw_dev; struct vnode *sw_vp; void *sw_id; swblk_t sw_first; @@ -2079,7 +2079,7 @@ done2: } static void -swaponsomething(struct vnode *vp, void *id, u_long nblks, sw_strategy_t *strategy, sw_close_t *close, udev_t udev) +swaponsomething(struct vnode *vp, void *id, u_long nblks, sw_strategy_t *strategy, sw_close_t *close, dev_t dev) { struct swdevt *sp, *tsp; swblk_t dvbase; @@ -2107,7 +2107,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nblks, sw_strategy_t *strateg sp = malloc(sizeof *sp, M_VMPGDATA, M_WAITOK | M_ZERO); sp->sw_vp = vp; sp->sw_id = id; - sp->sw_udev = udev; + sp->sw_dev = dev; sp->sw_flags = 0; sp->sw_nblks = nblks; sp->sw_used = 0; @@ -2293,7 +2293,7 @@ sysctl_vm_swap_info(SYSCTL_HANDLER_ARGS) if (n == *name) { mtx_unlock(&sw_dev_mtx); xs.xsw_version = XSWDEV_VERSION; - xs.xsw_dev = sp->sw_udev; + xs.xsw_dev = sp->sw_dev; xs.xsw_flags = sp->sw_flags; xs.xsw_nblks = sp->sw_nblks; xs.xsw_used = sp->sw_used; @@ -2533,7 +2533,7 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp) int s; struct vnode *vp, *vp2; - bp->b_dev = NODEV; + bp->b_dev = NULL; bp->b_blkno = ctodb(bp->b_blkno - sp->sw_first); vp2 = sp->sw_id; @@ -2598,6 +2598,6 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) return (error); swaponsomething(vp, vp, nblks, swapdev_strategy, swapdev_close, - NOUDEV); + NODEV); return (0); } diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h index 46827ce545ac..dab1245f4f7a 100644 --- a/sys/vm/vm_param.h +++ b/sys/vm/vm_param.h @@ -107,7 +107,7 @@ #define XSWDEV_VERSION 1 struct xswdev { u_int xsw_version; - udev_t xsw_dev; + dev_t xsw_dev; int xsw_flags; int xsw_nblks; int xsw_used; diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 1578dd3ca44c..b329ec83bfc1 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -585,8 +585,8 @@ ufs_filestat(vp, fsp) return 0; } /* - * The st_dev from stat(2) is a udev_t. These kernel structures - * contain dev_t structures. We need to convert to udev to make + * The st_dev from stat(2) is a dev_t. These kernel structures + * contain cdev pointers. We need to convert to dev_t to make * comparisons */ fsp->fsid = dev2udev(inode.i_dev); @@ -875,10 +875,10 @@ bad: /* - * Read the cdev structure in the kernel (as pointed to by a dev_t) - * in order to work out the associated udev_t + * Read the cdev structure in the kernel in order to work out the + * associated dev_t */ -udev_t +dev_t dev2udev(dev) struct cdev *dev; { @@ -887,7 +887,7 @@ dev2udev(dev) if (KVM_READ(dev, &si, sizeof si)) { return si.si_udev; } else { - dprintf(stderr, "can't convert dev_t %x to a udev_t\n", dev); + dprintf(stderr, "can't convert cdev *%x to a dev_t\n", dev); return -1; } } diff --git a/usr.bin/fstat/fstat.h b/usr.bin/fstat/fstat.h index 9cfbd6298b45..cf4e15aede00 100644 --- a/usr.bin/fstat/fstat.h +++ b/usr.bin/fstat/fstat.h @@ -64,7 +64,7 @@ extern kvm_t *kd; extern int vflg; extern int Pid; -udev_t dev2udev(struct cdev *dev); +dev_t dev2udev(struct cdev *dev); /* Additional filesystem types */ int isofs_filestat(struct vnode *vp, struct filestat *fsp); diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index 565dc3cf1f41..fa17d6e2aa66 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -383,7 +383,7 @@ main(int argc, char **argv) if (li->li_number == -1 && (kp->ki_flag & P_CONTROLT) == 0) break; - if (kp->ki_tdev == (udev_t)li->li_number) + if (kp->ki_tdev == (dev_t)li->li_number) break; } if (SLIST_FIRST(&tdevlist) != NULL && li == NULL) { -- cgit v1.3 From ed9c21cd7413daddd3cc9d3f07622491bb9e70ba Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 10 Jul 2004 21:02:17 +0000 Subject: Update for the KDB framework: o Use kdb_alt_break() to handle the alternate break sequence instead of handcoding it here. o Remove GDB kluges to make this driver work with the pre-KDB remote GDB code. o Call kdb_enter() instead of Debugger(). Note that with this commit the dcons(4) driver cannot be used for remote debugging anymore. This driver has to use the new GDB debug port interface instead. Such has not been done yet. --- sys/dev/dcons/dcons.c | 53 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index c1b320d797a8..02216223872f 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -36,6 +36,7 @@ */ #include +#include #include #include #include @@ -73,13 +74,8 @@ #define DCONS_FORCE_CONSOLE 0 /* mostly for FreeBSD-4 */ #endif -#ifndef DCONS_FORCE_GDB -#define DCONS_FORCE_GDB 1 -#endif - #if __FreeBSD_version >= 500101 #define CONS_NODEV 1 /* for latest current */ -static struct consdev gdbconsdev; #endif @@ -132,7 +128,6 @@ static struct dcons_softc { struct cdev *dev; struct dcons_ch o, i; int brk_state; -#define DC_GDB 1 int flags; } sc[DCONS_NPORT]; static void dcons_tty_start(struct tty *); @@ -373,26 +368,9 @@ dcons_checkc(struct dcons_softc *dc) ch->pos = 0; } -#if DDB && ALT_BREAK_TO_DEBUGGER - switch (dc->brk_state) { - case STATE1: - if (c == KEY_TILDE) - dc->brk_state = STATE2; - else - dc->brk_state = STATE0; - break; - case STATE2: - dc->brk_state = STATE0; - if (c == KEY_CTRLB) { -#if DCONS_FORCE_GDB - if (dc->flags & DC_GDB) - boothowto |= RB_GDB; -#endif - breakpoint(); - } - } - if (c == KEY_CR) - dc->brk_state = STATE1; +#if KDB && ALT_BREAK_TO_DEBUGGER + if (kdb_alt_break(c, &dc->brk_state)) + breakpoint(); #endif return (c); } @@ -486,20 +464,6 @@ dcons_drv_init(int stage) dcons_init_port(1, offset, size - size0); dg.buf->version = htonl(DCONS_VERSION); dg.buf->magic = ntohl(DCONS_MAGIC); - -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; -#if __FreeBSD_version >= 501109 - sprintf(gdbconsdev.cn_name, "dgdb"); -#endif - gdb_arg = &gdbconsdev; -#else - gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); -#endif - gdb_getc = dcons_cngetc; - gdb_putc = dcons_cnputc; -#endif drv_init = 1; return 0; @@ -535,7 +499,6 @@ dcons_attach(void) int polltime; dcons_attach_port(DCONS_CON, "dcons", 0); - dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); #if __FreeBSD_version < 500000 callout_init(&dcons_callout); #else @@ -594,18 +557,10 @@ dcons_modevent(module_t mode, int type, void *data) case MOD_UNLOAD: printf("dcons: unload\n"); callout_stop(&dcons_callout); -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdb_arg = NULL; -#else - gdbdev = NULL; -#endif -#endif #if __FreeBSD_version >= 500000 cnremove(&dcons_consdev); #endif dcons_detach(DCONS_CON); - dcons_detach(DCONS_GDB); dg.buf->magic = 0; contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); -- cgit v1.3 From 20021e6afdc5cb9bd16167f333f8bb2b944305e5 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Tue, 13 Jul 2004 09:41:45 +0000 Subject: Re-enable debugger port. --- sys/dev/dcons/dcons.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 124 insertions(+), 3 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 02216223872f..25494a056671 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -36,7 +36,10 @@ */ #include +#if __FreeBSD_version >= 502122 #include +#include +#endif #include #include #include @@ -74,8 +77,15 @@ #define DCONS_FORCE_CONSOLE 0 /* mostly for FreeBSD-4 */ #endif +#ifndef DCONS_FORCE_GDB +#define DCONS_FORCE_GDB 1 +#endif + #if __FreeBSD_version >= 500101 -#define CONS_NODEV 1 /* for latest current */ +#define CONS_NODEV 1 +#if __FreeBSD_version < 502122 +static struct consdev gdbconsdev; +#endif #endif @@ -128,6 +138,7 @@ static struct dcons_softc { struct cdev *dev; struct dcons_ch o, i; int brk_state; +#define DC_GDB 1 int flags; } sc[DCONS_NPORT]; static void dcons_tty_start(struct tty *); @@ -147,6 +158,20 @@ static cn_putc_t dcons_cnputc; CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc, dcons_cncheckc, dcons_cnputc, NULL); +#if __FreeBSD_version >= 502122 +static gdb_probe_f dcons_dbg_probe; +static gdb_init_f dcons_dbg_init; +static gdb_term_f dcons_dbg_term; +static gdb_getc_f dcons_dbg_getc; +static gdb_checkc_f dcons_dbg_checkc; +static gdb_putc_f dcons_dbg_putc; + +GDB_DBGPORT(dcons, dcons_dbg_probe, dcons_dbg_init, dcons_dbg_term, + dcons_dbg_checkc, dcons_dbg_getc, dcons_dbg_putc); + +extern struct gdb_dbgport *gdb_cur; +#endif + #if __FreeBSD_version < 500000 #define THREAD proc #else @@ -368,9 +393,40 @@ dcons_checkc(struct dcons_softc *dc) ch->pos = 0; } +#if __FreeBSD_version >= 502122 #if KDB && ALT_BREAK_TO_DEBUGGER - if (kdb_alt_break(c, &dc->brk_state)) - breakpoint(); + if (kdb_alt_break(c, &dc->brk_state)) { + if ((dc->flags & DC_GDB) != 0) { + if (gdb_cur == &dcons_gdb_dbgport) { + kdb_dbbe_select("gdb"); + breakpoint(); + } + } else + breakpoint(); + } +#endif +#else +#if DDB && ALT_BREAK_TO_DEBUGGER + switch (dc->brk_state) { + case STATE1: + if (c == KEY_TILDE) + dc->brk_state = STATE2; + else + dc->brk_state = STATE0; + break; + case STATE2: + dc->brk_state = STATE0; + if (c == KEY_CTRLB) { +#if DCONS_FORCE_GDB + if (dc->flags & DC_GDB) + boothowto |= RB_GDB; +#endif + breakpoint(); + } + } + if (c == KEY_CR) + dc->brk_state = STATE1; +#endif #endif return (c); } @@ -464,6 +520,22 @@ dcons_drv_init(int stage) dcons_init_port(1, offset, size - size0); dg.buf->version = htonl(DCONS_VERSION); dg.buf->magic = ntohl(DCONS_MAGIC); + +#if __FreeBSD_version < 502122 +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; +#if __FreeBSD_version >= 501109 + sprintf(gdbconsdev.cn_name, "dgdb"); +#endif + gdb_arg = &gdbconsdev; +#else + gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); +#endif + gdb_getc = dcons_cngetc; + gdb_putc = dcons_cnputc; +#endif +#endif drv_init = 1; return 0; @@ -499,6 +571,7 @@ dcons_attach(void) int polltime; dcons_attach_port(DCONS_CON, "dcons", 0); + dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); #if __FreeBSD_version < 500000 callout_init(&dcons_callout); #else @@ -557,10 +630,20 @@ dcons_modevent(module_t mode, int type, void *data) case MOD_UNLOAD: printf("dcons: unload\n"); callout_stop(&dcons_callout); +#if __FreeBSD_version < 502122 +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdb_arg = NULL; +#else + gdbdev = NULL; +#endif +#endif +#endif #if __FreeBSD_version >= 500000 cnremove(&dcons_consdev); #endif dcons_detach(DCONS_CON); + dcons_detach(DCONS_GDB); dg.buf->magic = 0; contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); @@ -572,5 +655,43 @@ dcons_modevent(module_t mode, int type, void *data) return(err); } +#if __FreeBSD_version >= 502122 +/* Debugger interface */ + +static int +dcons_dbg_probe(void) +{ + return(DCONS_FORCE_GDB); +} + +static void +dcons_dbg_init(void) +{ +} + +static void +dcons_dbg_term(void) +{ +} + +static void +dcons_dbg_putc(int c) +{ + dcons_putc(&sc[DCONS_GDB], c); +} + +static int +dcons_dbg_checkc(void) +{ + return (dcons_checkc(&sc[DCONS_GDB])); +} + +static int +dcons_dbg_getc(void) +{ + return (dcons_getc(&sc[DCONS_GDB])); +} +#endif + DEV_MODULE(dcons, dcons_modevent, NULL); MODULE_VERSION(dcons, DCONS_VERSION); -- cgit v1.3 From 3e019deaed5ad0687ea53ed5b5ba3336dc0be3c4 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 15 Jul 2004 08:26:07 +0000 Subject: Do a pass over all modules in the kernel and make them return EOPNOTSUPP for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything". --- sys/alpha/linux/linux_sysvec.c | 1 + sys/cam/cam_periph.h | 2 ++ sys/cam/cam_xpt.c | 2 ++ sys/coda/coda_fbsd.c | 4 ++-- sys/compat/svr4/svr4_sysvec.c | 1 + sys/dev/aic7xxx/aic79xx_osm.c | 1 + sys/dev/aic7xxx/aic7xxx_osm.c | 1 + sys/dev/bktr/bktr_mem.c | 1 + sys/dev/dcons/dcons.c | 3 +++ sys/dev/fb/fb.c | 2 ++ sys/dev/fb/splashreg.h | 2 ++ sys/dev/firewire/firewire.c | 2 ++ sys/dev/harp/if_harp.c | 2 ++ sys/dev/hfa/hfa_freebsd.c | 1 + sys/dev/ispfw/ispfw.c | 1 + sys/dev/md/md.c | 1 + sys/dev/null/null.c | 2 ++ sys/dev/ofw/openpromio.c | 2 +- sys/dev/random/randomdev.c | 4 ++++ sys/dev/snp/snp.c | 1 + sys/dev/sound/driver.c | 1 + sys/dev/streams/streams.c | 1 + sys/dev/syscons/syscons.h | 2 ++ sys/dev/utopia/utopia.c | 2 ++ sys/dev/vinum/vinum.c | 1 + sys/fs/coda/coda_fbsd.c | 4 ++-- sys/fs/pseudofs/pseudofs.c | 2 +- sys/fs/unionfs/union_subr.c | 1 + sys/geom/gate/g_gate.c | 1 + sys/i386/ibcs2/ibcs2_sysvec.c | 2 +- sys/i386/isa/vesa.c | 2 +- sys/i386/linux/linux_sysvec.c | 2 +- sys/i4b/include/i4b_global.h | 2 ++ sys/kern/kern_mac.c | 1 + sys/kern/kern_module.c | 2 +- sys/kern/kern_syscalls.c | 3 +++ sys/kern/subr_bus.c | 5 +++++ sys/kern/vfs_init.c | 3 ++- sys/net/if_disc.c | 2 ++ sys/net/if_ef.c | 2 +- sys/net/if_faith.c | 2 ++ sys/net/if_gif.c | 2 ++ sys/net/if_gre.c | 2 ++ sys/net/if_loop.c | 2 ++ sys/net/if_ppp.c | 2 ++ sys/net/if_sl.c | 2 ++ sys/net/if_spppsubr.c | 3 +-- sys/net/if_stf.c | 2 ++ sys/net/if_tun.c | 2 ++ sys/net/if_vlan.c | 2 ++ sys/netgraph/ng_base.c | 2 +- sys/netinet/ip_dummynet.c | 1 + sys/netinet/ip_fw2.c | 1 + sys/netinet/ip_mroute.c | 2 ++ sys/netinet6/ip6_fw.c | 1 + sys/nfsserver/nfs_srvsubs.c | 13 ++++++++----- sys/security/mac/mac_framework.c | 1 + sys/security/mac/mac_syscalls.c | 1 + sys/sys/exec.h | 1 + 59 files changed, 101 insertions(+), 20 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index add35a346983..e3b91eeb2e56 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -274,6 +274,7 @@ linux_elf_modevent(module_t mod, int type, void *data) printf("Could not deinstall ELF interpreter entry\n"); break; default: + return (EOPNOTSUPP); break; } return error; diff --git a/sys/cam/cam_periph.h b/sys/cam/cam_periph.h index 9f271802d2be..88a709d08fb5 100644 --- a/sys/cam/cam_periph.h +++ b/sys/cam/cam_periph.h @@ -53,6 +53,8 @@ void periphdriver_register(void *); case MOD_UNLOAD: \ printf(#name " module unload - not possible for this module type\n"); \ return EINVAL; \ + default: \ + return EOPNOTSUPP; \ } \ return 0; \ } \ diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 592809f19b0e..19116a131907 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1348,6 +1348,8 @@ cam_module_event_handler(module_t mod, int what, void *arg) xpt_init(NULL); } else if (what == MOD_UNLOAD) { return EBUSY; + } else { + return EOPNOTSUPP; } return 0; diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index 89d4de05dead..d3feff0b2b91 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -90,9 +90,9 @@ codadev_modevent(module_t mod, int type, void *data) case MOD_LOAD: break; case MOD_UNLOAD: - break; + return (EBUSY); default: - break; + return (EOPNOTSUPP); } return 0; } diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index e312d6a18b5e..64639f2e1110 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -411,6 +411,7 @@ svr4_elf_modevent(module_t mod, int type, void *data) printf("svr4 ELF exec handler removed\n"); break; default: + return (EOPNOTSUPP); break; } return error; diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c index bbe07f65a345..921bae95d3e9 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.c +++ b/sys/dev/aic7xxx/aic79xx_osm.c @@ -1540,6 +1540,7 @@ static int ahd_modevent(module_t mod, int type, void *data) { /* XXX Deal with busy status on unload. */ + /* XXX Deal with unknown events */ return 0; } diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c index 3034f9bad9d6..1c11f76eb1d4 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.c +++ b/sys/dev/aic7xxx/aic7xxx_osm.c @@ -1663,6 +1663,7 @@ static int ahc_modevent(module_t mod, int type, void *data) { /* XXX Deal with busy status on unload. */ + /* XXX Deal with unknown events */ return 0; } diff --git a/sys/dev/bktr/bktr_mem.c b/sys/dev/bktr/bktr_mem.c index 278e6b863715..3adacce803a9 100644 --- a/sys/dev/bktr/bktr_mem.c +++ b/sys/dev/bktr/bktr_mem.c @@ -88,6 +88,7 @@ bktr_mem_modevent(module_t mod, int type, void *unused){ printf("bktr_mem: memory holder cannot be unloaded\n"); return EBUSY; default: + return EOPNOTSUPP; break; } return (0); diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 25494a056671..26774447ec10 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -651,6 +651,9 @@ dcons_modevent(module_t mode, int type, void *data) break; case MOD_SHUTDOWN: break; + default: + err = EOPNOTSUPP; + break; } return(err); } diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index 38b967092795..0878feb299d0 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -386,6 +386,8 @@ fb_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: printf("fb module unload - not possible for this module type\n"); return EINVAL; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/dev/fb/splashreg.h b/sys/dev/fb/splashreg.h index 05e5687f5481..36ba9a708d89 100644 --- a/sys/dev/fb/splashreg.h +++ b/sys/dev/fb/splashreg.h @@ -55,6 +55,7 @@ typedef struct image_decoder scrn_saver_t; case MOD_UNLOAD: \ return splash_unregister(&sw); \ default: \ + return EOPNOTSUPP; \ break; \ } \ return 0; \ @@ -76,6 +77,7 @@ typedef struct image_decoder scrn_saver_t; case MOD_UNLOAD: \ return splash_unregister(&sw); \ default: \ + return EOPNOTSUPP; \ break; \ } \ return 0; \ diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 6342a1867faf..9bd5dd66631a 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -2273,6 +2273,8 @@ fw_modevent(module_t mode, int type, void *data) break; case MOD_SHUTDOWN: break; + default: + return (EOPNOTSUPP); } return (err); } diff --git a/sys/dev/harp/if_harp.c b/sys/dev/harp/if_harp.c index 87711b9adc4f..435b64e293e8 100644 --- a/sys/dev/harp/if_harp.c +++ b/sys/dev/harp/if_harp.c @@ -646,6 +646,8 @@ harp_modevent(module_t mod, int event, void *data) uma_zdestroy(harp_vcc_zone); break; + default: + return (EOPNOTSUPP); } return (0); } diff --git a/sys/dev/hfa/hfa_freebsd.c b/sys/dev/hfa/hfa_freebsd.c index 48a15acc5dc7..34db172bb4cd 100644 --- a/sys/dev/hfa/hfa_freebsd.c +++ b/sys/dev/hfa/hfa_freebsd.c @@ -451,6 +451,7 @@ hfa_modevent (module_t mod, int type, void *data) break; default: + return (EOPNOTSUPP); break; } diff --git a/sys/dev/ispfw/ispfw.c b/sys/dev/ispfw/ispfw.c index f0b0a4d20944..633fdf76b8e6 100644 --- a/sys/dev/ispfw/ispfw.c +++ b/sys/dev/ispfw/ispfw.c @@ -164,6 +164,7 @@ isp_module_handler(module_t mod, int what, void *arg) } break; default: + return (EOPNOTSUPP); break; } return (0); diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 295d8d279997..e6dc8b5e3429 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1237,6 +1237,7 @@ md_modevent(module_t mod, int type, void *data) status_dev = 0; break; default: + return (EOPNOTSUPP); break; } return (0); diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 14841d328c4c..4f7bd9c8742a 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -135,6 +135,8 @@ null_modevent(module_t mod __unused, int type, void *data __unused) case MOD_SHUTDOWN: break; + default: + return (EOPNOTSUPP); } return (0); diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c index 3182bffd3345..b2e3454ff885 100644 --- a/sys/dev/ofw/openpromio.c +++ b/sys/dev/ofw/openpromio.c @@ -215,7 +215,7 @@ openprom_modevent(module_t mode, int type, void *data) destroy_dev(openprom_dev); return (0); default: - return (0); + return (EOPNOTSUPP); } } diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c index 7c5434e44626..28cddd9af5b8 100644 --- a/sys/dev/random/randomdev.c +++ b/sys/dev/random/randomdev.c @@ -220,6 +220,10 @@ random_modevent(module_t mod __unused, int type, void *data __unused) case MOD_SHUTDOWN: break; + default: + error = EOPNOTSUPP; + break; + } return (error); } diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 3d4b2d4a409a..a352707d6e47 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -650,6 +650,7 @@ snp_modevent(mod, type, data) ldisc_deregister(snooplinedisc); break; default: + return (EOPNOTSUPP); break; } return (0); diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c index 57427d630bbb..f9952665b71b 100644 --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -38,6 +38,7 @@ snd_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: break; default: + return (EOPNOTSUPP); break; } return 0; diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 8ef790d3ddc3..1df09523ddee 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -165,6 +165,7 @@ streams_modevent(module_t mod, int type, void *unused) return 0; default: + return EOPNOTSUPP; break; } return 0; diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 1651ad8e1c76..29909f962e59 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -391,6 +391,7 @@ typedef struct sc_term_sw { return EBUSY; \ return sc_term_remove(&sw); \ default: \ + return EOPNOTSUPP; \ break; \ } \ return 0; \ @@ -462,6 +463,7 @@ typedef struct sc_renderer { } \ break; \ default: \ + return EOPNOTSUPP; \ break; \ } \ return error; \ diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c index c648349dfe16..263f4b9f20e4 100644 --- a/sys/dev/utopia/utopia.c +++ b/sys/dev/utopia/utopia.c @@ -1550,6 +1550,8 @@ utopia_mod_init(module_t mod, int what, void *arg) UTP_WUNLOCK_LIST(); mtx_destroy(&utopia_list_mtx); break; + default: + return (EOPNOTSUPP); } return (0); } diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 062176b4ab40..5fb990d8a207 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -318,6 +318,7 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused) EVENTHANDLER_DEREGISTER(dev_clone, dev_clone_tag); return 0; default: + return EOPNOTSUPP; break; } return 0; diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 89d4de05dead..d3feff0b2b91 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -90,9 +90,9 @@ codadev_modevent(module_t mod, int type, void *data) case MOD_LOAD: break; case MOD_UNLOAD: - break; + return (EBUSY); default: - break; + return (EOPNOTSUPP); } return 0; } diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 872bd8d10671..22d62860e17b 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -394,7 +394,7 @@ pfs_modevent(module_t mod, int evt, void *arg) pfs_fileno_unload(); break; default: - printf("pseudofs: unexpected event type %d\n", evt); + return EOPNOTSUPP; break; } return 0; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 8d05f8c41723..99b86ead9ed2 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -1363,6 +1363,7 @@ union_modevent(module_t mod, int type, void *data) union_dircheckp = NULL; break; default: + return EOPNOTSUPP; break; } return 0; diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 46682356975e..f70068f31959 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -635,6 +635,7 @@ g_gate_modevent(module_t mod, int type, void *data) destroy_dev(status_dev); break; default: + return (EOPNOTSUPP); break; } diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c index af5015ded32d..fc639734ccbc 100644 --- a/sys/i386/ibcs2/ibcs2_sysvec.c +++ b/sys/i386/ibcs2/ibcs2_sysvec.c @@ -116,7 +116,7 @@ ibcs2_modevent(module_t mod, int type, void *unused) } sx_sunlock(&allproc_lock); default: - /* do not care */ + return (EOPNOTSUPP); break; } return (rval); diff --git a/sys/i386/isa/vesa.c b/sys/i386/isa/vesa.c index 65739aa8de17..d51f68fce30c 100644 --- a/sys/i386/isa/vesa.c +++ b/sys/i386/isa/vesa.c @@ -1652,7 +1652,7 @@ vesa_mod_event(module_t mod, int type, void *data) case MOD_UNLOAD: return vesa_unload(); default: - break; + return EOPNOTSUPP; } return 0; } diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 5972a575dd25..bb7e3381396e 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -960,7 +960,7 @@ linux_elf_modevent(module_t mod, int type, void *data) printf("Could not deinstall ELF interpreter entry\n"); break; default: - break; + return EOPNOTSUPP; } return error; } diff --git a/sys/i4b/include/i4b_global.h b/sys/i4b/include/i4b_global.h index fe1bb7177b00..bb77527f6079 100644 --- a/sys/i4b/include/i4b_global.h +++ b/sys/i4b/include/i4b_global.h @@ -57,6 +57,8 @@ case MOD_UNLOAD: \ printf(#name " module unload - not possible for this module type\n"); \ return EINVAL; \ + default: \ + return EOPNOTSUPP; \ } \ return 0; \ } \ diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 94dfc266b8c1..db6fc59df598 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.c @@ -359,6 +359,7 @@ mac_policy_modevent(module_t mod, int type, void *data) error = 0; break; default: + error = EOPNOTSUPP; break; } diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index a8c704e56bc8..9dfe3ba21bd7 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -228,7 +228,7 @@ module_unload(module_t mod, int flags) int error; error = MOD_EVENT(mod, MOD_QUIESCE); - if (error == EOPNOTSUPP) + if (error == EOPNOTSUPP || error == EINVAL) error = 0; if (flags == LINKER_UNLOAD_NORMAL && error != 0) return (error); diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index 3f8a38b37f0c..a437fb328cf8 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -115,6 +115,9 @@ syscall_module_handler(struct module *mod, int what, void *arg) } error = syscall_deregister(data->offset, &data->old_sysent); return error; + default : + return EOPNOTSUPP; + } if (data->chainevh) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 8c8b799aa7e0..ae5923005bbe 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2535,6 +2535,8 @@ root_bus_module_handler(module_t mod, int what, void* arg) case MOD_SHUTDOWN: device_shutdown(root_bus); return (0); + default: + return (EOPNOTSUPP); } return (0); @@ -2612,6 +2614,9 @@ driver_module_handler(module_t mod, int what, void *arg) if (!error && dmd->dmd_chainevh) error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg); break; + default: + error = EOPNOTSUPP; + break; } return (error); diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 871404c141ff..9597519c3b1f 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -528,7 +528,8 @@ vfs_modevent(module_t mod, int type, void *data) if (vfc) error = vfs_unregister(vfc); break; - default: /* including MOD_SHUTDOWN */ + default: + error = EOPNOTSUPP; break; } return (error); diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c index 6132da9ac277..1b71630622cb 100644 --- a/sys/net/if_disc.c +++ b/sys/net/if_disc.c @@ -155,6 +155,8 @@ disc_modevent(module_t mod, int type, void *data) mtx_unlock(&disc_mtx); mtx_destroy(&disc_mtx); break; + default: + return (EOPNOTSUPP); } return (0); } diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c index 23741d183f3b..616be9f3360f 100644 --- a/sys/net/if_ef.c +++ b/sys/net/if_ef.c @@ -584,7 +584,7 @@ if_ef_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: return ef_unload(); default: - break; + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index c8da1cd98e3b..91b727c14c23 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -145,6 +145,8 @@ faithmodevent(mod, type, data) mtx_unlock(&faith_mtx); mtx_destroy(&faith_mtx); break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 84ba52872e9c..6d2221c2d799 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -255,6 +255,8 @@ gifmodevent(mod, type, data) ip6_gif_hlim = 0; #endif break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index a5dcc7d7530e..c0feec0c4da1 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -767,6 +767,8 @@ gremodevent(module_t mod, int type, void *data) mtx_unlock(&gre_mtx); mtx_destroy(&gre_mtx); break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 97af1d3c9915..8c4c5dac4b01 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -172,6 +172,8 @@ loop_modevent(module_t mod, int type, void *data) case MOD_UNLOAD: printf("loop module unload - not possible for this module type\n"); return EINVAL; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 2e808da44970..8f06594d589b 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -294,6 +294,8 @@ ppp_modevent(module_t mod, int type, void *data) } PPP_LIST_LOCK_DESTROY(); break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 220e9ecdd014..6d2b996bc4d7 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -210,6 +210,8 @@ sl_modevent(module_t mod, int type, void *data) ldisc_deregister(SLIPDISC); printf("if_sl module unload - not possible for this module type\n"); return EINVAL; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index bfc01f0b9f77..4c9f304b8ea9 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -484,9 +484,8 @@ sppp_modevent(module_t mod, int type, void *unused) break; case MOD_UNLOAD: return EACCES; - break; default: - break; + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 2f9eb0271c6d..eff2c7ea2f87 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -301,6 +301,8 @@ stfmodevent(mod, type, data) mtx_unlock(&stf_mtx); mtx_destroy(&stf_mtx); break; + default: + return (EOPNOTSUPP); } return (0); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 23cb20bdd1a9..065f6c9b055a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -204,6 +204,8 @@ tunmodevent(module_t mod, int type, void *data) clone_cleanup(&tunclones); mtx_destroy(&tunmtx); break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index da9b280bf065..4f6e0bd98585 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -248,6 +248,8 @@ vlan_modevent(module_t mod, int type, void *data) &LIST_FIRST(&ifv_list)->ifv_if); VLAN_LOCK_DESTROY(); break; + default: + return (EOPNOTSUPP); } return (0); } diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index c18a577ce3d8..cd0e336ba6fd 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -2954,7 +2954,7 @@ ng_mod_event(module_t mod, int event, void *data) if (type->mod_event != NULL) error = (*type->mod_event)(mod, event, data); else - error = 0; /* XXX ? */ + error = EOPNOTSUPP; /* XXX ? */ break; } return (error); diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 62f56a67b01d..40e17d4ddbeb 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -2080,6 +2080,7 @@ dummynet_modevent(module_t mod, int type, void *data) #endif break ; default: + return EOPNOTSUPP; break ; } return 0 ; diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index f640e248fb65..19f54caf5479 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -3441,6 +3441,7 @@ ipfw_modevent(module_t mod, int type, void *unused) err = 0; break; default: + return EOPNOTSUPP; break; } return err; diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 9230d02434d8..5aab2ffde098 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -3421,6 +3421,8 @@ ip_mroute_modevent(module_t mod, int type, void *unused) MFC_LOCK_DESTROY(); mtx_destroy(&mrouter_mtx); break; + default: + return EOPNOTSUPP; } return 0; } diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index 2398ed56c3ad..c7c812d6f252 100644 --- a/sys/netinet6/ip6_fw.c +++ b/sys/netinet6/ip6_fw.c @@ -1293,6 +1293,7 @@ ip6fw_modevent(module_t mod, int type, void *unused) printf("IPv6 firewall unloaded\n"); return 0; default: + return EOPNOTSUPP; break; } return 0; diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 326c3c5ca2cf..77ba6e623709 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -521,9 +521,9 @@ static const short *nfsrv_v3errmap[] = { static int nfsrv_modevent(module_t mod, int type, void *data) { + int error = 0; NET_LOCK_GIANT(); - switch (type) { case MOD_LOAD: mtx_init(&nfsd_mtx, "nfsd_mtx", NULL, MTX_DEF); @@ -556,10 +556,10 @@ nfsrv_modevent(module_t mod, int type, void *data) sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc; break; - case MOD_UNLOAD: + case MOD_UNLOAD: if (nfsrv_numnfsd != 0) { - NET_UNLOCK_GIANT(); - return EBUSY; + error = EBUSY; + break; } callout_stop(&nfsrv_callout); @@ -567,9 +567,12 @@ nfsrv_modevent(module_t mod, int type, void *data) sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call; mtx_destroy(&nfsd_mtx); break; + default: + error = EOPNOTSUPP; + break; } NET_UNLOCK_GIANT(); - return 0; + return error; } static moduledata_t nfsserver_mod = { "nfsserver", diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 94dfc266b8c1..db6fc59df598 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -359,6 +359,7 @@ mac_policy_modevent(module_t mod, int type, void *data) error = 0; break; default: + error = EOPNOTSUPP; break; } diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 94dfc266b8c1..db6fc59df598 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -359,6 +359,7 @@ mac_policy_modevent(module_t mod, int type, void *data) error = 0; break; default: + error = EOPNOTSUPP; break; } diff --git a/sys/sys/exec.h b/sys/sys/exec.h index cd14c24cddeb..07becafe0f25 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -105,6 +105,7 @@ int exec_unregister(const struct execsw *); printf(__XSTRING(name) " unregister failed\n");\ break; \ default: \ + error = EOPNOTSUPP; \ break; \ } \ return error; \ -- cgit v1.3 From 672c05d49c9565187ba43fd37c632fd5960c04b5 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 15 Jul 2004 20:47:41 +0000 Subject: Preparation commit for the tty cleanups that will follow in the near future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. --- sys/alpha/alpha/promcons.c | 2 +- sys/alpha/tlsb/zs_tlsb.c | 2 +- sys/dev/cx/if_cx.c | 2 +- sys/dev/cy/cy.c | 2 +- sys/dev/dcons/dcons.c | 4 ++-- sys/dev/digi/digi.c | 2 +- sys/dev/nmdm/nmdm.c | 2 +- sys/dev/ofw/ofw_console.c | 2 +- sys/dev/rc/rc.c | 2 +- sys/dev/rp/rp.c | 2 +- sys/dev/sab/sab.c | 4 ++-- sys/dev/si/si.c | 2 +- sys/dev/sio/sio.c | 4 ++-- sys/dev/snp/snp.c | 2 +- sys/dev/sx/sx.c | 2 +- sys/dev/syscons/syscons.c | 2 +- sys/dev/syscons/sysmouse.c | 2 +- sys/dev/uart/uart_tty.c | 4 ++-- sys/dev/usb/ubser.c | 6 +++--- sys/dev/usb/ucom.c | 6 +++--- sys/dev/zs/zs.c | 4 ++-- sys/i386/isa/pcvt/pcvt_drv.c | 2 +- sys/ia64/ia64/ssc.c | 2 +- sys/kern/subr_clist.c | 4 ++-- sys/kern/tty.c | 8 ++++---- sys/kern/tty_conf.c | 2 +- sys/kern/tty_pty.c | 2 +- sys/kern/tty_subr.c | 4 ++-- sys/net/ppp_tty.c | 2 +- sys/pc98/cbus/sio.c | 4 ++-- sys/pc98/pc98/sio.c | 4 ++-- sys/sys/tty.h | 4 ++-- 32 files changed, 49 insertions(+), 49 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 6ced298effd4..30db04d0a307 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -149,7 +149,7 @@ promclose(dev, flag, mode, td) untimeout(promtimeout, tp, promtimeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return 0; } diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 90eaddaa6a72..420d685e8c68 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -318,7 +318,7 @@ zsclose(struct cdev *dev, int flag, int mode, struct thread *td) s = spltty(); untimeout(zs_poll_intr, sc, sc->zst); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); splx(s); return (0); diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index c2b877db98ce..638e947dacbd 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -1640,7 +1640,7 @@ static int cx_close (struct cdev *dev, int flag, int mode, struct thread *td) cx_set_rts (d->chan, 0); ttydtrwaitstart(d->tty); } - ttyclose (d->tty); + tty_close (d->tty); splx (s); d->callout = 0; diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 47d75ad20b35..04df7e109ec1 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -786,7 +786,7 @@ sioclose(dev, flag, mode, td) ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, com); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); #ifdef broken /* session holds a ref to the tty; can't deallocate */ diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 26774447ec10..bc33dbe489e2 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -230,7 +230,7 @@ dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td) tp = dev->si_tty; if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); } return (0); @@ -597,7 +597,7 @@ dcons_detach(int port) if (tp->t_state & TS_ISOPEN) { printf("dcons: still opened\n"); ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } /* XXX * must wait until all device are closed. diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index b08cd5892f0b..e0cd291a51ef 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -893,7 +893,7 @@ digiclose(struct cdev *dev, int flag, int mode, struct thread *td) ttyld_close(tp, flag); ttyldoptim(tp); digihardclose(port); - ttyclose(tp); + tty_close(tp); if (--sc->opencnt == 0) splx(s); return (0); diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 280bb9cf2da7..41a8704305d4 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -294,7 +294,7 @@ static int nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) { - return (ttyclose(dev->si_tty)); + return (tty_close(dev->si_tty)); } static void diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 0e1f91dfea7b..986ad2f64b6b 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -169,7 +169,7 @@ ofw_dev_close(struct cdev *dev, int flag, int mode, struct thread *td) /* XXX Should be replaced with callout_stop(9) */ untimeout(ofw_timeout, tp, ofw_timeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 49eedbe27a4a..ddb0d4273cbc 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -951,7 +951,7 @@ rcclose(struct cdev *dev, int flag, int mode, d_thread_t *td) ttyld_close(tp, flag); ttyldoptim(tp); rc_hardclose(rc); - ttyclose(tp); + tty_close(tp); splx(s); KASSERT(sc->sc_opencount > 0, ("rcclose: non-positive open count")); sc->sc_opencount--; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 87412b163f91..da32de86ae08 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1138,7 +1138,7 @@ rpclose(dev, flag, mode, td) rphardclose(rp); tp->t_state &= ~TS_BUSY; - ttyclose(tp); + tty_close(tp); splx(oldspl); diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index ab84e367436a..eb9a4f3cf9fe 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -706,7 +706,7 @@ sabttyopen(struct cdev *dev, int flags, int mode, struct thread *td) /* XXX handle initial DCD */ } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error != 0) return (error); @@ -728,7 +728,7 @@ sabttyclose(struct cdev *dev, int flags, int mode, struct thread *td) return (0); ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 7a64b7be9405..aea1172560cb 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -804,7 +804,7 @@ siclose(struct cdev *dev, int flag, int mode, struct thread *td) } sihardclose(pp); - ttyclose(tp); + tty_close(tp); pp->sp_state &= ~SS_OPEN; out: diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 5f099f91988c..f9086db9f40b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -467,7 +467,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -1419,7 +1419,7 @@ sioclose(dev, flag, mode, td) ttyld_close(tp, flag); ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index a352707d6e47..6103a5d651f3 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -52,7 +52,7 @@ static struct cdevsw snp_cdevsw = { }; static struct linesw snpdisc = { - .l_open = ttyopen, + .l_open = tty_open, .l_close = snplclose, .l_read = ttread, .l_write = snplwrite, diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 56110165cced..499529269511 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -548,7 +548,7 @@ sxclose( /* ok. we are now still on the right track.. nuke the hardware */ sxhardclose(pp); - ttyclose(tp); + tty_close(tp); pp->sp_state &= ~SX_SS_OPEN; out: diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 2620ea715abc..669c25673d79 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -557,7 +557,7 @@ scclose(struct cdev *dev, int flag, int mode, struct thread *td) } spltty(); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); spl0(); return(0); } diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index db2487d11f65..ce8fe1207902 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -110,7 +110,7 @@ smclose(struct cdev *dev, int flag, int mode, struct thread *td) s = spltty(); mouse_level = 0; ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); splx(s); return 0; diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index f63d4f0ceb27..c4d0220195bc 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -453,7 +453,7 @@ uart_tty_open(struct cdev *dev, int flags, int mode, struct thread *td) return (error); goto loop; } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) return (error); error = ttyld_open(tp, dev); @@ -492,7 +492,7 @@ uart_tty_close(struct cdev *dev, int flags, int mode, struct thread *td) sc->sc_pps.ppsparam.mode = 0; ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); wakeup(sc); wakeup(TSA_CARR_ON(tp)); KASSERT(!(tp->t_state & TS_ISOPEN), ("foo")); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 9b43f54f98f9..34cee909f5a1 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -442,7 +442,7 @@ bad: if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } destroy_dev(sc->dev[i]); @@ -476,7 +476,7 @@ USB_DETACH(ubser) if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } destroy_dev(sc->dev[i]); @@ -907,7 +907,7 @@ ubser_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) wakeup(&sc->sc_opening); splx(s); - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) goto bad; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index b4759a713f14..9f84df7efc46 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -208,7 +208,7 @@ ucom_detach(struct ucom_softc *sc) device_printf(sc->sc_dev, "still open, forcing close\n"); ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } else { DPRINTF(("ucom_detach: no tty\n")); @@ -388,7 +388,7 @@ ucomopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) wakeup(&sc->sc_opening); splx(s); - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) goto bad; @@ -457,7 +457,7 @@ ucomclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) s = spltty(); ttyld_close(tp, flag); ttyldoptim(tp); - ttyclose(tp); + tty_close(tp); splx(s); if (sc->sc_dying) diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 1c400eb0192d..ab13d09e2252 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -492,7 +492,7 @@ zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td) /* XXX handle initial DCD */ } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error != 0) return (error); @@ -514,7 +514,7 @@ zsttyclose(struct cdev *dev, int flags, int mode, struct thread *td) return (0); ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index ac387332654d..16aa04ccf92c 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -354,7 +354,7 @@ pcvt_close(struct cdev *dev, int flag, int mode, struct thread *td) ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); vsx->openf = 0; diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index eb035929b8af..a475fb519f5d 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -186,7 +186,7 @@ sscclose(struct cdev *dev, int flag, int mode, struct thread *td) untimeout(ssctimeout, tp, ssctimeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return 0; } diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c index cc4b32aa3cf2..afa1277e7ac5 100644 --- a/sys/kern/subr_clist.c +++ b/sys/kern/subr_clist.c @@ -81,8 +81,8 @@ clist_init(dummy) { /* * Allocate an initial base set of cblocks as a 'slush'. - * We allocate non-slush cblocks with each initial ttyopen() and - * deallocate them with each ttyclose(). + * We allocate non-slush cblocks with each initial tty_open() and + * deallocate them with each tty_close(). * We should adjust the slush allocation. This can't be done in * the i/o routines because they are sometimes called from * interrupt handlers when it may be unsafe to call malloc(). diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 36fbb3643e8d..f0172dfd1921 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -230,7 +230,7 @@ SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait, * Initial open of tty, or (re)entry to standard tty line discipline. */ int -ttyopen(struct cdev *device, struct tty *tp) +tty_open(struct cdev *device, struct tty *tp) { int s; @@ -256,12 +256,12 @@ ttyopen(struct cdev *device, struct tty *tp) * Handle close() on a tty line: flush and set to initial state, * bumping generation number so that pending read/write calls * can detect recycling of the tty. - * XXX our caller should have done `spltty(); l_close(); ttyclose();' + * XXX our caller should have done `spltty(); l_close(); tty_close();' * and l_close() should have flushed, but we repeat the spltty() and * the flush in case there are buggy callers. */ int -ttyclose(struct tty *tp) +tty_close(struct tty *tp) { int s; @@ -2761,7 +2761,7 @@ ttyrel(struct tty *tp) /* * Allocate a tty struct. Clists in the struct will be allocated by - * ttyopen(). + * tty_open(). */ struct tty * ttymalloc(struct tty *tp) diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 488e383d4ae1..77a95937547f 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -73,7 +73,7 @@ static struct linesw nodisc = { }; static struct linesw termios_disc = { - .l_open = ttyopen, + .l_open = tty_open, .l_close = ttylclose, .l_read = ttread, .l_write = ttwrite, diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 625189ceb61f..13b48be238d0 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -207,7 +207,7 @@ ptsclose(struct cdev *dev, int flag, int mode, struct thread *td) tp = dev->si_tty; err = ttyld_close(tp, flag); - (void) ttyclose(tp); + (void) tty_close(tp); return (err); } diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index cc4b32aa3cf2..afa1277e7ac5 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -81,8 +81,8 @@ clist_init(dummy) { /* * Allocate an initial base set of cblocks as a 'slush'. - * We allocate non-slush cblocks with each initial ttyopen() and - * deallocate them with each ttyclose(). + * We allocate non-slush cblocks with each initial tty_open() and + * deallocate them with each tty_close(). * We should adjust the slush allocation. This can't be done in * the i/o routines because they are sometimes called from * interrupt handlers when it may be unsafe to call malloc(). diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index a76234dd9af9..3a14150eb552 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -234,7 +234,7 @@ pppopen(dev, tp) * Line specific close routine, called from device close routine * and from ttioctl at >= splsofttty(). * Detach the tty from the ppp unit. - * Mimics part of ttyclose(). + * Mimics part of tty_close(). */ static int pppclose(tp, flag) diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 74fc077be027..636d75356f47 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -798,7 +798,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -2142,7 +2142,7 @@ sioclose(dev, flag, mode, td) #endif ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 74fc077be027..636d75356f47 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -798,7 +798,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -2142,7 +2142,7 @@ sioclose(dev, flag, mode, td) #endif ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 24e83ad2b4b5..b5ea49d650f1 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -311,7 +311,7 @@ void ttwwakeup(struct tty *tp); void ttyblock(struct tty *tp); void ttychars(struct tty *tp); int ttycheckoutq(struct tty *tp, int wait); -int ttyclose(struct tty *tp); +int tty_close(struct tty *tp); int ttydtrwaitsleep(struct tty *tp); void ttydtrwaitstart(struct tty *tp); void ttyflush(struct tty *tp, int rw); @@ -322,7 +322,7 @@ int ttylclose(struct tty *tp, int flag); void ttyldoptim(struct tty *tp); struct tty *ttymalloc(struct tty *tp); int ttymodem(struct tty *tp, int flag); -int ttyopen(struct cdev *device, struct tty *tp); +int tty_open(struct cdev *device, struct tty *tp); int ttyref(struct tty *tp); int ttyrel(struct tty *tp); int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo); -- cgit v1.3 From 5a11c2d9ea85e0111b6cb29f790fd1c09b8fd0cc Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Fri, 24 Sep 2004 12:43:57 +0000 Subject: Sync with DragonFly BSD. --- sys/dev/dcons/dcons.c | 110 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 17 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index bc33dbe489e2..004a30e54413 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -54,7 +54,11 @@ #include +#ifdef __DragonFly__ +#include "dcons.h" +#else #include +#endif #include #include @@ -74,7 +78,7 @@ #endif #ifndef DCONS_FORCE_CONSOLE -#define DCONS_FORCE_CONSOLE 0 /* mostly for FreeBSD-4 */ +#define DCONS_FORCE_CONSOLE 0 /* Mostly for FreeBSD-4/DragonFly */ #endif #ifndef DCONS_FORCE_GDB @@ -88,18 +92,26 @@ static struct consdev gdbconsdev; #endif #endif - static d_open_t dcons_open; static d_close_t dcons_close; +#if defined(__DragonFly__) || __FreeBSD_version < 500104 +static d_ioctl_t dcons_ioctl; +#endif static struct cdevsw dcons_cdevsw = { -#if __FreeBSD_version >= 500104 +#ifdef __DragonFly__ +#define CDEV_MAJOR 184 + "dcons", CDEV_MAJOR, D_TTY, NULL, 0, + dcons_open, dcons_close, ttyread, ttywrite, dcons_ioctl, + ttypoll, nommap, nostrategy, nodump, nopsize, +#elif __FreeBSD_version >= 500104 .d_version = D_VERSION, .d_open = dcons_open, .d_close = dcons_close, .d_name = "dcons", .d_flags = D_TTY | D_NEEDGIANT, #else +#define CDEV_MAJOR 184 /* open */ dcons_open, /* close */ dcons_close, /* read */ ttyread, @@ -112,7 +124,7 @@ static struct cdevsw dcons_cdevsw = { /* major */ CDEV_MAJOR, /* dump */ nodump, /* psize */ nopsize, - /* flags */ 0, + /* flags */ D_TTY, #endif }; @@ -133,9 +145,20 @@ static int drv_init = 0; static struct callout dcons_callout; struct dcons_buf *dcons_buf; /* for local dconschat */ +#ifdef __DragonFly__ +#define DEV dev_t +#define THREAD d_thread_t +#elif __FreeBSD_version < 500000 +#define DEV dev_t +#define THREAD struct proc +#else +#define DEV struct cdev * +#define THREAD struct thread +#endif + /* per device data */ static struct dcons_softc { - struct cdev *dev; + DEV dev; struct dcons_ch o, i; int brk_state; #define DC_GDB 1 @@ -172,14 +195,8 @@ GDB_DBGPORT(dcons, dcons_dbg_probe, dcons_dbg_init, dcons_dbg_term, extern struct gdb_dbgport *gdb_cur; #endif -#if __FreeBSD_version < 500000 -#define THREAD proc -#else -#define THREAD thread -#endif - static int -dcons_open(struct cdev *dev, int flag, int mode, struct THREAD *td) +dcons_open(DEV dev, int flag, int mode, THREAD *td) { struct tty *tp; int unit, error, s; @@ -212,13 +229,17 @@ dcons_open(struct cdev *dev, int flag, int mode, struct THREAD *td) } splx(s); +#if __FreeBSD_version < 502113 + error = (*linesw[tp->t_line].l_open)(dev, tp); +#else error = ttyld_open(tp, dev); +#endif return (error); } static int -dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td) +dcons_close(DEV dev, int flag, int mode, THREAD *td) { int unit; struct tty *tp; @@ -229,13 +250,43 @@ dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td) tp = dev->si_tty; if (tp->t_state & TS_ISOPEN) { +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_close)(tp, flag); + ttyclose(tp); +#else ttyld_close(tp, flag); tty_close(tp); +#endif } return (0); } +#if defined(__DragonFly__) || __FreeBSD_version < 500104 +static int +dcons_ioctl(DEV dev, u_long cmd, caddr_t data, int flag, THREAD *td) +{ + int unit; + struct tty *tp; + int error; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty; + error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); + if (error != ENOIOCTL) + return (error); + + error = ttioctl(tp, cmd, data, flag); + if (error != ENOIOCTL) + return (error); + + return (ENOTTY); +} +#endif + static int dcons_tty_param(struct tty *tp, struct termios *t) { @@ -279,7 +330,11 @@ dcons_timeout(void *v) tp = dc->dev->si_tty; while ((c = dcons_checkc(dc)) != -1) if (tp->t_state & TS_ISOPEN) +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_rint)(c, tp); +#else ttyld_rint(tp, c); +#endif } polltime = hz / poll_hz; if (polltime < 1) @@ -290,7 +345,10 @@ dcons_timeout(void *v) static void dcons_cnprobe(struct consdev *cp) { -#if __FreeBSD_version >= 501109 +#ifdef __DragonFly__ + cp->cn_dev = make_dev(&dcons_cdevsw, DCONS_CON, + UID_ROOT, GID_WHEEL, 0600, "dcons"); +#elif __FreeBSD_version >= 501109 sprintf(cp->cn_name, "dcons"); #else cp->cn_dev = makedev(CDEV_MAJOR, DCONS_CON); @@ -332,17 +390,17 @@ dcons_cnputc(struct consdev *cp, int c) } #else static int -dcons_cngetc(struct cdev *dev) +dcons_cngetc(DEV dev) { return(dcons_getc((struct dcons_softc *)dev->si_drv1)); } static int -dcons_cncheckc(struct cdev *dev) +dcons_cncheckc(DEV dev) { return(dcons_checkc((struct dcons_softc *)dev->si_drv1)); } static void -dcons_cnputc(struct cdev *dev, int c) +dcons_cnputc(DEV dev, int c) { dcons_putc((struct dcons_softc *)dev->si_drv1, c); } @@ -529,6 +587,9 @@ dcons_drv_init(int stage) sprintf(gdbconsdev.cn_name, "dgdb"); #endif gdb_arg = &gdbconsdev; +#elif defined(__DragonFly__) + gdbdev = make_dev(&dcons_cdevsw, DCONS_GDB, + UID_ROOT, GID_WHEEL, 0600, "dgdb"); #else gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); #endif @@ -570,6 +631,9 @@ dcons_attach(void) { int polltime; +#ifdef __DragonFly__ + cdevsw_add(&dcons_cdevsw, -1, 0); +#endif dcons_attach_port(DCONS_CON, "dcons", 0); dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); #if __FreeBSD_version < 500000 @@ -596,13 +660,25 @@ dcons_detach(int port) if (tp->t_state & TS_ISOPEN) { printf("dcons: still opened\n"); +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_close)(tp, 0); + tp->t_gen++; + ttyclose(tp); + ttwakeup(tp); + ttwwakeup(tp); +#else ttyld_close(tp, 0); tty_close(tp); +#endif } /* XXX * must wait until all device are closed. */ +#ifdef __DragonFly__ + tsleep((void *)dc, 0, "dcodtc", hz/4); +#else tsleep((void *)dc, PWAIT, "dcodtc", hz/4); +#endif destroy_dev(dc->dev); return(0); -- cgit v1.3 From 898b6e55d2ac11afda1bbed77e38b78d8839d562 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Sun, 26 Sep 2004 01:15:38 +0000 Subject: Invalidate dcons buffer on shutdown. --- sys/dev/dcons/dcons.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 004a30e54413..284a3b076bbe 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -726,6 +726,7 @@ dcons_modevent(module_t mode, int type, void *data) break; case MOD_SHUTDOWN: + dg.buf->magic = 0; break; default: err = EOPNOTSUPP; -- cgit v1.3 From 31a58777865b45a056dd435ea8ecf426bed54985 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Wed, 13 Oct 2004 05:38:42 +0000 Subject: - Split dcons core code and OS dependent code. - Implement dcons_ischar() and dcons_load_buffer(). - If loader passed a dcons buffer address, keep using it. (We still need a patch to cheat memory management system.) --- sys/dev/dcons/dcons.c | 713 +++++-------------------------------------- sys/dev/dcons/dcons.h | 21 +- sys/dev/dcons/dcons_crom.c | 9 + sys/dev/dcons/dcons_os.c | 746 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/dcons/dcons_os.h | 44 +++ 5 files changed, 883 insertions(+), 650 deletions(-) create mode 100644 sys/dev/dcons/dcons_os.c create mode 100644 sys/dev/dcons/dcons_os.h (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 284a3b076bbe..b48a5040d24e 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 + * Copyright (C) 2003,2004 * Hidetoshi Shimokawa. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,387 +36,42 @@ */ #include -#if __FreeBSD_version >= 502122 -#include -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#ifdef __DragonFly__ +#if defined(__DragonFly__) || defined(_BOOT) #include "dcons.h" #else #include #endif -#include -#include - -#include - -#include "opt_ddb.h" -#include "opt_comconsole.h" -#include "opt_dcons.h" - -#ifndef DCONS_POLL_HZ -#define DCONS_POLL_HZ 100 -#endif - -#ifndef DCONS_BUF_SIZE -#define DCONS_BUF_SIZE (16*1024) -#endif - -#ifndef DCONS_FORCE_CONSOLE -#define DCONS_FORCE_CONSOLE 0 /* Mostly for FreeBSD-4/DragonFly */ -#endif - -#ifndef DCONS_FORCE_GDB -#define DCONS_FORCE_GDB 1 -#endif - -#if __FreeBSD_version >= 500101 -#define CONS_NODEV 1 -#if __FreeBSD_version < 502122 -static struct consdev gdbconsdev; -#endif -#endif - -static d_open_t dcons_open; -static d_close_t dcons_close; -#if defined(__DragonFly__) || __FreeBSD_version < 500104 -static d_ioctl_t dcons_ioctl; -#endif - -static struct cdevsw dcons_cdevsw = { -#ifdef __DragonFly__ -#define CDEV_MAJOR 184 - "dcons", CDEV_MAJOR, D_TTY, NULL, 0, - dcons_open, dcons_close, ttyread, ttywrite, dcons_ioctl, - ttypoll, nommap, nostrategy, nodump, nopsize, -#elif __FreeBSD_version >= 500104 - .d_version = D_VERSION, - .d_open = dcons_open, - .d_close = dcons_close, - .d_name = "dcons", - .d_flags = D_TTY | D_NEEDGIANT, -#else -#define CDEV_MAJOR 184 - /* open */ dcons_open, - /* close */ dcons_close, - /* read */ ttyread, - /* write */ ttywrite, - /* ioctl */ dcons_ioctl, - /* poll */ ttypoll, - /* mmap */ nommap, - /* strategy */ nostrategy, - /* name */ "dcons", - /* major */ CDEV_MAJOR, - /* dump */ nodump, - /* psize */ nopsize, - /* flags */ D_TTY, -#endif -}; - -#ifndef KLD_MODULE -static char bssbuf[DCONS_BUF_SIZE]; /* buf in bss */ -#endif - -/* global data */ -static struct dcons_global dg; -struct dcons_global *dcons_conf; -static int poll_hz = DCONS_POLL_HZ; - -SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); -SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, - "dcons polling rate"); - -static int drv_init = 0; -static struct callout dcons_callout; -struct dcons_buf *dcons_buf; /* for local dconschat */ - -#ifdef __DragonFly__ -#define DEV dev_t -#define THREAD d_thread_t -#elif __FreeBSD_version < 500000 -#define DEV dev_t -#define THREAD struct proc -#else -#define DEV struct cdev * -#define THREAD struct thread -#endif - -/* per device data */ -static struct dcons_softc { - DEV dev; - struct dcons_ch o, i; - int brk_state; -#define DC_GDB 1 - int flags; -} sc[DCONS_NPORT]; -static void dcons_tty_start(struct tty *); -static int dcons_tty_param(struct tty *, struct termios *); -static void dcons_timeout(void *); -static int dcons_drv_init(int); -static int dcons_getc(struct dcons_softc *); -static int dcons_checkc(struct dcons_softc *); -static void dcons_putc(struct dcons_softc *, int); - -static cn_probe_t dcons_cnprobe; -static cn_init_t dcons_cninit; -static cn_getc_t dcons_cngetc; -static cn_checkc_t dcons_cncheckc; -static cn_putc_t dcons_cnputc; - -CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc, - dcons_cncheckc, dcons_cnputc, NULL); - -#if __FreeBSD_version >= 502122 -static gdb_probe_f dcons_dbg_probe; -static gdb_init_f dcons_dbg_init; -static gdb_term_f dcons_dbg_term; -static gdb_getc_f dcons_dbg_getc; -static gdb_checkc_f dcons_dbg_checkc; -static gdb_putc_f dcons_dbg_putc; - -GDB_DBGPORT(dcons, dcons_dbg_probe, dcons_dbg_init, dcons_dbg_term, - dcons_dbg_checkc, dcons_dbg_getc, dcons_dbg_putc); - -extern struct gdb_dbgport *gdb_cur; -#endif - -static int -dcons_open(DEV dev, int flag, int mode, THREAD *td) -{ - struct tty *tp; - int unit, error, s; - - unit = minor(dev); - if (unit != 0) - return (ENXIO); - - tp = dev->si_tty = ttymalloc(dev->si_tty); - tp->t_oproc = dcons_tty_start; - tp->t_param = dcons_tty_param; - tp->t_stop = nottystop; - tp->t_dev = dev; - - error = 0; - - s = spltty(); - if ((tp->t_state & TS_ISOPEN) == 0) { - tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; - ttsetwater(tp); - } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { - splx(s); - return (EBUSY); - } - splx(s); - -#if __FreeBSD_version < 502113 - error = (*linesw[tp->t_line].l_open)(dev, tp); -#else - error = ttyld_open(tp, dev); -#endif - - return (error); -} - -static int -dcons_close(DEV dev, int flag, int mode, THREAD *td) +int +dcons_ischar(struct dcons_softc *dc) { - int unit; - struct tty *tp; - - unit = minor(dev); - if (unit != 0) - return (ENXIO); - - tp = dev->si_tty; - if (tp->t_state & TS_ISOPEN) { -#if __FreeBSD_version < 502113 - (*linesw[tp->t_line].l_close)(tp, flag); - ttyclose(tp); -#else - ttyld_close(tp, flag); - tty_close(tp); -#endif - } - - return (0); -} - -#if defined(__DragonFly__) || __FreeBSD_version < 500104 -static int -dcons_ioctl(DEV dev, u_long cmd, caddr_t data, int flag, THREAD *td) -{ - int unit; - struct tty *tp; - int error; - - unit = minor(dev); - if (unit != 0) - return (ENXIO); - - tp = dev->si_tty; - error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return (error); - - error = ttioctl(tp, cmd, data, flag); - if (error != ENOIOCTL) - return (error); - - return (ENOTTY); -} -#endif - -static int -dcons_tty_param(struct tty *tp, struct termios *t) -{ - tp->t_ispeed = t->c_ispeed; - tp->t_ospeed = t->c_ospeed; - tp->t_cflag = t->c_cflag; - return 0; -} - -static void -dcons_tty_start(struct tty *tp) -{ - struct dcons_softc *dc; - int s; - - dc = (struct dcons_softc *)tp->t_dev->si_drv1; - s = spltty(); - if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { - ttwwakeup(tp); - return; - } - - tp->t_state |= TS_BUSY; - while (tp->t_outq.c_cc != 0) - dcons_putc(dc, getc(&tp->t_outq)); - tp->t_state &= ~TS_BUSY; + u_int32_t ptr, pos, gen, next_gen; + struct dcons_ch *ch; - ttwwakeup(tp); - splx(s); -} + ch = &dc->i; -static void -dcons_timeout(void *v) -{ - struct tty *tp; - struct dcons_softc *dc; - int i, c, polltime; + ptr = ntohl(*ch->ptr); + gen = ptr >> DCONS_GEN_SHIFT; + pos = ptr & DCONS_POS_MASK; + if (gen == ch->gen && pos == ch->pos) + return (0); - for (i = 0; i < DCONS_NPORT; i ++) { - dc = &sc[i]; - tp = dc->dev->si_tty; - while ((c = dcons_checkc(dc)) != -1) - if (tp->t_state & TS_ISOPEN) -#if __FreeBSD_version < 502113 - (*linesw[tp->t_line].l_rint)(c, tp); -#else - ttyld_rint(tp, c); -#endif + next_gen = DCONS_NEXT_GEN(ch->gen); + /* XXX sanity check */ + if ((gen != ch->gen && gen != next_gen) + || (gen == ch->gen && pos < ch->pos)) { + /* generation skipped !! */ + /* XXX discard */ + ch->gen = gen; + ch->pos = pos; + return (0); } - polltime = hz / poll_hz; - if (polltime < 1) - polltime = 1; - callout_reset(&dcons_callout, polltime, dcons_timeout, tp); -} - -static void -dcons_cnprobe(struct consdev *cp) -{ -#ifdef __DragonFly__ - cp->cn_dev = make_dev(&dcons_cdevsw, DCONS_CON, - UID_ROOT, GID_WHEEL, 0600, "dcons"); -#elif __FreeBSD_version >= 501109 - sprintf(cp->cn_name, "dcons"); -#else - cp->cn_dev = makedev(CDEV_MAJOR, DCONS_CON); -#endif -#if DCONS_FORCE_CONSOLE - cp->cn_pri = CN_REMOTE; -#else - cp->cn_pri = CN_NORMAL; -#endif -} - -static void -dcons_cninit(struct consdev *cp) -{ - dcons_drv_init(0); -#if CONS_NODEV - cp->cn_arg -#else - cp->cn_dev->si_drv1 -#endif - = (void *)&sc[DCONS_CON]; /* share port0 with unit0 */ -} - -#if CONS_NODEV -static int -dcons_cngetc(struct consdev *cp) -{ - return(dcons_getc((struct dcons_softc *)cp->cn_arg)); -} -static int -dcons_cncheckc(struct consdev *cp) -{ - return(dcons_checkc((struct dcons_softc *)cp->cn_arg)); -} -static void -dcons_cnputc(struct consdev *cp, int c) -{ - dcons_putc((struct dcons_softc *)cp->cn_arg, c); -} -#else -static int -dcons_cngetc(DEV dev) -{ - return(dcons_getc((struct dcons_softc *)dev->si_drv1)); -} -static int -dcons_cncheckc(DEV dev) -{ - return(dcons_checkc((struct dcons_softc *)dev->si_drv1)); -} -static void -dcons_cnputc(DEV dev, int c) -{ - dcons_putc((struct dcons_softc *)dev->si_drv1, c); -} -#endif - -static int -dcons_getc(struct dcons_softc *dc) -{ - int c; - while ((c = dcons_checkc(dc)) == -1); - - return (c & 0xff); + return (1); } -static int +int dcons_checkc(struct dcons_softc *dc) { unsigned char c; @@ -425,8 +80,6 @@ dcons_checkc(struct dcons_softc *dc) ch = &dc->i; - if (dg.dma_tag != NULL) - bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD); ptr = ntohl(*ch->ptr); gen = ptr >> DCONS_GEN_SHIFT; pos = ptr & DCONS_POS_MASK; @@ -451,45 +104,10 @@ dcons_checkc(struct dcons_softc *dc) ch->pos = 0; } -#if __FreeBSD_version >= 502122 -#if KDB && ALT_BREAK_TO_DEBUGGER - if (kdb_alt_break(c, &dc->brk_state)) { - if ((dc->flags & DC_GDB) != 0) { - if (gdb_cur == &dcons_gdb_dbgport) { - kdb_dbbe_select("gdb"); - breakpoint(); - } - } else - breakpoint(); - } -#endif -#else -#if DDB && ALT_BREAK_TO_DEBUGGER - switch (dc->brk_state) { - case STATE1: - if (c == KEY_TILDE) - dc->brk_state = STATE2; - else - dc->brk_state = STATE0; - break; - case STATE2: - dc->brk_state = STATE0; - if (c == KEY_CTRLB) { -#if DCONS_FORCE_GDB - if (dc->flags & DC_GDB) - boothowto |= RB_GDB; -#endif - breakpoint(); - } - } - if (c == KEY_CR) - dc->brk_state = STATE1; -#endif -#endif return (c); } -static void +void dcons_putc(struct dcons_softc *dc, int c) { struct dcons_ch *ch; @@ -503,12 +121,11 @@ dcons_putc(struct dcons_softc *dc, int c) ch->pos = 0; } *ch->ptr = DCONS_MAKE_PTR(ch); - if (dg.dma_tag != NULL) - bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_PREWRITE); } static int -dcons_init_port(int port, int offset, int size) +dcons_init_port(int port, int offset, int size, struct dcons_buf *buf, + struct dcons_softc *sc) { int osize; struct dcons_softc *dc; @@ -519,259 +136,71 @@ dcons_init_port(int port, int offset, int size) dc->o.size = osize; dc->i.size = size - osize; - dc->o.buf = (char *)dg.buf + offset; + dc->o.buf = (char *)buf + offset; dc->i.buf = dc->o.buf + osize; dc->o.gen = dc->i.gen = 0; dc->o.pos = dc->i.pos = 0; - dc->o.ptr = &dg.buf->optr[port]; - dc->i.ptr = &dg.buf->iptr[port]; + dc->o.ptr = &buf->optr[port]; + dc->i.ptr = &buf->iptr[port]; dc->brk_state = STATE0; - dg.buf->osize[port] = htonl(osize); - dg.buf->isize[port] = htonl(size - osize); - dg.buf->ooffset[port] = htonl(offset); - dg.buf->ioffset[port] = htonl(offset + osize); - dg.buf->optr[port] = DCONS_MAKE_PTR(&dc->o); - dg.buf->iptr[port] = DCONS_MAKE_PTR(&dc->i); + buf->osize[port] = htonl(osize); + buf->isize[port] = htonl(size - osize); + buf->ooffset[port] = htonl(offset); + buf->ioffset[port] = htonl(offset + osize); + buf->optr[port] = DCONS_MAKE_PTR(&dc->o); + buf->iptr[port] = DCONS_MAKE_PTR(&dc->i); return(0); } -static int -dcons_drv_init(int stage) -{ - int size, size0, offset; - - if (drv_init) - return(drv_init); - - drv_init = -1; - - bzero(&dg, sizeof(dg)); - dcons_conf = &dg; - dg.cdev = &dcons_consdev; - dg.size = DCONS_BUF_SIZE; - -#ifndef KLD_MODULE - if (stage == 0) /* XXX or cold */ - /* - * DCONS_FORCE_CONSOLE == 1 and statically linked. - * called from cninit(). can't use contigmalloc yet . - */ - dg.buf = (struct dcons_buf *) bssbuf; - else -#endif - /* - * DCONS_FORCE_CONSOLE == 0 or kernel module case. - * if the module is loaded after boot, - * bssbuf could be non-continuous. - */ - dg.buf = (struct dcons_buf *) contigmalloc(dg.size, - M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); - - dcons_buf = dg.buf; - offset = DCONS_HEADER_SIZE; - size = (dg.size - offset); - size0 = size * 3 / 4; - - dcons_init_port(0, offset, size0); - offset += size0; - dcons_init_port(1, offset, size - size0); - dg.buf->version = htonl(DCONS_VERSION); - dg.buf->magic = ntohl(DCONS_MAGIC); - -#if __FreeBSD_version < 502122 -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; -#if __FreeBSD_version >= 501109 - sprintf(gdbconsdev.cn_name, "dgdb"); -#endif - gdb_arg = &gdbconsdev; -#elif defined(__DragonFly__) - gdbdev = make_dev(&dcons_cdevsw, DCONS_GDB, - UID_ROOT, GID_WHEEL, 0600, "dgdb"); -#else - gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); -#endif - gdb_getc = dcons_cngetc; - gdb_putc = dcons_cnputc; -#endif -#endif - drv_init = 1; - - return 0; -} - - -static int -dcons_attach_port(int port, char *name, int flags) +int +dcons_load_buffer(struct dcons_buf *buf, int size, struct dcons_softc *sc) { + int port, s; struct dcons_softc *dc; - struct tty *tp; - - dc = &sc[port]; - dc->flags = flags; - dc->dev = make_dev(&dcons_cdevsw, port, - UID_ROOT, GID_WHEEL, 0600, name); - tp = ttymalloc(NULL); - - dc->dev->si_drv1 = (void *)dc; - dc->dev->si_tty = tp; - - tp->t_oproc = dcons_tty_start; - tp->t_param = dcons_tty_param; - tp->t_stop = nottystop; - tp->t_dev = dc->dev; - - return(0); -} -static int -dcons_attach(void) -{ - int polltime; - -#ifdef __DragonFly__ - cdevsw_add(&dcons_cdevsw, -1, 0); -#endif - dcons_attach_port(DCONS_CON, "dcons", 0); - dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); -#if __FreeBSD_version < 500000 - callout_init(&dcons_callout); -#else - callout_init(&dcons_callout, 0); -#endif - polltime = hz / poll_hz; - if (polltime < 1) - polltime = 1; - callout_reset(&dcons_callout, polltime, dcons_timeout, NULL); - return(0); -} - -static int -dcons_detach(int port) -{ - struct tty *tp; - struct dcons_softc *dc; - - dc = &sc[port]; - - tp = dc->dev->si_tty; - - if (tp->t_state & TS_ISOPEN) { - printf("dcons: still opened\n"); -#if __FreeBSD_version < 502113 - (*linesw[tp->t_line].l_close)(tp, 0); - tp->t_gen++; - ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); -#else - ttyld_close(tp, 0); - tty_close(tp); -#endif - } - /* XXX - * must wait until all device are closed. - */ -#ifdef __DragonFly__ - tsleep((void *)dc, 0, "dcodtc", hz/4); -#else - tsleep((void *)dc, PWAIT, "dcodtc", hz/4); -#endif - destroy_dev(dc->dev); - - return(0); -} - - -/* cnXXX works only for FreeBSD-5 */ -static int -dcons_modevent(module_t mode, int type, void *data) -{ - int err = 0, ret; - - switch (type) { - case MOD_LOAD: - ret = dcons_drv_init(1); - dcons_attach(); -#if __FreeBSD_version >= 500000 - if (ret == 0) { - dcons_cnprobe(&dcons_consdev); - dcons_cninit(&dcons_consdev); - cnadd(&dcons_consdev); - } -#endif - break; - case MOD_UNLOAD: - printf("dcons: unload\n"); - callout_stop(&dcons_callout); -#if __FreeBSD_version < 502122 -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdb_arg = NULL; -#else - gdbdev = NULL; -#endif -#endif -#endif -#if __FreeBSD_version >= 500000 - cnremove(&dcons_consdev); -#endif - dcons_detach(DCONS_CON); - dcons_detach(DCONS_GDB); - dg.buf->magic = 0; + if (buf->version != htonl(DCONS_VERSION)) + return (-1); - contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + s = DCONS_HEADER_SIZE; + for (port = 0; port < DCONS_NPORT; port ++) { + dc = &sc[port]; + dc->o.size = ntohl(buf->osize[port]); + dc->i.size = ntohl(buf->isize[port]); + dc->o.buf = (char *)buf + ntohl(buf->ooffset[port]); + dc->i.buf = (char *)buf + ntohl(buf->ioffset[port]); + dc->o.gen = ntohl(buf->optr[port]) >> DCONS_GEN_SHIFT; + dc->i.gen = ntohl(buf->iptr[port]) >> DCONS_GEN_SHIFT; + dc->o.pos = ntohl(buf->optr[port]) & DCONS_POS_MASK; + dc->i.pos = ntohl(buf->iptr[port]) & DCONS_POS_MASK; + dc->o.ptr = &buf->optr[port]; + dc->i.ptr = &buf->iptr[port]; + dc->brk_state = STATE0; - break; - case MOD_SHUTDOWN: - dg.buf->magic = 0; - break; - default: - err = EOPNOTSUPP; - break; + s += dc->o.size + dc->i.size; } - return(err); -} - -#if __FreeBSD_version >= 502122 -/* Debugger interface */ -static int -dcons_dbg_probe(void) -{ - return(DCONS_FORCE_GDB); -} + /* sanity check */ + if (s > size) + return (-1); -static void -dcons_dbg_init(void) -{ -} + buf->magic = ntohl(DCONS_MAGIC); -static void -dcons_dbg_term(void) -{ + return (0); } -static void -dcons_dbg_putc(int c) +void +dcons_init(struct dcons_buf *buf, int size, struct dcons_softc *sc) { - dcons_putc(&sc[DCONS_GDB], c); -} + int size0, size1, offset; -static int -dcons_dbg_checkc(void) -{ - return (dcons_checkc(&sc[DCONS_GDB])); -} + offset = DCONS_HEADER_SIZE; + size0 = (size - offset); + size1 = size0 * 3 / 4; /* console port buffer */ -static int -dcons_dbg_getc(void) -{ - return (dcons_getc(&sc[DCONS_GDB])); + dcons_init_port(0, offset, size1, buf, sc); + offset += size1; + dcons_init_port(1, offset, size0 - size1, buf, sc); + buf->version = htonl(DCONS_VERSION); + buf->magic = ntohl(DCONS_MAGIC); } -#endif - -DEV_MODULE(dcons, dcons_modevent, NULL); -MODULE_VERSION(dcons, DCONS_VERSION); diff --git a/sys/dev/dcons/dcons.h b/sys/dev/dcons/dcons.h index 6c25ee13a625..5fdc82022343 100644 --- a/sys/dev/dcons/dcons.h +++ b/sys/dev/dcons/dcons.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 + * Copyright (C) 2002-2004 * Hidetoshi Shimokawa. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,12 +90,17 @@ struct dcons_ch { #define STATE2 2 #ifdef _KERNEL -struct dcons_global { - struct consdev *cdev; - struct dcons_buf *buf; - size_t size; - bus_dma_tag_t dma_tag; - bus_dmamap_t dma_map; +struct dcons_softc { + struct dcons_ch o, i; + int brk_state; +#define DC_GDB 1 + int flags; + void *dev; }; -extern struct dcons_global *dcons_conf; + +int dcons_checkc(struct dcons_softc *); +int dcons_ischar(struct dcons_softc *); +void dcons_putc(struct dcons_softc *, int); +int dcons_load_buffer(struct dcons_buf *, int, struct dcons_softc *); +void dcons_init(struct dcons_buf *, int, struct dcons_softc *); #endif diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index f2518fd52c11..32ae15a01be9 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -46,10 +46,19 @@ #include #include +#ifdef __DragonFly__ +#include +#include +#include +#include "dcons.h" +#include "dcons_os.h" +#else #include #include #include #include +#include +#endif #include diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c new file mode 100644 index 000000000000..7347336f3460 --- /dev/null +++ b/sys/dev/dcons/dcons_os.c @@ -0,0 +1,746 @@ +/* + * Copyright (C) 2003,2004 + * Hidetoshi Shimokawa. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Hidetoshi Shimokawa. + * + * 4. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#if __FreeBSD_version >= 502122 +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef __DragonFly__ +#include "dcons.h" +#include "dcons_os.h" +#else +#include +#include +#endif + +#include +#include + +#include + +#include +#include +#include + +#include "opt_ddb.h" +#include "opt_comconsole.h" +#include "opt_dcons.h" + +#ifndef DCONS_POLL_HZ +#define DCONS_POLL_HZ 100 +#endif + +#ifndef DCONS_BUF_SIZE +#define DCONS_BUF_SIZE (16*1024) +#endif + +#ifndef DCONS_FORCE_CONSOLE +#define DCONS_FORCE_CONSOLE 0 /* Mostly for FreeBSD-4/DragonFly */ +#endif + +#ifndef DCONS_FORCE_GDB +#define DCONS_FORCE_GDB 1 +#endif + +#if __FreeBSD_version >= 500101 +#define CONS_NODEV 1 +#if __FreeBSD_version < 502122 +static struct consdev gdbconsdev; +#endif +#endif + +static d_open_t dcons_open; +static d_close_t dcons_close; +#if defined(__DragonFly__) || __FreeBSD_version < 500104 +static d_ioctl_t dcons_ioctl; +#endif + +static struct cdevsw dcons_cdevsw = { +#ifdef __DragonFly__ +#define CDEV_MAJOR 184 + "dcons", CDEV_MAJOR, D_TTY, NULL, 0, + dcons_open, dcons_close, ttyread, ttywrite, dcons_ioctl, + ttypoll, nommap, nostrategy, nodump, nopsize, +#elif __FreeBSD_version >= 500104 + .d_version = D_VERSION, + .d_open = dcons_open, + .d_close = dcons_close, + .d_name = "dcons", + .d_flags = D_TTY | D_NEEDGIANT, +#else +#define CDEV_MAJOR 184 + /* open */ dcons_open, + /* close */ dcons_close, + /* read */ ttyread, + /* write */ ttywrite, + /* ioctl */ dcons_ioctl, + /* poll */ ttypoll, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "dcons", + /* major */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ D_TTY, +#endif +}; + +#ifndef KLD_MODULE +static char bssbuf[DCONS_BUF_SIZE]; /* buf in bss */ +#endif + +/* global data */ +static struct dcons_global dg; +struct dcons_global *dcons_conf; +static int poll_hz = DCONS_POLL_HZ; + +static struct dcons_softc sc[DCONS_NPORT]; + +SYSCTL_NODE(_kern, OID_AUTO, dcons, CTLFLAG_RD, 0, "Dumb Console"); +SYSCTL_INT(_kern_dcons, OID_AUTO, poll_hz, CTLFLAG_RW, &poll_hz, 0, + "dcons polling rate"); + +static int drv_init = 0; +static struct callout dcons_callout; +struct dcons_buf *dcons_buf; /* for local dconschat */ + +#ifdef __DragonFly__ +#define DEV dev_t +#define THREAD d_thread_t +#elif __FreeBSD_version < 500000 +#define DEV dev_t +#define THREAD struct proc +#else +#define DEV struct cdev * +#define THREAD struct thread +#endif + + +static void dcons_tty_start(struct tty *); +static int dcons_tty_param(struct tty *, struct termios *); +static void dcons_timeout(void *); +static int dcons_drv_init(int); + +static cn_probe_t dcons_cnprobe; +static cn_init_t dcons_cninit; +static cn_getc_t dcons_cngetc; +static cn_checkc_t dcons_cncheckc; +static cn_putc_t dcons_cnputc; + +CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc, + dcons_cncheckc, dcons_cnputc, NULL); + +#if __FreeBSD_version >= 502122 +static gdb_probe_f dcons_dbg_probe; +static gdb_init_f dcons_dbg_init; +static gdb_term_f dcons_dbg_term; +static gdb_getc_f dcons_dbg_getc; +static gdb_checkc_f dcons_dbg_checkc; +static gdb_putc_f dcons_dbg_putc; + +GDB_DBGPORT(dcons, dcons_dbg_probe, dcons_dbg_init, dcons_dbg_term, + dcons_dbg_checkc, dcons_dbg_getc, dcons_dbg_putc); + +extern struct gdb_dbgport *gdb_cur; +#endif + +#if (KDB || DDB) && ALT_BREAK_TO_DEBUGGER +static int +dcons_check_break(struct dcons_softc *dc, int c) +{ + if (c < 0) + return (c); + +#if __FreeBSD_version >= 502122 + if (kdb_alt_break(c, &dc->brk_state)) { + if ((dc->flags & DC_GDB) != 0) { + if (gdb_cur == &dcons_gdb_dbgport) { + kdb_dbbe_select("gdb"); + breakpoint(); + } + } else + breakpoint(); + } +#else + switch (dc->brk_state) { + case STATE1: + if (c == KEY_TILDE) + dc->brk_state = STATE2; + else + dc->brk_state = STATE0; + break; + case STATE2: + dc->brk_state = STATE0; + if (c == KEY_CTRLB) { +#if DCONS_FORCE_GDB + if (dc->flags & DC_GDB) + boothowto |= RB_GDB; +#endif + breakpoint(); + } + } + if (c == KEY_CR) + dc->brk_state = STATE1; +#endif + return (c); +} +#else +#define dcons_check_break(dc, c) (c) +#endif + +static int +dcons_os_checkc(struct dcons_softc *dc) +{ + int c; + + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTREAD); + + c = dcons_check_break(dc, dcons_checkc(dc)); + + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_PREREAD); + + return (c); +} + +static int +dcons_os_getc(struct dcons_softc *dc) +{ + int c; + + while ((c = dcons_os_checkc(dc)) == -1); + + return (c & 0xff); +} + +static void +dcons_os_putc(struct dcons_softc *dc, int c) +{ + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_POSTWRITE); + + dcons_putc(dc, c); + + if (dg.dma_tag != NULL) + bus_dmamap_sync(dg.dma_tag, dg.dma_map, BUS_DMASYNC_PREWRITE); +} +static int +dcons_open(DEV dev, int flag, int mode, THREAD *td) +{ + struct tty *tp; + int unit, error, s; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty = ttymalloc(dev->si_tty); + tp->t_oproc = dcons_tty_start; + tp->t_param = dcons_tty_param; + tp->t_stop = nottystop; + tp->t_dev = dev; + + error = 0; + + s = spltty(); + if ((tp->t_state & TS_ISOPEN) == 0) { + tp->t_state |= TS_CARR_ON; + ttychars(tp); + tp->t_iflag = TTYDEF_IFLAG; + tp->t_oflag = TTYDEF_OFLAG; + tp->t_cflag = TTYDEF_CFLAG|CLOCAL; + tp->t_lflag = TTYDEF_LFLAG; + tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttsetwater(tp); + } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { + splx(s); + return (EBUSY); + } + splx(s); + +#if __FreeBSD_version < 502113 + error = (*linesw[tp->t_line].l_open)(dev, tp); +#else + error = ttyld_open(tp, dev); +#endif + + return (error); +} + +static int +dcons_close(DEV dev, int flag, int mode, THREAD *td) +{ + int unit; + struct tty *tp; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty; + if (tp->t_state & TS_ISOPEN) { +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_close)(tp, flag); + ttyclose(tp); +#else + ttyld_close(tp, flag); + tty_close(tp); +#endif + } + + return (0); +} + +#if defined(__DragonFly__) || __FreeBSD_version < 500104 +static int +dcons_ioctl(DEV dev, u_long cmd, caddr_t data, int flag, THREAD *td) +{ + int unit; + struct tty *tp; + int error; + + unit = minor(dev); + if (unit != 0) + return (ENXIO); + + tp = dev->si_tty; + error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); + if (error != ENOIOCTL) + return (error); + + error = ttioctl(tp, cmd, data, flag); + if (error != ENOIOCTL) + return (error); + + return (ENOTTY); +} +#endif + +static int +dcons_tty_param(struct tty *tp, struct termios *t) +{ + tp->t_ispeed = t->c_ispeed; + tp->t_ospeed = t->c_ospeed; + tp->t_cflag = t->c_cflag; + return 0; +} + +static void +dcons_tty_start(struct tty *tp) +{ + struct dcons_softc *dc; + int s; + + dc = (struct dcons_softc *)tp->t_dev->si_drv1; + s = spltty(); + if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { + ttwwakeup(tp); + return; + } + + tp->t_state |= TS_BUSY; + while (tp->t_outq.c_cc != 0) + dcons_os_putc(dc, getc(&tp->t_outq)); + tp->t_state &= ~TS_BUSY; + + ttwwakeup(tp); + splx(s); +} + +static void +dcons_timeout(void *v) +{ + struct tty *tp; + struct dcons_softc *dc; + int i, c, polltime; + + for (i = 0; i < DCONS_NPORT; i ++) { + dc = &sc[i]; + tp = ((DEV)dc->dev)->si_tty; + while ((c = dcons_os_checkc(dc)) != -1) + if (tp->t_state & TS_ISOPEN) +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_rint)(c, tp); +#else + ttyld_rint(tp, c); +#endif + } + polltime = hz / poll_hz; + if (polltime < 1) + polltime = 1; + callout_reset(&dcons_callout, polltime, dcons_timeout, tp); +} + +static void +dcons_cnprobe(struct consdev *cp) +{ +#ifdef __DragonFly__ + cp->cn_dev = make_dev(&dcons_cdevsw, DCONS_CON, + UID_ROOT, GID_WHEEL, 0600, "dcons"); +#elif __FreeBSD_version >= 501109 + sprintf(cp->cn_name, "dcons"); +#else + cp->cn_dev = makedev(CDEV_MAJOR, DCONS_CON); +#endif +#if DCONS_FORCE_CONSOLE + cp->cn_pri = CN_REMOTE; +#else + cp->cn_pri = CN_NORMAL; +#endif +} + +static void +dcons_cninit(struct consdev *cp) +{ + dcons_drv_init(0); +#if CONS_NODEV + cp->cn_arg +#else + cp->cn_dev->si_drv1 +#endif + = (void *)&sc[DCONS_CON]; /* share port0 with unit0 */ +} + +#if CONS_NODEV +static int +dcons_cngetc(struct consdev *cp) +{ + struct dcons_softc *dc = (struct dcons_softc *)cp->cn_arg; + return (dcons_os_getc(dc)); +} +static int +dcons_cncheckc(struct consdev *cp) +{ + struct dcons_softc *dc = (struct dcons_softc *)cp->cn_arg; + return (dcons_os_checkc(dc)); +} +static void +dcons_cnputc(struct consdev *cp, int c) +{ + struct dcons_softc *dc = (struct dcons_softc *)cp->cn_arg; + dcons_os_putc(dc, c); +} +#else +static int +dcons_cngetc(DEV dev) +{ + struct dcons_softc *dc = (struct dcons_softc *)dev->si_drv1; + return (dcons_os_getc(dc)); +} +static int +dcons_cncheckc(DEV dev) +{ + struct dcons_softc *dc = (struct dcons_softc *)dev->si_drv1; + return (dcons_os_checkc(dc)); +} +static void +dcons_cnputc(DEV dev, int c) +{ + struct dcons_softc *dc = (struct dcons_softc *)dev->si_drv1; + dcons_os_putc(dc, c); +} +#endif + +static int +dcons_drv_init(int stage) +{ + int addr, size; + + if (drv_init) + return(drv_init); + + drv_init = -1; + + bzero(&dg, sizeof(dg)); + dcons_conf = &dg; + dg.cdev = &dcons_consdev; + dg.buf = NULL; + dg.size = DCONS_BUF_SIZE; + +#ifdef __i386__ + if (getenv_int("dcons.addr", &addr) > 0 && + getenv_int("dcons.size", &size) > 0) { + /* XXX P to V */ + dg.buf = (struct dcons_buf *)(KERNBASE + addr); + dg.size = size; + if (dcons_load_buffer(dg.buf, dg.size, sc) < 0) + dg.buf = NULL; + } +#endif + if (dg.buf != NULL) + goto ok; + +#ifndef KLD_MODULE + if (stage == 0) { /* XXX or cold */ + /* + * DCONS_FORCE_CONSOLE == 1 and statically linked. + * called from cninit(). can't use contigmalloc yet . + */ + dg.buf = (struct dcons_buf *) bssbuf; + dcons_init(dg.buf, dg.size, sc); + } else +#endif + { + /* + * DCONS_FORCE_CONSOLE == 0 or kernel module case. + * if the module is loaded after boot, + * bssbuf could be non-continuous. + */ + dg.buf = (struct dcons_buf *) contigmalloc(dg.size, + M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); + dcons_init(dg.buf, dg.size, sc); + } + +ok: + dcons_buf = dg.buf; + +#if __FreeBSD_version < 502122 +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; +#if __FreeBSD_version >= 501109 + sprintf(gdbconsdev.cn_name, "dgdb"); +#endif + gdb_arg = &gdbconsdev; +#elif defined(__DragonFly__) + gdbdev = make_dev(&dcons_cdevsw, DCONS_GDB, + UID_ROOT, GID_WHEEL, 0600, "dgdb"); +#else + gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); +#endif + gdb_getc = dcons_cngetc; + gdb_putc = dcons_cnputc; +#endif +#endif + drv_init = 1; + + return 0; +} + + +static int +dcons_attach_port(int port, char *name, int flags) +{ + struct dcons_softc *dc; + struct tty *tp; + DEV dev; + + dc = &sc[port]; + dc->flags = flags; + dev = make_dev(&dcons_cdevsw, port, + UID_ROOT, GID_WHEEL, 0600, name); + dc->dev = (void *)dev; + tp = ttymalloc(NULL); + + dev->si_drv1 = (void *)dc; + dev->si_tty = tp; + + tp->t_oproc = dcons_tty_start; + tp->t_param = dcons_tty_param; + tp->t_stop = nottystop; + tp->t_dev = dc->dev; + + return(0); +} + +static int +dcons_attach(void) +{ + int polltime; + +#ifdef __DragonFly__ + cdevsw_add(&dcons_cdevsw, -1, 0); +#endif + dcons_attach_port(DCONS_CON, "dcons", 0); + dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); +#if __FreeBSD_version < 500000 + callout_init(&dcons_callout); +#else + callout_init(&dcons_callout, 0); +#endif + polltime = hz / poll_hz; + if (polltime < 1) + polltime = 1; + callout_reset(&dcons_callout, polltime, dcons_timeout, NULL); + return(0); +} + +static int +dcons_detach(int port) +{ + struct tty *tp; + struct dcons_softc *dc; + + dc = &sc[port]; + + tp = ((DEV)dc->dev)->si_tty; + + if (tp->t_state & TS_ISOPEN) { + printf("dcons: still opened\n"); +#if __FreeBSD_version < 502113 + (*linesw[tp->t_line].l_close)(tp, 0); + tp->t_gen++; + ttyclose(tp); + ttwakeup(tp); + ttwwakeup(tp); +#else + ttyld_close(tp, 0); + tty_close(tp); +#endif + } + /* XXX + * must wait until all device are closed. + */ +#ifdef __DragonFly__ + tsleep((void *)dc, 0, "dcodtc", hz/4); +#else + tsleep((void *)dc, PWAIT, "dcodtc", hz/4); +#endif + destroy_dev(dc->dev); + + return(0); +} + + +/* cnXXX works only for FreeBSD-5 */ +static int +dcons_modevent(module_t mode, int type, void *data) +{ + int err = 0, ret; + + switch (type) { + case MOD_LOAD: + ret = dcons_drv_init(1); + dcons_attach(); +#if __FreeBSD_version >= 500000 + if (ret == 0) { + dcons_cnprobe(&dcons_consdev); + dcons_cninit(&dcons_consdev); + cnadd(&dcons_consdev); + } +#endif + break; + case MOD_UNLOAD: + printf("dcons: unload\n"); + callout_stop(&dcons_callout); +#if __FreeBSD_version < 502122 +#if DDB && DCONS_FORCE_GDB +#if CONS_NODEV + gdb_arg = NULL; +#else + gdbdev = NULL; +#endif +#endif +#endif +#if __FreeBSD_version >= 500000 + cnremove(&dcons_consdev); +#endif + dcons_detach(DCONS_CON); + dcons_detach(DCONS_GDB); + dg.buf->magic = 0; + + contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + + break; + case MOD_SHUTDOWN: + dg.buf->magic = 0; + break; + default: + err = EOPNOTSUPP; + break; + } + return(err); +} + +#if __FreeBSD_version >= 502122 +/* Debugger interface */ + +static int +dcons_dbg_probe(void) +{ + return(DCONS_FORCE_GDB); +} + +static void +dcons_dbg_init(void) +{ +} + +static void +dcons_dbg_term(void) +{ +} + +static void +dcons_dbg_putc(int c) +{ + struct dcons_softc *dc = &sc[DCONS_GDB]; + dcons_os_putc(dc, c); +} + +static int +dcons_dbg_checkc(void) +{ + struct dcons_softc *dc = &sc[DCONS_GDB]; + return (dcons_os_checkc(dc)); +} + +static int +dcons_dbg_getc(void) +{ + struct dcons_softc *dc = &sc[DCONS_GDB]; + return (dcons_os_getc(dc)); +} +#endif + +DEV_MODULE(dcons, dcons_modevent, NULL); +MODULE_VERSION(dcons, DCONS_VERSION); diff --git a/sys/dev/dcons/dcons_os.h b/sys/dev/dcons/dcons_os.h new file mode 100644 index 000000000000..f88738b5b221 --- /dev/null +++ b/sys/dev/dcons/dcons_os.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2002-2004 + * Hidetoshi Shimokawa. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * + * This product includes software developed by Hidetoshi Shimokawa. + * + * 4. Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +struct dcons_global { + struct consdev *cdev; + struct dcons_buf *buf; + size_t size; + bus_dma_tag_t dma_tag; + bus_dmamap_t dma_map; +}; +extern struct dcons_global *dcons_conf; -- cgit v1.3 From 370f9086a631b7d5280804fa5146b94a898d2c50 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Thu, 14 Oct 2004 00:21:32 +0000 Subject: Fix warnings on non-i386 arch. Submitted by: keramida --- sys/dev/dcons/dcons_os.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 7347336f3460..a04d16eda9f2 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -493,7 +493,9 @@ dcons_cnputc(DEV dev, int c) static int dcons_drv_init(int stage) { +#ifdef __i386__ int addr, size; +#endif if (drv_init) return(drv_init); -- cgit v1.3 From 95bc56897714a12b8e95c92dd8e1a70f1154162d Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Mon, 18 Oct 2004 21:51:27 +0000 Subject: Add new function ttyinitmode() which sets our systemwide default modes on a tty structure. Both the ".init" and the current settings are initialized allowing the function to be used both at attach and open time. The function takes an argument to decide if echoing should be enabled. Echoing should not be enabled for regular physical serial ports unless they are consoles, in which case they should be configured by ttyconsolemode() instead. Use the new function throughout. --- sys/alpha/alpha/promcons.c | 7 +------ sys/alpha/tlsb/zs_tlsb.c | 7 +------ sys/dev/dcons/dcons_os.c | 7 +------ sys/dev/digi/digi.c | 17 +---------------- sys/dev/nmdm/nmdm.c | 8 +------- sys/dev/ofw/ofw_console.c | 7 +------ sys/dev/syscons/syscons.c | 40 ++++++++++++++++++++-------------------- sys/dev/syscons/sysmouse.c | 7 +------ sys/dev/zs/zs.c | 17 ++--------------- sys/i386/isa/pcvt/pcvt_drv.c | 7 +------ sys/ia64/ia64/ssc.c | 7 +------ sys/kern/tty.c | 41 +++++++++++++++++++++++++++++------------ sys/kern/tty_pty.c | 7 +------ sys/sys/tty.h | 1 + 14 files changed, 62 insertions(+), 118 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 62ef0e8cfbe2..5caca759d536 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -107,12 +107,7 @@ promopen(dev, flag, mode, td) tp->t_dev = dev; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsmode(tp, 0); ttsetwater(tp); setuptimeout = 1; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 84f7e83400df..22093b27069d 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -283,12 +283,7 @@ zsopen(struct cdev *dev, int flag, int mode, struct thread *td) tp = dev->si_tty; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index a04d16eda9f2..5a5f0aa10731 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -294,12 +294,7 @@ dcons_open(DEV dev, int flag, int mode, THREAD *td) s = spltty(); if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { splx(s); diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 31e08c98a9dc..5ecc6018689d 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -85,9 +85,6 @@ static void digi_free_state(struct digi_softc *); fepcmd(port, cmd, (op2 << 8) | op1, ncmds) #define fepcmd_w fepcmd - -static speed_t digidefaultrate = TTYDEF_SPEED; - struct con_bios { struct con_bios *next; u_char *bios; @@ -589,19 +586,7 @@ digi_init(struct digi_softc *sc) bc->edelay = 100; - /* - * We don't use all the flags from since - * they are only relevant for logins. It's important to have - * echo off initially so that the line doesn't start blathering - * before the echo flag can be turned off. - */ - tp->t_init_in.c_iflag = 0; - tp->t_init_in.c_oflag = 0; - tp->t_init_in.c_cflag = TTYDEF_CFLAG; - tp->t_init_in.c_lflag = 0; - termioschars(&tp->t_init_in); - tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = digidefaultrate; - tp->t_init_out = tp->t_init_in; + ttyinitmode(tp, 0, 0); port->send_ring = 1; /* Default action on signal RI */ ttycreate(tp, NULL, 0, MINOR_CALLOUT, "D%r%r", sc->res.unit, i); } diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 41a8704305d4..536dce9a4609 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -247,13 +247,7 @@ nmdmopen(struct cdev *dev, int flag, int devtype, struct thread *td) tp2 = sp->other->nm_tty; if ((tp->t_state & TS_ISOPEN) == 0) { - ttychars(tp); /* Set up default chars */ - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_lflag = 0; - tp->t_cflag = TTYDEF_CFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyinitmode(tp, 0, 0); ttsetwater(tp); /* XXX ? */ } else if (tp->t_state & TS_XCLUDE && suser(td)) { return (EBUSY); diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 22bed0f28ce9..40ac7dc7ca7b 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -138,12 +138,7 @@ ofw_dev_open(struct cdev *dev, int flag, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG | CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 7cd99daa7b67..f92d2fb16308 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -145,6 +145,7 @@ SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFLAG_RW, &enable_panic_key, static int debugger; /* prototypes */ +static struct tty *sc_alloc_tty(struct cdev *dev); static int scvidprobe(int unit, int flags, int cons); static int sckbdprobe(int unit, int flags, int cons); static void scmeminit(void *arg); @@ -288,10 +289,23 @@ static char return names[i].name[(adp->va_flags & V_ADP_COLOR) ? 0 : 1]; } +static struct tty * +sc_alloc_tty(struct cdev *dev) +{ + struct tty *tp; + + tp = dev->si_tty = ttyalloc(); + ttyinitmode(tp, 1, 0); + tp->t_oproc = scstart; + tp->t_param = scparam; + tp->t_stop = nottystop; + tp->t_dev = dev; + return (tp); +} + int sc_attach_unit(int unit, int flags) { - struct tty *tp; sc_softc_t *sc; scr_stat *scp; #ifdef SC_PIXEL_MODE @@ -383,14 +397,9 @@ sc_attach_unit(int unit, int flags) for (vc = 0; vc < sc->vtys; vc++) { if (sc->dev[vc] == NULL) { - dev = make_dev(&sc_cdevsw, vc + unit * MAXCONS, + sc->dev[vc] = make_dev(&sc_cdevsw, vc + unit * MAXCONS, UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc + unit * MAXCONS); - sc->dev[vc] = dev; - tp = sc->dev[vc]->si_tty = ttyalloc(); - tp->t_oproc = scstart; - tp->t_param = scparam; - tp->t_stop = nottystop; - tp->t_dev = sc->dev[vc]; + sc_alloc_tty(sc->dev[vc]); if (vc == 0 && sc->dev == main_devs) SC_STAT(sc->dev[0]) = &main_console; } @@ -403,12 +412,8 @@ sc_attach_unit(int unit, int flags) dev = make_dev(&sc_cdevsw, SC_CONSOLECTL, UID_ROOT, GID_WHEEL, 0600, "consolectl"); - tp = dev->si_tty = sc_console_tty = ttyalloc(); - ttyconsolemode(tp, 0); - tp->t_oproc = scstart; - tp->t_param = scparam; - tp->t_stop = nottystop; - tp->t_dev = dev; + sc_console_tty = sc_alloc_tty(dev); + ttyconsolemode(sc_console_tty, 0); SC_STAT(dev) = sc_console; return 0; @@ -2581,7 +2586,6 @@ sc_change_cursor_shape(scr_stat *scp, int flags, int base, int height) static void scinit(int unit, int flags) { - struct tty *tp; /* * When syscons is being initialized as the kernel console, malloc() @@ -2692,11 +2696,7 @@ scinit(int unit, int flags) sc->dev = malloc(sizeof(struct cdev *)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO); sc->dev[0] = make_dev(&sc_cdevsw, unit * MAXCONS, UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit * MAXCONS); - tp = sc->dev[0]->si_tty = ttyalloc(); - tp->t_oproc = scstart; - tp->t_param = scparam; - tp->t_stop = nottystop; - tp->t_dev = sc->dev[0]; + sc_alloc_tty(sc->dev[0]); scp = alloc_scp(sc, sc->first_vty); SC_STAT(sc->dev[0]) = scp; } diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index be4112cf5c4a..4f660e09e878 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -80,12 +80,7 @@ smopen(struct cdev *dev, int flag, int mode, struct thread *td) tp = dev->si_tty; if (!(tp->t_state & TS_ISOPEN)) { - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyinitmode(tp, 0, 0); smparam(tp, &tp->t_termios); ttyld_modem(tp, 1); } else if (tp->t_state & TS_XCLUDE && suser(td)) { diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index b79060be2c95..eec675315568 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -276,12 +276,8 @@ zstty_attach(device_t dev) tp->t_modem = zsttymodem; tp->t_break = zsttybreak; tp->t_stop = zsttystop; - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_lflag = TTYDEF_LFLAG; + ttyinitmode(tp, 0, 0); tp->t_cflag = CREAD | CLOCAL | CS8; - tp->t_ospeed = TTYDEF_SPEED; - tp->t_ispeed = TTYDEF_SPEED; if (zstty_console(dev, mode, sizeof(mode))) { ttychars(tp); @@ -472,19 +468,10 @@ zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td) sc->sc_preg[1] |= ZSWR1_RIE | ZSWR1_SIE; sc->sc_iput = sc->sc_iget = sc->sc_ibuf; - /* - * Initialize the termios status to the defaults. Add in the - * sticky bits from TIOCSFLAGS. - */ - t.c_ispeed = 0; - t.c_ospeed = tp->t_ospeed; - t.c_cflag = TTYDEF_CFLAG; + ttyconsolemode(t, 0); /* Make sure zstty_param() will do something. */ tp->t_ospeed = 0; (void)zstty_param(sc, tp, &t); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_lflag = TTYDEF_LFLAG; ttychars(tp); ttsetwater(tp); diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 16aa04ccf92c..6eb1ac1b905d 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -297,12 +297,7 @@ pcvt_open(struct cdev *dev, int flag, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) { - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyinitmode(tp, 1, 0); pcvt_param(tp, &tp->t_termios); ttyld_modem(tp, 1); /* fake connection */ winsz = 1; /* set winsize later */ diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index a475fb519f5d..6fc3a1b19057 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -148,12 +148,7 @@ sscopen(struct cdev *dev, int flag, int mode, struct thread *td) tp->t_dev = dev; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 020529cff1af..9b4a618c036c 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2845,11 +2845,7 @@ ttymalloc(struct tty *tp) tp->t_timeout = -1; tp->t_dtr_wait = 3 * hz; - tp->t_init_in.c_iflag = TTYDEF_IFLAG; - tp->t_init_in.c_oflag = TTYDEF_OFLAG; - tp->t_init_in.c_cflag = TTYDEF_CFLAG; - tp->t_init_in.c_lflag = TTYDEF_LFLAG; - tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = TTYDEF_SPEED; + ttyinitmode(tp, 0, 0); bcopy(ttydefchars, tp->t_init_in.c_cc, sizeof tp->t_init_in.c_cc); /* Make callout the same as callin */ @@ -3365,23 +3361,44 @@ ttysioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t } /* - * Use more "normal" termios paramters for consoles. + * Initialize a tty to sane modes. */ void -ttyconsolemode(struct tty *tp, int speed) +ttyinitmode(struct tty *tp, int echo, int speed) { + if (speed == 0) + speed = TTYDEF_SPEED; tp->t_init_in.c_iflag = TTYDEF_IFLAG; tp->t_init_in.c_oflag = TTYDEF_OFLAG; - tp->t_init_in.c_cflag = TTYDEF_CFLAG | CLOCAL; - tp->t_init_in.c_lflag = TTYDEF_LFLAG_ECHO; - tp->t_lock_out.c_cflag = tp->t_lock_in.c_cflag = CLOCAL; + tp->t_init_in.c_cflag = TTYDEF_CFLAG; + if (echo) + tp->t_init_in.c_lflag = TTYDEF_LFLAG_ECHO; + else + tp->t_init_in.c_lflag = TTYDEF_LFLAG; + + tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = speed; + termioschars(&tp->t_init_in); + tp->t_init_out = tp->t_init_in; + tp->t_termios = tp->t_init_in; +} + +/* + * Use more "normal" termios paramters for consoles. + */ +void +ttyconsolemode(struct tty *tp, int speed) +{ + if (speed == 0) speed = TTYDEF_SPEED; + ttyinitmode(tp, 1, speed); + tp->t_init_in.c_cflag |= CLOCAL; + tp->t_lock_out.c_cflag = tp->t_lock_in.c_cflag = CLOCAL; tp->t_lock_out.c_ispeed = tp->t_lock_out.c_ospeed = - tp->t_lock_in.c_ispeed = tp->t_lock_in.c_ospeed = - tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed = speed; + tp->t_lock_in.c_ispeed = tp->t_lock_in.c_ospeed = speed; tp->t_init_out = tp->t_init_in; + tp->t_termios = tp->t_init_in; } /* diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 65645815cd86..89d1b36124a2 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -175,12 +175,7 @@ ptsopen(struct cdev *dev, int flag, int devtype, struct thread *td) pt = dev->si_drv1; tp = dev->si_tty; if ((tp->t_state & TS_ISOPEN) == 0) { - ttychars(tp); /* Set up default chars */ - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_lflag = TTYDEF_LFLAG_ECHO; - tp->t_cflag = TTYDEF_CFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyinitmode(tp, 1, 0); } else if (tp->t_state & TS_XCLUDE && suser(td)) return (EBUSY); else if (pt->pt_prison != td->td_ucred->cr_prison) diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 75d183b96d09..d9f104aef81d 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -357,6 +357,7 @@ void ttyflush(struct tty *tp, int rw); void ttyfree(struct tty *tp); void ttygone(struct tty *tp); void ttyinfo(struct tty *tp); +void ttyinitmode(struct tty *tp, int echo, int speed); int ttyinput(int c, struct tty *tp); int ttylclose(struct tty *tp, int flag); void ttyldoptim(struct tty *tp); -- cgit v1.3 From 8ffa2e795461abf7829b174fac33954dc3786714 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Fri, 22 Oct 2004 15:03:22 +0000 Subject: Check _BOOT flag. --- sys/dev/dcons/dcons.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons.h b/sys/dev/dcons/dcons.h index 5fdc82022343..988c81f2722c 100644 --- a/sys/dev/dcons/dcons.h +++ b/sys/dev/dcons/dcons.h @@ -35,7 +35,7 @@ * $FreeBSD$ */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_BOOT) #define V volatile #else #define V @@ -74,7 +74,7 @@ struct dcons_ch { u_int32_t size; u_int32_t gen; u_int32_t pos; -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_BOOT) V u_int32_t *ptr; V char *buf; #else @@ -89,7 +89,7 @@ struct dcons_ch { #define STATE1 1 #define STATE2 2 -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_BOOT) struct dcons_softc { struct dcons_ch o, i; int brk_state; -- cgit v1.3 From c751e6f0fabb07382ee802d931493ba0392d4354 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Sun, 24 Oct 2004 12:41:04 +0000 Subject: - Use quad_t for dcons buffer address and size. - Allow read/write access to dcons buffer passed by loader(8). --- sys/dev/dcons/dcons_os.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 5a5f0aa10731..498bf98e80e5 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -489,7 +489,7 @@ static int dcons_drv_init(int stage) { #ifdef __i386__ - int addr, size; + quad_t addr, size; #endif if (drv_init) @@ -504,10 +504,17 @@ dcons_drv_init(int stage) dg.size = DCONS_BUF_SIZE; #ifdef __i386__ - if (getenv_int("dcons.addr", &addr) > 0 && - getenv_int("dcons.size", &size) > 0) { + if (getenv_quad("dcons.addr", &addr) > 0 && + getenv_quad("dcons.size", &size) > 0) { + vm_paddr_t pa; + /* + * Allow read/write access to dcons buffer. + */ + for (pa = trunc_page(addr); pa < addr + size; pa += PAGE_SIZE) + *vtopte(KERNBASE + pa) |= PG_RW; + invltlb(); /* XXX P to V */ - dg.buf = (struct dcons_buf *)(KERNBASE + addr); + dg.buf = (struct dcons_buf *)(vm_offset_t)(KERNBASE + addr); dg.size = size; if (dcons_load_buffer(dg.buf, dg.size, sc) < 0) dg.buf = NULL; -- cgit v1.3 From 520d7d186b18967ddae54cde589ed378ae9814df Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Thu, 28 Oct 2004 12:18:22 +0000 Subject: Use dcons buffer passed by loader on amd64. --- sys/dev/dcons/dcons_os.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 498bf98e80e5..3bdbb69039da 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -488,7 +488,7 @@ dcons_cnputc(DEV dev, int c) static int dcons_drv_init(int stage) { -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) quad_t addr, size; #endif @@ -503,9 +503,10 @@ dcons_drv_init(int stage) dg.buf = NULL; dg.size = DCONS_BUF_SIZE; -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) if (getenv_quad("dcons.addr", &addr) > 0 && getenv_quad("dcons.size", &size) > 0) { +#ifdef __i386__ vm_paddr_t pa; /* * Allow read/write access to dcons buffer. @@ -513,6 +514,7 @@ dcons_drv_init(int stage) for (pa = trunc_page(addr); pa < addr + size; pa += PAGE_SIZE) *vtopte(KERNBASE + pa) |= PG_RW; invltlb(); +#endif /* XXX P to V */ dg.buf = (struct dcons_buf *)(vm_offset_t)(KERNBASE + addr); dg.size = size; -- cgit v1.3 From 098ca2bda93c701c5331d4e6aace072495b4caaa Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 6 Jan 2005 01:43:34 +0000 Subject: Start each of the license/copyright comments with /*-, minor shuffle of lines --- sys/dev/aac/aac_cam.c | 2 +- sys/dev/acpica/acpi_ec.c | 3 +- sys/dev/acpica/acpi_if.m | 2 +- sys/dev/acpica/acpi_pci.c | 2 +- sys/dev/advansys/adv_eisa.c | 2 +- sys/dev/advansys/adv_isa.c | 2 +- sys/dev/advansys/adv_pci.c | 2 +- sys/dev/advansys/advansys.c | 4 +-- sys/dev/advansys/advansys.h | 2 +- sys/dev/advansys/advlib.c | 4 +-- sys/dev/advansys/advlib.h | 4 +-- sys/dev/advansys/advmcode.c | 2 +- sys/dev/advansys/advmcode.h | 2 +- sys/dev/advansys/adw_pci.c | 2 +- sys/dev/advansys/adwcam.c | 2 +- sys/dev/advansys/adwlib.c | 4 +-- sys/dev/advansys/adwlib.h | 2 +- sys/dev/advansys/adwmcode.c | 2 +- sys/dev/advansys/adwmcode.h | 2 +- sys/dev/advansys/adwvar.h | 2 +- sys/dev/aha/aha.c | 2 +- sys/dev/aha/aha_isa.c | 2 +- sys/dev/aha/ahareg.h | 2 +- sys/dev/ahb/ahb.c | 2 +- sys/dev/ahb/ahbreg.h | 2 +- sys/dev/aic/aic6360reg.h | 2 +- sys/dev/aic7xxx/ahc_eisa.c | 2 +- sys/dev/aic7xxx/ahc_isa.c | 2 +- sys/dev/aic7xxx/ahc_pci.c | 2 +- sys/dev/aic7xxx/ahd_pci.c | 2 +- sys/dev/aic7xxx/aic7770.c | 2 +- sys/dev/aic7xxx/aic79xx.c | 2 +- sys/dev/aic7xxx/aic79xx.h | 2 +- sys/dev/aic7xxx/aic79xx.reg | 2 +- sys/dev/aic7xxx/aic79xx.seq | 2 +- sys/dev/aic7xxx/aic79xx_inline.h | 2 +- sys/dev/aic7xxx/aic79xx_osm.c | 2 +- sys/dev/aic7xxx/aic79xx_osm.h | 2 +- sys/dev/aic7xxx/aic79xx_pci.c | 2 +- sys/dev/aic7xxx/aic7xxx.c | 2 +- sys/dev/aic7xxx/aic7xxx.h | 2 +- sys/dev/aic7xxx/aic7xxx.reg | 2 +- sys/dev/aic7xxx/aic7xxx.seq | 2 +- sys/dev/aic7xxx/aic7xxx_93cx6.c | 2 +- sys/dev/aic7xxx/aic7xxx_93cx6.h | 2 +- sys/dev/aic7xxx/aic7xxx_inline.h | 2 +- sys/dev/aic7xxx/aic7xxx_osm.c | 2 +- sys/dev/aic7xxx/aic7xxx_osm.h | 2 +- sys/dev/aic7xxx/aic7xxx_pci.c | 2 +- sys/dev/aic7xxx/aic_osm_lib.c | 2 +- sys/dev/aic7xxx/aic_osm_lib.h | 2 +- sys/dev/aic7xxx/aicasm/aicasm.c | 2 +- sys/dev/aic7xxx/aicasm/aicasm.h | 2 +- sys/dev/aic7xxx/aicasm/aicasm_gram.y | 2 +- sys/dev/aic7xxx/aicasm/aicasm_insformat.h | 2 +- sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y | 2 +- sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l | 2 +- sys/dev/aic7xxx/aicasm/aicasm_scan.l | 2 +- sys/dev/aic7xxx/aicasm/aicasm_symbol.c | 2 +- sys/dev/aic7xxx/aicasm/aicasm_symbol.h | 2 +- sys/dev/amd/amd.c | 2 +- sys/dev/amd/amd.h | 2 +- sys/dev/amr/amr.c | 2 +- sys/dev/amr/amr_cam.c | 2 +- sys/dev/amr/amr_disk.c | 2 +- sys/dev/amr/amr_pci.c | 2 +- sys/dev/an/if_aironet_ieee.h | 2 +- sys/dev/an/if_an.c | 2 +- sys/dev/an/if_an_isa.c | 2 +- sys/dev/an/if_an_pccard.c | 2 +- sys/dev/an/if_anreg.h | 2 +- sys/dev/ar/if_ar.c | 2 +- sys/dev/ar/if_ar.h | 2 +- sys/dev/ar/if_ar_isa.c | 2 +- sys/dev/ar/if_arregs.h | 2 +- sys/dev/asr/dptalign.h | 2 +- sys/dev/asr/dptsig.h | 2 +- sys/dev/asr/i2oadptr.h | 3 +- sys/dev/asr/i2obscsi.h | 3 +- sys/dev/asr/i2odep.h | 3 +- sys/dev/asr/i2odpt.h | 3 +- sys/dev/asr/i2oexec.h | 3 +- sys/dev/asr/i2omsg.h | 3 +- sys/dev/asr/i2otypes.h | 3 +- sys/dev/asr/i2outil.h | 3 +- sys/dev/asr/osd_defs.h | 2 +- sys/dev/asr/osd_unix.h | 2 +- sys/dev/asr/osd_util.h | 2 +- sys/dev/asr/sys_info.h | 2 +- sys/dev/auxio/auxio.c | 2 +- sys/dev/auxio/auxioreg.h | 2 +- sys/dev/awi/if_awi_pccard.c | 2 +- sys/dev/bfe/if_bfe.c | 6 ++-- sys/dev/bfe/if_bfereg.h | 5 +-- sys/dev/bge/if_bge.c | 2 +- sys/dev/bge/if_bgereg.h | 2 +- sys/dev/bktr/bktr_audio.h | 2 +- sys/dev/bktr/bktr_card.h | 2 +- sys/dev/bktr/bktr_core.h | 2 +- sys/dev/bktr/bktr_mem.c | 2 +- sys/dev/bktr/bktr_mem.h | 2 +- sys/dev/bktr/bktr_os.h | 2 +- sys/dev/bktr/bktr_reg.h | 2 +- sys/dev/bktr/bktr_tuner.h | 2 +- sys/dev/bktr/ioctl_meteor.h | 2 +- sys/dev/buslogic/bt.c | 2 +- sys/dev/buslogic/bt_eisa.c | 2 +- sys/dev/buslogic/bt_isa.c | 2 +- sys/dev/buslogic/btreg.h | 2 +- sys/dev/cardbus/cardbus.c | 2 +- sys/dev/cardbus/cardbus_cis.c | 2 +- sys/dev/cardbus/cardbus_cis.h | 2 +- sys/dev/cardbus/cardbusreg.h | 2 +- sys/dev/cardbus/cardbusvar.h | 2 +- sys/dev/cnw/if_cnwioctl.h | 2 +- sys/dev/cp/cpddk.c | 2 +- sys/dev/cp/cpddk.h | 2 +- sys/dev/cp/if_cp.c | 2 +- sys/dev/cp/ng_cp.h | 2 +- sys/dev/cs/if_cs.c | 2 +- sys/dev/cs/if_cs_isa.c | 2 +- sys/dev/cs/if_cs_pccard.c | 2 +- sys/dev/cs/if_csreg.h | 2 +- sys/dev/cs/if_csvar.h | 2 +- sys/dev/ct/bshw_machdep.c | 2 +- sys/dev/ct/bshwvar.h | 2 +- sys/dev/ct/ct.c | 2 +- sys/dev/ct/ct_isa.c | 2 +- sys/dev/ct/ct_machdep.h | 2 +- sys/dev/ct/ctvar.h | 2 +- sys/dev/ctau/am8530.h | 2 +- sys/dev/ctau/ctau.c | 2 +- sys/dev/ctau/ctaureg.h | 2 +- sys/dev/ctau/ctddk.c | 2 +- sys/dev/ctau/ctddk.h | 2 +- sys/dev/ctau/ds2153.h | 2 +- sys/dev/ctau/hdc64570.h | 2 +- sys/dev/ctau/if_ct.c | 2 +- sys/dev/ctau/lxt318.h | 2 +- sys/dev/ctau/ng_ct.h | 2 +- sys/dev/cx/cronyxfw.h | 2 +- sys/dev/cx/csigma.c | 2 +- sys/dev/cx/cxddk.c | 2 +- sys/dev/cx/cxddk.h | 2 +- sys/dev/cx/cxreg.h | 2 +- sys/dev/cx/if_cx.c | 2 +- sys/dev/cx/machdep.h | 2 +- sys/dev/cx/ng_cx.h | 2 +- sys/dev/cy/cy_pci.c | 2 +- sys/dev/dc/dcphy.c | 2 +- sys/dev/dcons/dcons.c | 2 +- sys/dev/dcons/dcons.h | 2 +- sys/dev/dcons/dcons_crom.c | 2 +- sys/dev/dcons/dcons_os.c | 2 +- sys/dev/dcons/dcons_os.h | 2 +- sys/dev/dec/mc146818reg.h | 2 +- sys/dev/dec/mcclock.c | 2 +- sys/dev/dec/mcclock_if.m | 2 +- sys/dev/dec/mcclockvar.h | 2 +- sys/dev/dpt/dpt.h | 2 +- sys/dev/dpt/dpt_scsi.c | 2 +- sys/dev/drm/ati_pcigart.h | 4 +-- sys/dev/drm/drm.h | 2 +- sys/dev/drm/drmP.h | 4 +-- sys/dev/drm/drm_agpsupport.h | 4 +-- sys/dev/drm/drm_auth.h | 4 +-- sys/dev/drm/drm_bufs.h | 4 +-- sys/dev/drm/drm_context.h | 4 +-- sys/dev/drm/drm_dma.h | 4 +-- sys/dev/drm/drm_drawable.h | 4 +-- sys/dev/drm/drm_drv.h | 4 +-- sys/dev/drm/drm_fops.h | 4 +-- sys/dev/drm/drm_ioctl.h | 4 +-- sys/dev/drm/drm_irq.h | 4 +-- sys/dev/drm/drm_linux_list.h | 4 +-- sys/dev/drm/drm_lock.h | 4 +-- sys/dev/drm/drm_memory.h | 4 +-- sys/dev/drm/drm_memory_debug.h | 4 +-- sys/dev/drm/drm_os_freebsd.h | 2 +- sys/dev/drm/drm_pci.h | 2 +- sys/dev/drm/drm_sarea.h | 2 +- sys/dev/drm/drm_scatter.h | 4 +-- sys/dev/drm/drm_sysctl.h | 2 +- sys/dev/drm/drm_vm.h | 2 +- sys/dev/drm/mga.h | 4 +-- sys/dev/drm/mga_dma.c | 4 +-- sys/dev/drm/mga_drm.h | 4 +-- sys/dev/drm/mga_drv.c | 4 +-- sys/dev/drm/mga_drv.h | 4 +-- sys/dev/drm/mga_irq.c | 4 +-- sys/dev/drm/mga_state.c | 4 +-- sys/dev/drm/mga_ucode.h | 4 +-- sys/dev/drm/mga_warp.c | 4 +-- sys/dev/drm/r128.h | 4 +-- sys/dev/drm/r128_cce.c | 4 +-- sys/dev/drm/r128_drm.h | 4 +-- sys/dev/drm/r128_drv.c | 4 +-- sys/dev/drm/r128_drv.h | 4 +-- sys/dev/drm/r128_irq.c | 4 +-- sys/dev/drm/r128_state.c | 4 +-- sys/dev/drm/radeon.h | 4 +-- sys/dev/drm/radeon_cp.c | 4 +-- sys/dev/drm/radeon_drm.h | 4 +-- sys/dev/drm/radeon_drv.c | 4 +-- sys/dev/drm/radeon_drv.h | 4 +-- sys/dev/drm/radeon_irq.c | 4 +-- sys/dev/drm/radeon_mem.c | 4 +-- sys/dev/drm/radeon_state.c | 2 +- sys/dev/drm/sis.h | 4 +-- sys/dev/drm/sis_drv.c | 4 +-- sys/dev/drm/sis_drv.h | 4 +-- sys/dev/drm/sis_ds.c | 4 +-- sys/dev/drm/sis_ds.h | 4 +-- sys/dev/drm/sis_mm.c | 4 +-- sys/dev/drm/tdfx.h | 4 +-- sys/dev/drm/tdfx_drv.c | 4 +-- sys/dev/ed/if_ed.c | 2 +- sys/dev/ed/if_ed98.h | 2 +- sys/dev/ed/if_ed_cbus.c | 2 +- sys/dev/ed/if_ed_isa.c | 2 +- sys/dev/ed/if_ed_pccard.c | 2 +- sys/dev/ed/if_edreg.h | 2 +- sys/dev/ed/if_edvar.h | 2 +- sys/dev/eisa/eisa_if.m | 2 +- sys/dev/eisa/eisaconf.c | 2 +- sys/dev/eisa/eisaconf.h | 2 +- sys/dev/em/LICENSE | 2 ++ sys/dev/en/if_en_pci.c | 3 +- sys/dev/en/midway.c | 3 +- sys/dev/en/midwayvar.h | 3 +- sys/dev/ep/if_ep.c | 2 +- sys/dev/ep/if_ep_eisa.c | 2 +- sys/dev/ep/if_ep_isa.c | 2 +- sys/dev/ep/if_ep_pccard.c | 2 +- sys/dev/ep/if_epreg.h | 2 +- sys/dev/ep/if_epvar.h | 2 +- sys/dev/esp/ncr53c9x.c | 2 +- sys/dev/esp/ncr53c9xreg.h | 2 +- sys/dev/esp/ncr53c9xvar.h | 2 +- sys/dev/ex/if_ex.c | 2 +- sys/dev/ex/if_exreg.h | 2 +- sys/dev/exca/exca.c | 2 +- sys/dev/exca/excareg.h | 2 +- sys/dev/exca/excavar.h | 2 +- sys/dev/fatm/firmware.h | 2 +- sys/dev/fatm/if_fatm.c | 2 +- sys/dev/fatm/if_fatm_rate.h | 2 +- sys/dev/fatm/if_fatmreg.h | 2 +- sys/dev/fatm/if_fatmvar.h | 2 +- sys/dev/fb/gallant12x22.c | 2 +- sys/dev/fb/gallant12x22.h | 2 +- sys/dev/fb/gfb.h | 2 +- sys/dev/fb/tga.h | 2 +- sys/dev/fe/if_fe.c | 2 +- sys/dev/fe/if_fe_cbus.c | 2 +- sys/dev/fe/if_fe_isa.c | 2 +- sys/dev/fe/if_fe_pccard.c | 2 +- sys/dev/fe/if_fereg.h | 2 +- sys/dev/fe/if_fevar.h | 2 +- sys/dev/firewire/firewire.c | 2 +- sys/dev/firewire/firewire.h | 2 +- sys/dev/firewire/firewire_phy.h | 2 +- sys/dev/firewire/firewirereg.h | 2 +- sys/dev/firewire/fwdev.c | 2 +- sys/dev/firewire/fwdma.c | 2 +- sys/dev/firewire/fwdma.h | 2 +- sys/dev/firewire/fwmem.c | 2 +- sys/dev/firewire/fwmem.h | 2 +- sys/dev/firewire/fwohci.c | 2 +- sys/dev/firewire/fwohci_pci.c | 2 +- sys/dev/firewire/fwohcireg.h | 2 +- sys/dev/firewire/fwohcivar.h | 2 +- sys/dev/firewire/fwphyreg.h | 2 +- sys/dev/firewire/iec13213.h | 2 +- sys/dev/firewire/iec68113.h | 2 +- sys/dev/firewire/if_fwe.c | 2 +- sys/dev/firewire/if_fwevar.h | 2 +- sys/dev/firewire/if_fwip.c | 2 +- sys/dev/firewire/if_fwipvar.h | 2 +- sys/dev/firewire/sbp.c | 2 +- sys/dev/firewire/sbp.h | 2 +- sys/dev/firewire/sbp_targ.c | 2 +- sys/dev/fxp/if_fxpreg.h | 2 +- sys/dev/fxp/if_fxpvar.h | 2 +- sys/dev/fxp/rcvbundl.h | 2 +- sys/dev/gem/if_gem_pci.c | 2 +- sys/dev/gem/if_gemreg.h | 2 +- sys/dev/gem/if_gemvar.h | 2 +- sys/dev/gfb/gfb_pci.c | 2 +- sys/dev/gfb/gfb_pci.h | 2 +- sys/dev/harp/if_harp.c | 2 +- sys/dev/hatm/if_hatm.c | 2 +- sys/dev/hatm/if_hatm_intr.c | 2 +- sys/dev/hatm/if_hatm_ioctl.c | 2 +- sys/dev/hatm/if_hatm_rx.c | 2 +- sys/dev/hatm/if_hatm_tx.c | 2 +- sys/dev/hatm/if_hatmconf.h | 2 +- sys/dev/hatm/if_hatmreg.h | 2 +- sys/dev/hatm/if_hatmvar.h | 2 +- sys/dev/hfa/fore.h | 2 +- sys/dev/hfa/fore_aali.h | 2 +- sys/dev/hfa/fore_command.c | 2 +- sys/dev/hfa/fore_if.c | 2 +- sys/dev/hfa/fore_include.h | 2 +- sys/dev/hfa/fore_init.c | 2 +- sys/dev/hfa/fore_intr.c | 2 +- sys/dev/hfa/fore_output.c | 2 +- sys/dev/hfa/fore_slave.h | 2 +- sys/dev/hfa/fore_stats.c | 2 +- sys/dev/hfa/fore_stats.h | 2 +- sys/dev/hfa/fore_var.h | 2 +- sys/dev/hfa/fore_vcm.c | 2 +- sys/dev/hifn/hifn7751.c | 2 +- sys/dev/hifn/hifn7751reg.h | 2 +- sys/dev/hifn/hifn7751var.h | 2 +- sys/dev/hptmv/entry.c | 2 +- sys/dev/hptmv/global.h | 2 +- sys/dev/hptmv/hptintf.h | 2 +- sys/dev/hptmv/mv.c | 2 +- sys/dev/hptmv/mvOs.h | 2 +- sys/dev/hptmv/osbsd.h | 2 +- sys/dev/ic/cd180.h | 2 +- sys/dev/ic/hd64570.h | 2 +- sys/dev/ic/sab82532.h | 2 +- sys/dev/ic/wd33c93reg.h | 2 +- sys/dev/ic/z8530.h | 2 +- sys/dev/ichsmb/ichsmb.c | 3 +- sys/dev/ichsmb/ichsmb_reg.h | 3 +- sys/dev/ichsmb/ichsmb_var.h | 3 +- sys/dev/ichwd/ichwd.c | 2 +- sys/dev/ichwd/ichwd.h | 2 +- sys/dev/ida/ida_eisa.c | 2 +- sys/dev/idt/idt.c | 2 +- sys/dev/idt/idt_harp.c | 2 +- sys/dev/idt/idt_pci.c | 2 +- sys/dev/idt/idtreg.h | 2 +- sys/dev/idt/idtvar.h | 2 +- sys/dev/ie/if_iee16.h | 2 +- sys/dev/if_ndis/if_ndis.c | 2 +- sys/dev/if_ndis/if_ndis_pccard.c | 2 +- sys/dev/if_ndis/if_ndis_pci.c | 2 +- sys/dev/if_ndis/if_ndisvar.h | 2 +- sys/dev/iicbus/iicbb_if.m | 2 +- sys/dev/iicbus/iicbus_if.m | 2 +- sys/dev/iir/iir.c | 2 +- sys/dev/iir/iir.h | 2 +- sys/dev/iir/iir_ctrl.c | 2 +- sys/dev/isp/isp.c | 2 +- sys/dev/isp/isp_freebsd.c | 2 +- sys/dev/isp/isp_freebsd.h | 2 +- sys/dev/isp/isp_inline.h | 2 +- sys/dev/isp/isp_ioctl.h | 2 +- sys/dev/isp/isp_target.c | 2 +- sys/dev/isp/isp_target.h | 2 +- sys/dev/isp/isp_tpublic.h | 2 +- sys/dev/isp/ispmbox.h | 2 +- sys/dev/isp/ispreg.h | 2 +- sys/dev/isp/ispvar.h | 2 +- sys/dev/ispfw/asm_1000.h | 2 +- sys/dev/ispfw/asm_1040.h | 2 +- sys/dev/ispfw/asm_1080.h | 2 +- sys/dev/ispfw/asm_12160.h | 2 +- sys/dev/ispfw/asm_2100.h | 2 +- sys/dev/ispfw/asm_2200.h | 2 +- sys/dev/ispfw/asm_2300.h | 2 +- sys/dev/ixgb/LICENSE | 4 +++ sys/dev/ixgb/if_ixgb.c | 2 +- sys/dev/ixgb/if_ixgb.h | 2 +- sys/dev/ixgb/if_ixgb_osdep.h | 2 +- sys/dev/lge/if_lge.c | 2 +- sys/dev/lge/if_lgereg.h | 2 +- sys/dev/lnc/if_lnc_cbus.c | 2 +- sys/dev/lnc/if_lnc_isa.c | 2 +- sys/dev/matcd/creativeif.h | 3 +- sys/dev/matcd/matcd.c | 3 +- sys/dev/matcd/matcd_data.h | 3 +- sys/dev/matcd/matcd_isa.c | 3 +- sys/dev/matcd/matcddrv.h | 3 +- sys/dev/matcd/options.h | 3 +- sys/dev/mc146818/mc146818.c | 2 +- sys/dev/mc146818/mc146818reg.h | 2 +- sys/dev/mc146818/mc146818var.h | 2 +- sys/dev/mcd/mcd.c | 2 +- sys/dev/mcd/mcdreg.h | 2 +- sys/dev/md/md.c | 4 +-- sys/dev/mii/acphy.c | 2 +- sys/dev/mii/amphy.c | 2 +- sys/dev/mii/amphyreg.h | 2 +- sys/dev/mii/bmtphy.c | 2 +- sys/dev/mii/bmtphyreg.h | 1 - sys/dev/mii/brgphy.c | 2 +- sys/dev/mii/brgphyreg.h | 2 +- sys/dev/mii/ciphy.c | 2 +- sys/dev/mii/ciphyreg.h | 2 +- sys/dev/mii/dcphy.c | 2 +- sys/dev/mii/e1000phy.c | 2 +- sys/dev/mii/e1000phyreg.h | 4 +-- sys/dev/mii/exphy.c | 2 +- sys/dev/mii/lxtphy.c | 2 +- sys/dev/mii/mii.h | 2 +- sys/dev/mii/mlphy.c | 2 +- sys/dev/mii/nsgphy.c | 2 +- sys/dev/mii/nsgphyreg.h | 2 +- sys/dev/mii/nsphy.c | 2 +- sys/dev/mii/pnaphy.c | 2 +- sys/dev/mii/qsphy.c | 2 +- sys/dev/mii/rgephy.c | 2 +- sys/dev/mii/rgephyreg.h | 2 +- sys/dev/mii/rlphy.c | 2 +- sys/dev/mii/tdkphy.c | 2 +- sys/dev/mii/tdkphyreg.h | 2 +- sys/dev/mii/tlphy.c | 2 +- sys/dev/mii/tlphyreg.h | 2 +- sys/dev/mii/ukphy.c | 2 +- sys/dev/mii/xmphy.c | 2 +- sys/dev/mii/xmphyreg.h | 2 +- sys/dev/mpt/mpilib/fc_log.h | 2 +- sys/dev/mpt/mpilib/mpi.h | 2 +- sys/dev/mpt/mpilib/mpi_cnfg.h | 2 +- sys/dev/mpt/mpilib/mpi_fc.h | 2 +- sys/dev/mpt/mpilib/mpi_init.h | 2 +- sys/dev/mpt/mpilib/mpi_ioc.h | 2 +- sys/dev/mpt/mpilib/mpi_lan.h | 2 +- sys/dev/mpt/mpilib/mpi_raid.h | 2 +- sys/dev/mpt/mpilib/mpi_targ.h | 2 +- sys/dev/mpt/mpilib/mpi_type.h | 2 +- sys/dev/mpt/mpt.c | 2 +- sys/dev/mpt/mpt.h | 2 +- sys/dev/mpt/mpt_debug.c | 2 +- sys/dev/mpt/mpt_freebsd.c | 2 +- sys/dev/mpt/mpt_freebsd.h | 2 +- sys/dev/mse/mse.c | 2 +- sys/dev/mse/mse_cbus.c | 2 +- sys/dev/mse/mse_isa.c | 2 +- sys/dev/mse/msevar.h | 2 +- sys/dev/my/if_myreg.h | 2 +- sys/dev/ncv/ncr53c500.c | 2 +- sys/dev/ncv/ncr53c500_pccard.c | 2 +- sys/dev/ncv/ncr53c500hw.h | 2 +- sys/dev/ncv/ncr53c500hwtab.h | 2 +- sys/dev/ncv/ncr53c500reg.h | 2 +- sys/dev/ncv/ncr53c500var.h | 2 +- sys/dev/nge/if_nge.c | 2 +- sys/dev/nge/if_ngereg.h | 2 +- sys/dev/nmdm/nmdm.c | 2 +- sys/dev/nsp/nsp.c | 2 +- sys/dev/nsp/nsp_pccard.c | 2 +- sys/dev/nsp/nspreg.h | 2 +- sys/dev/nsp/nspvar.h | 2 +- sys/dev/ofw/ofw_bus_if.m | 1 + sys/dev/ofw/ofw_console.c | 2 +- sys/dev/ofw/ofw_disk.c | 2 +- sys/dev/ofw/openfirm.c | 4 +-- sys/dev/ofw/openfirm.h | 2 +- sys/dev/ofw/openfirmio.c | 2 +- sys/dev/ofw/openfirmio.h | 2 +- sys/dev/owi/if_owi.c | 2 +- sys/dev/owi/if_owi_pccard.c | 2 +- sys/dev/owi/if_wireg.h | 2 +- sys/dev/owi/if_wivar.h | 2 +- sys/dev/patm/genrtab/genrtab.c | 2 +- sys/dev/patm/idt77252reg.h | 2 +- sys/dev/patm/if_patm.c | 2 +- sys/dev/patm/if_patm_attach.c | 2 +- sys/dev/patm/if_patm_intr.c | 2 +- sys/dev/patm/if_patm_ioctl.c | 2 +- sys/dev/patm/if_patm_rx.c | 2 +- sys/dev/patm/if_patm_tx.c | 2 +- sys/dev/patm/if_patmvar.h | 2 +- sys/dev/pbio/pbio.c | 2 +- sys/dev/pbio/pbioio.h | 2 +- sys/dev/pccard/card_if.m | 2 +- sys/dev/pccard/pccard.c | 2 +- sys/dev/pccard/pccard_cis.c | 2 +- sys/dev/pccard/pccard_cis.h | 2 +- sys/dev/pccard/pccard_cis_quirks.c | 2 +- sys/dev/pccard/pccardreg.h | 2 +- sys/dev/pccard/pccardvar.h | 2 +- sys/dev/pccard/power_if.m | 2 +- sys/dev/pccbb/pccbb.c | 2 +- sys/dev/pccbb/pccbb_isa.c | 2 +- sys/dev/pccbb/pccbb_pci.c | 2 +- sys/dev/pccbb/pccbbdevid.h | 2 +- sys/dev/pccbb/pccbbreg.h | 2 +- sys/dev/pccbb/pccbbvar.h | 2 +- sys/dev/pci/pci.c | 2 +- sys/dev/pci/pci_if.m | 2 +- sys/dev/pci/pci_private.h | 2 +- sys/dev/pci/pcib_if.m | 2 +- sys/dev/pci/pcireg.h | 2 +- sys/dev/pci/pcivar.h | 2 +- sys/dev/ppbus/lpt.c | 2 +- sys/dev/ppbus/lptio.h | 2 +- sys/dev/ppbus/pcfclock.c | 2 +- sys/dev/ppbus/ppbus_if.m | 2 +- sys/dev/ppbus/pps.c | 2 +- sys/dev/ppc/ppcvar.h | 1 - sys/dev/puc/puc.c | 2 +- sys/dev/puc/puc_ebus.c | 2 +- sys/dev/puc/puc_pci.c | 2 +- sys/dev/puc/puc_sbus.c | 2 +- sys/dev/puc/pucdata.c | 2 +- sys/dev/puc/pucvar.h | 2 +- sys/dev/ray/if_ray.c | 2 +- sys/dev/ray/if_raydbg.h | 2 +- sys/dev/ray/if_raymib.h | 2 +- sys/dev/ray/if_rayreg.h | 2 +- sys/dev/ray/if_rayvar.h | 2 +- sys/dev/rc/rc.c | 2 +- sys/dev/rc/rcreg.h | 2 +- sys/dev/re/if_re.c | 2 +- sys/dev/rndtest/rndtest.c | 2 +- sys/dev/rndtest/rndtest.h | 2 +- sys/dev/rp/rp.c | 2 +- sys/dev/rp/rp_isa.c | 2 +- sys/dev/rp/rpreg.h | 2 +- sys/dev/rp/rpvar.h | 2 +- sys/dev/sab/sab.c | 2 +- sys/dev/sab/sab82532reg.h | 2 +- sys/dev/sbni/if_sbni.c | 2 +- sys/dev/sbni/if_sbni_isa.c | 2 +- sys/dev/sbni/if_sbnireg.h | 2 +- sys/dev/sbni/if_sbnivar.h | 2 +- sys/dev/sbsh/if_sbshreg.h | 2 +- sys/dev/si/si.c | 2 +- sys/dev/si/si.h | 2 +- sys/dev/si/si2_z280.c | 2 +- sys/dev/si/si3_t225.c | 2 +- sys/dev/si/si_eisa.c | 2 +- sys/dev/si/si_isa.c | 2 +- sys/dev/si/sireg.h | 2 +- sys/dev/si/sivar.h | 2 +- sys/dev/sio/sio_isa.c | 2 +- sys/dev/sio/sio_pccard.c | 2 +- sys/dev/smbus/smbus_if.m | 2 +- sys/dev/sn/if_sn.c | 2 +- sys/dev/sn/if_sn_isa.c | 2 +- sys/dev/sn/if_snreg.h | 2 +- sys/dev/sn/if_snvar.h | 2 +- sys/dev/snc/dp83932.c | 4 +-- sys/dev/snc/dp83932reg.h | 2 +- sys/dev/snc/dp83932subr.c | 2 +- sys/dev/snc/dp83932subr.h | 4 +-- sys/dev/snc/dp83932var.h | 5 ++- sys/dev/snc/if_snc.c | 2 +- sys/dev/snc/if_snc_cbus.c | 2 +- sys/dev/snc/if_snc_pccard.c | 2 +- sys/dev/snc/if_sncreg.h | 2 +- sys/dev/snc/if_sncvar.h | 2 +- sys/dev/snp/snp.c | 2 +- sys/dev/sound/driver.c | 2 +- sys/dev/sound/isa/ad1816.c | 2 +- sys/dev/sound/isa/ad1816.h | 2 +- sys/dev/sound/isa/es1888.c | 2 +- sys/dev/sound/isa/ess.c | 2 +- sys/dev/sound/isa/gusc.c | 2 +- sys/dev/sound/isa/mss.c | 2 +- sys/dev/sound/isa/mss.h | 58 +++++++++++++++--------------- sys/dev/sound/isa/sb16.c | 2 +- sys/dev/sound/isa/sb8.c | 2 +- sys/dev/sound/isa/sbc.c | 2 +- sys/dev/sound/isa/sndbuf_dma.c | 2 +- sys/dev/sound/pci/als4000.c | 2 +- sys/dev/sound/pci/als4000.h | 2 +- sys/dev/sound/pci/aureal.c | 2 +- sys/dev/sound/pci/aureal.h | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/cmireg.h | 2 +- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/cs4281.h | 2 +- sys/dev/sound/pci/csa.c | 2 +- sys/dev/sound/pci/csapcm.c | 2 +- sys/dev/sound/pci/ds1-fw.h | 3 +- sys/dev/sound/pci/ds1.c | 2 +- sys/dev/sound/pci/emu10k1.c | 2 +- sys/dev/sound/pci/es137x.c | 2 +- sys/dev/sound/pci/es137x.h | 2 +- sys/dev/sound/pci/fm801.c | 2 +- sys/dev/sound/pci/ich.c | 2 +- sys/dev/sound/pci/ich.h | 2 +- sys/dev/sound/pci/neomagic-coeff.h | 2 +- sys/dev/sound/pci/neomagic.c | 2 +- sys/dev/sound/pci/neomagic.h | 2 +- sys/dev/sound/pci/solo.c | 2 +- sys/dev/sound/pci/t4dwave.c | 2 +- sys/dev/sound/pci/t4dwave.h | 2 +- sys/dev/sound/pci/via8233.c | 2 +- sys/dev/sound/pci/via8233.h | 2 +- sys/dev/sound/pci/via82c686.c | 2 +- sys/dev/sound/pci/vibes.c | 2 +- sys/dev/sound/pci/vibes.h | 2 +- sys/dev/sound/pcm/ac97.c | 2 +- sys/dev/sound/pcm/ac97.h | 2 +- sys/dev/sound/pcm/ac97_if.m | 1 + sys/dev/sound/pcm/ac97_patch.c | 2 +- sys/dev/sound/pcm/ac97_patch.h | 2 +- sys/dev/sound/pcm/buffer.c | 2 +- sys/dev/sound/pcm/buffer.h | 2 +- sys/dev/sound/pcm/channel.c | 2 +- sys/dev/sound/pcm/channel.h | 2 +- sys/dev/sound/pcm/channel_if.m | 1 + sys/dev/sound/pcm/dsp.c | 2 +- sys/dev/sound/pcm/dsp.h | 2 +- sys/dev/sound/pcm/fake.c | 2 +- sys/dev/sound/pcm/feeder.c | 2 +- sys/dev/sound/pcm/feeder.h | 2 +- sys/dev/sound/pcm/feeder_fmt.c | 2 +- sys/dev/sound/pcm/feeder_if.m | 1 + sys/dev/sound/pcm/feeder_rate.c | 2 +- sys/dev/sound/pcm/mixer.c | 2 +- sys/dev/sound/pcm/mixer.h | 2 +- sys/dev/sound/pcm/mixer_if.m | 1 + sys/dev/sound/pcm/sndstat.c | 2 +- sys/dev/sound/pcm/sound.c | 2 +- sys/dev/sound/pcm/sound.h | 2 +- sys/dev/sound/pcm/vchan.c | 2 +- sys/dev/sound/pcm/vchan.h | 2 +- sys/dev/sound/sbus/apcdmareg.h | 2 +- sys/dev/sound/sbus/cs4231.c | 2 +- sys/dev/sound/sbus/cs4231.h | 2 +- sys/dev/sound/usb/uaudio.c | 2 +- sys/dev/sound/usb/uaudio.h | 2 +- sys/dev/sound/usb/uaudio_pcm.c | 2 +- sys/dev/sound/usb/uaudioreg.h | 2 +- sys/dev/sr/if_sr.c | 2 +- sys/dev/sr/if_sr.h | 2 +- sys/dev/sr/if_sr_isa.c | 2 +- sys/dev/sr/if_sr_pci.c | 2 +- sys/dev/sr/if_srregs.h | 2 +- sys/dev/stg/tmc18c30.c | 2 +- sys/dev/stg/tmc18c30_isa.c | 2 +- sys/dev/stg/tmc18c30_pccard.c | 2 +- sys/dev/stg/tmc18c30_subr.c | 2 +- sys/dev/stg/tmc18c30reg.h | 2 +- sys/dev/stg/tmc18c30var.h | 2 +- sys/dev/streams/streams.c | 2 +- sys/dev/sx/cd1865.h | 2 +- sys/dev/sx/sx.c | 2 +- sys/dev/sx/sx.h | 2 +- sys/dev/sx/sx_pci.c | 2 +- sys/dev/sx/sx_util.c | 2 +- sys/dev/sx/sx_util.h | 2 +- sys/dev/sx/sxvar.h | 2 +- sys/dev/sym/README.sym | 2 +- sys/dev/sym/sym_conf.h | 2 +- sys/dev/sym/sym_defs.h | 2 +- sys/dev/sym/sym_fw.h | 2 +- sys/dev/sym/sym_fw1.h | 2 +- sys/dev/sym/sym_fw2.h | 2 +- sys/dev/tdfx/tdfx_io.h | 2 +- sys/dev/tdfx/tdfx_linux.h | 2 +- sys/dev/tdfx/tdfx_pci.h | 2 +- sys/dev/tdfx/tdfx_vars.h | 2 +- sys/dev/tga/tga_pci.c | 2 +- sys/dev/tga/tga_pci.h | 2 +- sys/dev/trm/trm.c | 5 ++- sys/dev/trm/trm.h | 4 ++- sys/dev/txp/3c990img.h | 2 +- sys/dev/txp/if_txp.c | 2 +- sys/dev/txp/if_txpreg.h | 2 +- sys/dev/uart/uart.h | 2 +- sys/dev/uart/uart_bus.h | 2 +- sys/dev/uart/uart_bus_acpi.c | 2 +- sys/dev/uart/uart_bus_isa.c | 2 +- sys/dev/uart/uart_bus_pccard.c | 2 +- sys/dev/uart/uart_bus_pci.c | 2 +- sys/dev/uart/uart_core.c | 2 +- sys/dev/uart/uart_cpu.h | 2 +- sys/dev/uart/uart_cpu_alpha.c | 2 +- sys/dev/uart/uart_cpu_amd64.c | 2 +- sys/dev/uart/uart_cpu_i386.c | 2 +- sys/dev/uart/uart_cpu_ia64.c | 2 +- sys/dev/uart/uart_cpu_pc98.c | 2 +- sys/dev/uart/uart_cpu_sparc64.c | 2 +- sys/dev/uart/uart_dbg.c | 2 +- sys/dev/uart/uart_dev_ns8250.c | 2 +- sys/dev/uart/uart_dev_sab82532.c | 2 +- sys/dev/uart/uart_dev_z8530.c | 2 +- sys/dev/uart/uart_if.m | 1 + sys/dev/uart/uart_kbd_sun.h | 2 +- sys/dev/uart/uart_subr.c | 2 +- sys/dev/uart/uart_tty.c | 2 +- sys/dev/ubsec/ubsec.c | 2 +- sys/dev/ubsec/ubsecreg.h | 2 +- sys/dev/ubsec/ubsecvar.h | 2 +- sys/dev/usb/ehci.c | 2 +- sys/dev/usb/ehcireg.h | 2 +- sys/dev/usb/ehcivar.h | 2 +- sys/dev/usb/hid.c | 2 +- sys/dev/usb/hid.h | 2 +- sys/dev/usb/if_auereg.h | 2 +- sys/dev/usb/if_axe.c | 2 +- sys/dev/usb/if_axereg.h | 2 +- sys/dev/usb/if_cue.c | 2 +- sys/dev/usb/if_cuereg.h | 2 +- sys/dev/usb/if_kue.c | 2 +- sys/dev/usb/if_kuereg.h | 2 +- sys/dev/usb/if_udav.c | 2 +- sys/dev/usb/if_udavreg.h | 2 +- sys/dev/usb/kue_fw.h | 2 +- sys/dev/usb/ohci.c | 2 +- sys/dev/usb/ohcireg.h | 2 +- sys/dev/usb/ohcivar.h | 2 +- sys/dev/usb/rio500_usb.h | 3 +- sys/dev/usb/ubsa.c | 2 +- sys/dev/usb/ubser.c | 4 +-- sys/dev/usb/ubser.h | 2 +- sys/dev/usb/ucom.c | 2 +- sys/dev/usb/ucomvar.h | 2 +- sys/dev/usb/udbp.c | 2 +- sys/dev/usb/udbp.h | 2 +- sys/dev/usb/ufm.c | 2 +- sys/dev/usb/uftdi.c | 2 +- sys/dev/usb/ugen.c | 2 +- sys/dev/usb/ugraphire_rdesc.h | 2 +- sys/dev/usb/uhci.c | 2 +- sys/dev/usb/uhcireg.h | 2 +- sys/dev/usb/uhcivar.h | 2 +- sys/dev/usb/uhid.c | 2 +- sys/dev/usb/uhub.c | 2 +- sys/dev/usb/ukbd.c | 3 +- sys/dev/usb/ulpt.c | 2 +- sys/dev/usb/umodem.c | 2 +- sys/dev/usb/ums.c | 3 +- sys/dev/usb/uplcom.c | 2 +- sys/dev/usb/urio.c | 2 +- sys/dev/usb/usb.c | 2 +- sys/dev/usb/usb.h | 2 +- sys/dev/usb/usb_ethersubr.c | 2 +- sys/dev/usb/usb_ethersubr.h | 2 +- sys/dev/usb/usb_if.m | 2 +- sys/dev/usb/usb_mem.c | 2 +- sys/dev/usb/usb_mem.h | 2 +- sys/dev/usb/usb_port.h | 2 +- sys/dev/usb/usb_quirks.c | 2 +- sys/dev/usb/usb_quirks.h | 2 +- sys/dev/usb/usb_subr.c | 2 +- sys/dev/usb/usbcdc.h | 2 +- sys/dev/usb/usbdevs | 2 +- sys/dev/usb/usbdi.c | 2 +- sys/dev/usb/usbdi.h | 2 +- sys/dev/usb/usbdi_util.c | 2 +- sys/dev/usb/usbdi_util.h | 2 +- sys/dev/usb/usbdivar.h | 2 +- sys/dev/usb/usbhid.h | 2 +- sys/dev/usb/uscanner.c | 2 +- sys/dev/usb/uvisor.c | 2 +- sys/dev/utopia/idtphy.h | 2 +- sys/dev/utopia/suni.h | 2 +- sys/dev/utopia/utopia.c | 2 +- sys/dev/utopia/utopia.h | 2 +- sys/dev/vge/if_vge.c | 2 +- sys/dev/vge/if_vgereg.h | 2 +- sys/dev/vge/if_vgevar.h | 2 +- sys/dev/vkbd/vkbd.c | 2 +- sys/dev/vkbd/vkbd_var.h | 2 +- sys/dev/vx/if_vx.c | 2 +- sys/dev/vx/if_vx_eisa.c | 2 +- sys/dev/vx/if_vx_pci.c | 2 +- sys/dev/vx/if_vxreg.h | 2 +- sys/dev/vx/if_vxvar.h | 2 +- sys/dev/wds/wd7000.c | 2 +- sys/dev/wi/if_wavelan_ieee.h | 2 +- sys/dev/wi/if_wi.c | 2 +- sys/dev/wi/if_wi_pccard.c | 2 +- sys/dev/wi/if_wi_pci.c | 2 +- sys/dev/wi/if_wireg.h | 2 +- sys/dev/wi/if_wivar.h | 2 +- sys/dev/wi/spectrum24t_cf.h | 2 +- sys/dev/wl/if_wl.c | 2 +- sys/dev/wl/if_wl.h | 2 +- sys/dev/xe/if_xe.c | 2 +- sys/dev/xe/if_xe_pccard.c | 2 +- sys/dev/zs/z8530reg.h | 2 +- 774 files changed, 886 insertions(+), 868 deletions(-) (limited to 'sys/dev/dcons') diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c index 946855425f70..3755e58de742 100644 --- a/sys/dev/aac/aac_cam.c +++ b/sys/dev/aac/aac_cam.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Adaptec, Inc. * All rights reserved. * diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 17a9d6f14b0c..50cb84761bf7 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -25,7 +25,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/****************************************************************************** +/*- + ****************************************************************************** * * 1. Copyright Notice * diff --git a/sys/dev/acpica/acpi_if.m b/sys/dev/acpica/acpi_if.m index 48a060ab92a2..9c63b3e49fb1 100644 --- a/sys/dev/acpica/acpi_if.m +++ b/sys/dev/acpica/acpi_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 2004 Nate Lawson # All rights reserved. # diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index ad51129d7f4b..c935ae8ffd45 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, Stefan Esser * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi diff --git a/sys/dev/advansys/adv_eisa.c b/sys/dev/advansys/adv_eisa.c index d71893861d57..e56cf29653f0 100644 --- a/sys/dev/advansys/adv_eisa.c +++ b/sys/dev/advansys/adv_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Device probe and attach routines for the following * Advanced Systems Inc. SCSI controllers: * diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c index 96bdc7c77ea7..8a3a0790843b 100644 --- a/sys/dev/advansys/adv_isa.c +++ b/sys/dev/advansys/adv_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Device probe and attach routines for the following * Advanced Systems Inc. SCSI controllers: * diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c index 9ac61f394fa9..aa97f1ba0712 100644 --- a/sys/dev/advansys/adv_pci.c +++ b/sys/dev/advansys/adv_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Device probe and attach routines for the following * Advanced Systems Inc. SCSI controllers: * diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c index 1c2d645a3fb0..7b9cfb1e3fb8 100644 --- a/sys/dev/advansys/advansys.c +++ b/sys/dev/advansys/advansys.c @@ -1,4 +1,4 @@ -/* +/*- * Generic driver for the Advanced Systems Inc. SCSI controllers * Product specific probe and attach routines can be found in: * @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Ported from: * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters * diff --git a/sys/dev/advansys/advansys.h b/sys/dev/advansys/advansys.h index ab4e550a9afe..a8c560472860 100644 --- a/sys/dev/advansys/advansys.h +++ b/sys/dev/advansys/advansys.h @@ -1,4 +1,4 @@ -/* +/*- * Generic driver definitions and exported functions for the Advanced * Systems Inc. SCSI controllers * diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c index 7b9b149d1fc5..4604571da52f 100644 --- a/sys/dev/advansys/advlib.c +++ b/sys/dev/advansys/advlib.c @@ -1,4 +1,4 @@ -/* +/*- * Low level routines for the Advanced Systems Inc. SCSI controllers chips * * Copyright (c) 1996-1997, 1999-2000 Justin Gibbs. @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Ported from: * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters * diff --git a/sys/dev/advansys/advlib.h b/sys/dev/advansys/advlib.h index ba9703db1b6d..f7a3acb633b5 100644 --- a/sys/dev/advansys/advlib.h +++ b/sys/dev/advansys/advlib.h @@ -1,4 +1,4 @@ -/* +/*- * Definitions for low level routines and data structures * for the Advanced Systems Inc. SCSI controllers chips. * @@ -31,7 +31,7 @@ * * $FreeBSD$ */ -/* +/*- * Ported from: * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters * diff --git a/sys/dev/advansys/advmcode.c b/sys/dev/advansys/advmcode.c index 730f161f31f9..d5e7bba9634a 100644 --- a/sys/dev/advansys/advmcode.c +++ b/sys/dev/advansys/advmcode.c @@ -1,4 +1,4 @@ -/* +/*- * Downloadable microcode for Advanced Systems Inc. SCSI controllers * * diff --git a/sys/dev/advansys/advmcode.h b/sys/dev/advansys/advmcode.h index 128efc4c9715..60b4e03cdb1a 100644 --- a/sys/dev/advansys/advmcode.h +++ b/sys/dev/advansys/advmcode.h @@ -1,4 +1,4 @@ -/* +/*- * Exported interface to downloadable microcode for AdvanSys SCSI Adapters * * $FreeBSD$ diff --git a/sys/dev/advansys/adw_pci.c b/sys/dev/advansys/adw_pci.c index e6050b885d7c..1f88d772a79e 100644 --- a/sys/dev/advansys/adw_pci.c +++ b/sys/dev/advansys/adw_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Device probe and attach routines for the following * Advanced Systems Inc. SCSI controllers: * diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c index 400c0fca5271..c6c14fd99cc0 100644 --- a/sys/dev/advansys/adwcam.c +++ b/sys/dev/advansys/adwcam.c @@ -1,4 +1,4 @@ -/* +/*- * CAM SCSI interface for the the Advanced Systems Inc. * Second Generation SCSI controllers. * diff --git a/sys/dev/advansys/adwlib.c b/sys/dev/advansys/adwlib.c index d36ca351b977..9dbf21eb41a6 100644 --- a/sys/dev/advansys/adwlib.c +++ b/sys/dev/advansys/adwlib.c @@ -1,4 +1,4 @@ -/* +/*- * Low level routines for Second Generation * Advanced Systems Inc. SCSI controllers chips * @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Ported from: * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters * diff --git a/sys/dev/advansys/adwlib.h b/sys/dev/advansys/adwlib.h index 53834474e464..919622205a06 100644 --- a/sys/dev/advansys/adwlib.h +++ b/sys/dev/advansys/adwlib.h @@ -1,4 +1,4 @@ -/* +/*- * Definitions for low level routines and data structures * for the Advanced Systems Inc. SCSI controllers chips. * diff --git a/sys/dev/advansys/adwmcode.c b/sys/dev/advansys/adwmcode.c index 2b643291453f..a43720c423dd 100644 --- a/sys/dev/advansys/adwmcode.c +++ b/sys/dev/advansys/adwmcode.c @@ -1,4 +1,4 @@ -/* +/*- * Downloadable microcode for Second Generation * Advanced Systems Inc. SCSI controllers * diff --git a/sys/dev/advansys/adwmcode.h b/sys/dev/advansys/adwmcode.h index 221845489867..e3ab3f47a0ec 100644 --- a/sys/dev/advansys/adwmcode.h +++ b/sys/dev/advansys/adwmcode.h @@ -1,4 +1,4 @@ -/* +/*- * Exported interface to downloadable microcode for AdvanSys SCSI Adapters * * $FreeBSD$ diff --git a/sys/dev/advansys/adwvar.h b/sys/dev/advansys/adwvar.h index f4244f98a484..0510ab0185c3 100644 --- a/sys/dev/advansys/adwvar.h +++ b/sys/dev/advansys/adwvar.h @@ -1,4 +1,4 @@ -/* +/*- * Generic driver definitions and exported functions for the Advanced * Systems Inc. Second Generation SCSI controllers * diff --git a/sys/dev/aha/aha.c b/sys/dev/aha/aha.c index 919b1ecd6764..9a2232859c3a 100644 --- a/sys/dev/aha/aha.c +++ b/sys/dev/aha/aha.c @@ -1,4 +1,4 @@ -/* +/*- * Generic register and struct definitions for the Adaptech 154x/164x * SCSI host adapters. Product specific probe and attach routines can * be found in: diff --git a/sys/dev/aha/aha_isa.c b/sys/dev/aha/aha_isa.c index c43a428dda17..ba27bc5a20c0 100644 --- a/sys/dev/aha/aha_isa.c +++ b/sys/dev/aha/aha_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * Adaptec 154x. * diff --git a/sys/dev/aha/ahareg.h b/sys/dev/aha/ahareg.h index c64d8ea06a73..c5b61f813977 100644 --- a/sys/dev/aha/ahareg.h +++ b/sys/dev/aha/ahareg.h @@ -1,4 +1,4 @@ -/* +/*- * Generic register and struct definitions for the Adaptech 1540, 1542, * 1640, 1642 SCSI host adapters. Product specific probe and attach * routines can be found in: diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 34b16afd3791..4d7249c5aaa6 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -1,4 +1,4 @@ -/* +/*- * CAM SCSI device driver for the Adaptec 174X SCSI Host adapter * * Copyright (c) 1998 Justin T. Gibbs diff --git a/sys/dev/ahb/ahbreg.h b/sys/dev/ahb/ahbreg.h index c72f068aa3b9..d4544434eadb 100644 --- a/sys/dev/ahb/ahbreg.h +++ b/sys/dev/ahb/ahbreg.h @@ -1,4 +1,4 @@ -/* +/*- * Hardware structure definitions for the Adaptec 174X CAM SCSI device driver. * * Copyright (c) 1998 Justin T. Gibbs diff --git a/sys/dev/aic/aic6360reg.h b/sys/dev/aic/aic6360reg.h index d08a66514228..53962aed9d35 100644 --- a/sys/dev/aic/aic6360reg.h +++ b/sys/dev/aic/aic6360reg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Charles Hannum. * Copyright (c) 1994 Jarle Greipsland. * All rights reserved. diff --git a/sys/dev/aic7xxx/ahc_eisa.c b/sys/dev/aic7xxx/ahc_eisa.c index b3fa8e3782a4..f98059f69016 100644 --- a/sys/dev/aic7xxx/ahc_eisa.c +++ b/sys/dev/aic7xxx/ahc_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD, EISA product support functions * * diff --git a/sys/dev/aic7xxx/ahc_isa.c b/sys/dev/aic7xxx/ahc_isa.c index 1515a68d60b9..d01ffc96d3f8 100644 --- a/sys/dev/aic7xxx/ahc_isa.c +++ b/sys/dev/aic7xxx/ahc_isa.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD, VLB/ISA product support functions * * Copyright (c) 2004 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index ba6ab22aa8ee..a9d4478420af 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD, PCI product support functions * * Copyright (c) 1995-2001 Justin T. Gibbs diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 18ac5f3225e9..01439442b7cf 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD, PCI product support functions * * Copyright (c) 1995-2001 Justin T. Gibbs diff --git a/sys/dev/aic7xxx/aic7770.c b/sys/dev/aic7xxx/aic7770.c index d6b35a04f731..1ce48f9b8df9 100644 --- a/sys/dev/aic7xxx/aic7770.c +++ b/sys/dev/aic7xxx/aic7770.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * 27/284X and aic7770 motherboard SCSI controllers * diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index 16b30463566b..9e73b6406bf4 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -1,4 +1,4 @@ -/* +/*- * Core routines and tables shareable across OS platforms. * * Copyright (c) 1994-2002, 2004 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index cecb691c0c1d..c8de9b776dfe 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -1,4 +1,4 @@ -/* +/*- * Core definitions and data structures shareable across OS platforms. * * Copyright (c) 1994-2002 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx.reg b/sys/dev/aic7xxx/aic79xx.reg index e3cc7c5deff2..e856b6236eae 100644 --- a/sys/dev/aic7xxx/aic79xx.reg +++ b/sys/dev/aic7xxx/aic79xx.reg @@ -1,4 +1,4 @@ -/* +/*- * Aic79xx register and scratch ram definitions. * * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx.seq b/sys/dev/aic7xxx/aic79xx.seq index 56ac75505a09..d8d4f921380c 100644 --- a/sys/dev/aic7xxx/aic79xx.seq +++ b/sys/dev/aic7xxx/aic79xx.seq @@ -1,4 +1,4 @@ -/* +/*- * Adaptec U320 device driver firmware for Linux and FreeBSD. * * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx_inline.h b/sys/dev/aic7xxx/aic79xx_inline.h index 0498ab312940..064a5e8ddd7f 100644 --- a/sys/dev/aic7xxx/aic79xx_inline.h +++ b/sys/dev/aic7xxx/aic79xx_inline.h @@ -1,4 +1,4 @@ -/* +/*- * Inline routines shareable across OS platforms. * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c index 458f634727d3..2319da871a7f 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.c +++ b/sys/dev/aic7xxx/aic79xx_osm.c @@ -1,4 +1,4 @@ -/* +/*- * Bus independent FreeBSD shim for the aic79xx based Adaptec SCSI controllers * * Copyright (c) 1994-2002, 2004 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h index 924ef1bb4689..c6f36f1d8700 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.h +++ b/sys/dev/aic7xxx/aic79xx_osm.h @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD platform specific driver option settings, data structures, * function declarations and includes. * diff --git a/sys/dev/aic7xxx/aic79xx_pci.c b/sys/dev/aic7xxx/aic79xx_pci.c index 6f917b90da24..7c8adde6a9f7 100644 --- a/sys/dev/aic7xxx/aic79xx_pci.c +++ b/sys/dev/aic7xxx/aic79xx_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * aic7901 and aic7902 SCSI controllers * diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index c60a770ccab0..c48b850e98e3 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -1,4 +1,4 @@ -/* +/*- * Core routines and tables shareable across OS platforms. * * Copyright (c) 1994-2002 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index d1f7cbabca47..0ac10be92752 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -1,4 +1,4 @@ -/* +/*- * Core definitions and data structures shareable across OS platforms. * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx.reg b/sys/dev/aic7xxx/aic7xxx.reg index e196d83b93c7..076c2ba49f92 100644 --- a/sys/dev/aic7xxx/aic7xxx.reg +++ b/sys/dev/aic7xxx/aic7xxx.reg @@ -1,4 +1,4 @@ -/* +/*- * Aic7xxx register and scratch ram definitions. * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 810d766beeaf..0eefaaa41b79 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -1,4 +1,4 @@ -/* +/*- * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx_93cx6.c b/sys/dev/aic7xxx/aic7xxx_93cx6.c index 6d08d2563848..b9738bb5302c 100644 --- a/sys/dev/aic7xxx/aic7xxx_93cx6.c +++ b/sys/dev/aic7xxx/aic7xxx_93cx6.c @@ -1,4 +1,4 @@ -/* +-e/* * Interface for the 93C66/56/46/26/06 serial eeprom parts. * * Copyright (c) 1995, 1996 Daniel M. Eischen diff --git a/sys/dev/aic7xxx/aic7xxx_93cx6.h b/sys/dev/aic7xxx/aic7xxx_93cx6.h index 859c43ccdd46..3827015edcbb 100644 --- a/sys/dev/aic7xxx/aic7xxx_93cx6.h +++ b/sys/dev/aic7xxx/aic7xxx_93cx6.h @@ -1,4 +1,4 @@ -/* +/*- * Interface to the 93C46/56 serial EEPROM that is used to store BIOS * settings for the aic7xxx based adaptec SCSI controllers. It can * also be used for 93C26 and 93C06 serial EEPROMS. diff --git a/sys/dev/aic7xxx/aic7xxx_inline.h b/sys/dev/aic7xxx/aic7xxx_inline.h index e25e1049df2a..989ac79dfc24 100644 --- a/sys/dev/aic7xxx/aic7xxx_inline.h +++ b/sys/dev/aic7xxx/aic7xxx_inline.h @@ -1,4 +1,4 @@ -/* +/*- * Inline routines shareable across OS platforms. * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c index ba1eca22cd97..a1b65bb860f3 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.c +++ b/sys/dev/aic7xxx/aic7xxx_osm.c @@ -1,4 +1,4 @@ -/* +/*- * Bus independent FreeBSD shim for the aic7xxx based Adaptec SCSI controllers * * Copyright (c) 1994-2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic7xxx_osm.h b/sys/dev/aic7xxx/aic7xxx_osm.h index 55d9697b6588..07752a3b5bc4 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.h +++ b/sys/dev/aic7xxx/aic7xxx_osm.h @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD platform specific driver option settings, data structures, * function declarations and includes. * diff --git a/sys/dev/aic7xxx/aic7xxx_pci.c b/sys/dev/aic7xxx/aic7xxx_pci.c index fcb90b92174f..d37607daadd5 100644 --- a/sys/dev/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/aic7xxx/aic7xxx_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * 3940, 2940, aic7895, aic7890, aic7880, * aic7870, aic7860 and aic7850 SCSI controllers diff --git a/sys/dev/aic7xxx/aic_osm_lib.c b/sys/dev/aic7xxx/aic_osm_lib.c index 525fdcc2c00d..8919789c6db0 100644 --- a/sys/dev/aic7xxx/aic_osm_lib.c +++ b/sys/dev/aic7xxx/aic_osm_lib.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD OSM Library for the aic7xxx aic79xx based Adaptec SCSI controllers * * Copyright (c) 1994-2002 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aic_osm_lib.h b/sys/dev/aic7xxx/aic_osm_lib.h index 86a2db45d0a8..1c8678b58bf7 100644 --- a/sys/dev/aic7xxx/aic_osm_lib.h +++ b/sys/dev/aic7xxx/aic_osm_lib.h @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD platform specific, shared driver option settings, data structures, * function declarations and includes. * diff --git a/sys/dev/aic7xxx/aicasm/aicasm.c b/sys/dev/aic7xxx/aicasm/aicasm.c index 0c780f9065be..ad010649c8b5 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm.c +++ b/sys/dev/aic7xxx/aicasm/aicasm.c @@ -1,4 +1,4 @@ -/* +/*- * Aic7xxx SCSI host adapter firmware asssembler * * Copyright (c) 1997, 1998, 2000, 2001 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aicasm/aicasm.h b/sys/dev/aic7xxx/aicasm/aicasm.h index 51678dd46ff7..440cb495f955 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm.h +++ b/sys/dev/aic7xxx/aicasm/aicasm.h @@ -1,4 +1,4 @@ -/* +/*- * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters * * Copyright (c) 1997 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y index 67e046d96625..f96116d0f9cb 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y @@ -1,5 +1,5 @@ %{ -/* +/*- * Parser for the Aic7xxx SCSI Host adapter sequencer assembler. * * Copyright (c) 1997, 1998, 2000 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aicasm/aicasm_insformat.h b/sys/dev/aic7xxx/aicasm/aicasm_insformat.h index 3e80f07df49c..820310b469cd 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_insformat.h +++ b/sys/dev/aic7xxx/aicasm/aicasm_insformat.h @@ -1,4 +1,4 @@ -/* +/*- * Instruction formats for the sequencer program downloaded to * Aic7xxx SCSI host adapters * diff --git a/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y index 439f760b34b5..48551c6b0f84 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y @@ -1,5 +1,5 @@ %{ -/* +/*- * Sub-parser for macro invocation in the Aic7xxx SCSI * Host adapter sequencer assembler. * diff --git a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l index f06e7035cb35..49557a8837f8 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l +++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l @@ -1,5 +1,5 @@ %{ -/* +/*- * Sub-Lexical Analyzer for macro invokation in * the Aic7xxx SCSI Host adapter sequencer assembler. * diff --git a/sys/dev/aic7xxx/aicasm/aicasm_scan.l b/sys/dev/aic7xxx/aicasm/aicasm_scan.l index 45c0b233d0bc..ced09dc2b12b 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_scan.l +++ b/sys/dev/aic7xxx/aicasm/aicasm_scan.l @@ -1,5 +1,5 @@ %{ -/* +/*- * Lexical Analyzer for the Aic7xxx SCSI Host adapter sequencer assembler. * * Copyright (c) 1997, 1998, 2000 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c index f1f448dff569..9770a71b8d09 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c @@ -1,4 +1,4 @@ -/* +/*- * Aic7xxx SCSI host adapter firmware asssembler symbol table implementation * * Copyright (c) 1997 Justin T. Gibbs. diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.h b/sys/dev/aic7xxx/aicasm/aicasm_symbol.h index afc22e8b4903..1496c3768c81 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.h +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.h @@ -1,4 +1,4 @@ -/* +/*- * Aic7xxx SCSI host adapter firmware asssembler symbol table definitions * * Copyright (c) 1997 Justin T. Gibbs. diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c index b885bf44464e..0c9f28979f36 100644 --- a/sys/dev/amd/amd.c +++ b/sys/dev/amd/amd.c @@ -1,4 +1,4 @@ -/* +/*- ********************************************************************* * FILE NAME : amd.c * BY : C.L. Huang (ching@tekram.com.tw) diff --git a/sys/dev/amd/amd.h b/sys/dev/amd/amd.h index 6171bcfe322a..d9b8cd209b34 100644 --- a/sys/dev/amd/amd.h +++ b/sys/dev/amd/amd.h @@ -1,4 +1,4 @@ -/* +/*- ********************************************************************* * FILE NAME : amd.h * BY : C.L. Huang (ching@tekram.com.tw) diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 8762a019159a..62ce551d3b6e 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 2002 Eric Moore * Copyright (c) 2002 LSI Logic Corporation * All rights reserved. diff --git a/sys/dev/amr/amr_cam.c b/sys/dev/amr/amr_cam.c index bd4cdb99c4fd..17cd8356f7f1 100644 --- a/sys/dev/amr/amr_cam.c +++ b/sys/dev/amr/amr_cam.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 2002 Eric Moore * Copyright (c) 2002 LSI Logic Corporation * All rights reserved. diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c index 8c520adc5a47..da7e94eb8a43 100644 --- a/sys/dev/amr/amr_disk.c +++ b/sys/dev/amr/amr_disk.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 2002 Eric Moore * Copyright (c) 2002 LSI Logic Corporation * All rights reserved. diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index f4cf4ac4356e..8f3ef11b1b2e 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 2002 Eric Moore * Copyright (c) 2002 LSI Logic Corporation * All rights reserved. diff --git a/sys/dev/an/if_aironet_ieee.h b/sys/dev/an/if_aironet_ieee.h index a838424f5a81..28e4f72148e9 100644 --- a/sys/dev/an/if_aironet_ieee.h +++ b/sys/dev/an/if_aironet_ieee.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index c3487386e14f..29b0adb571c8 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/an/if_an_isa.c b/sys/dev/an/if_an_isa.c index 92b9d1c379eb..7144cc8778ad 100644 --- a/sys/dev/an/if_an_isa.c +++ b/sys/dev/an/if_an_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c index 7b22eace94ad..ad37b67de5a2 100644 --- a/sys/dev/an/if_an_pccard.c +++ b/sys/dev/an/if_an_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/an/if_anreg.h b/sys/dev/an/if_anreg.h index 47db1be4e98f..12a03f004ade 100644 --- a/sys/dev/an/if_anreg.h +++ b/sys/dev/an/if_anreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c index 7777e89348b7..70abc1d04b0c 100644 --- a/sys/dev/ar/if_ar.c +++ b/sys/dev/ar/if_ar.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 - 2001 John Hay. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ar/if_ar.h b/sys/dev/ar/if_ar.h index 875e42a6745c..a6fc8cf088ec 100644 --- a/sys/dev/ar/if_ar.h +++ b/sys/dev/ar/if_ar.h @@ -1,4 +1,4 @@ -/* +/*- * if_ar.h * * Copyright (C) 1997-1999 Whistle Communications Inc. diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c index fe07afb8d5b7..81c001f35e8a 100644 --- a/sys/dev/ar/if_ar_isa.c +++ b/sys/dev/ar/if_ar_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 - 2001 John Hay. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ar/if_arregs.h b/sys/dev/ar/if_arregs.h index f73543522760..d643cafee44c 100644 --- a/sys/dev/ar/if_arregs.h +++ b/sys/dev/ar/if_arregs.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 - 2001 John Hay. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/asr/dptalign.h b/sys/dev/asr/dptalign.h index bb72c5b67fb4..038dc6f4b5bb 100644 --- a/sys/dev/asr/dptalign.h +++ b/sys/dev/asr/dptalign.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. * diff --git a/sys/dev/asr/dptsig.h b/sys/dev/asr/dptsig.h index 94c0810ae3a1..a70ad114bdc3 100644 --- a/sys/dev/asr/dptsig.h +++ b/sys/dev/asr/dptsig.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000-2001 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2oadptr.h b/sys/dev/asr/i2oadptr.h index d880e4793a30..c189d8d658d9 100644 --- a/sys/dev/asr/i2oadptr.h +++ b/sys/dev/asr/i2oadptr.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corproation. * All rights reserved. diff --git a/sys/dev/asr/i2obscsi.h b/sys/dev/asr/i2obscsi.h index 06ee30ce662c..a6666feb661b 100644 --- a/sys/dev/asr/i2obscsi.h +++ b/sys/dev/asr/i2obscsi.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2odep.h b/sys/dev/asr/i2odep.h index 6b2fe5c5ee60..c1e6e5067ce2 100644 --- a/sys/dev/asr/i2odep.h +++ b/sys/dev/asr/i2odep.h @@ -1,4 +1,5 @@ -/**************************************************************************** +/*- + **************************************************************************** * * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. diff --git a/sys/dev/asr/i2odpt.h b/sys/dev/asr/i2odpt.h index 9435b7cf19a5..4c9a9d462318 100644 --- a/sys/dev/asr/i2odpt.h +++ b/sys/dev/asr/i2odpt.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + ***************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2oexec.h b/sys/dev/asr/i2oexec.h index e80030576568..ae4327a6cb80 100644 --- a/sys/dev/asr/i2oexec.h +++ b/sys/dev/asr/i2oexec.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2omsg.h b/sys/dev/asr/i2omsg.h index 23f2791aa3a3..833bd9173d38 100644 --- a/sys/dev/asr/i2omsg.h +++ b/sys/dev/asr/i2omsg.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2otypes.h b/sys/dev/asr/i2otypes.h index eaa97c71342f..c85d92dd2c32 100644 --- a/sys/dev/asr/i2otypes.h +++ b/sys/dev/asr/i2otypes.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/i2outil.h b/sys/dev/asr/i2outil.h index 3262dcda5244..c7e3061dbb28 100644 --- a/sys/dev/asr/i2outil.h +++ b/sys/dev/asr/i2outil.h @@ -1,4 +1,5 @@ -/**************************************************************** +/*- + **************************************************************** * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000 Adaptec Corporation. * All rights reserved. diff --git a/sys/dev/asr/osd_defs.h b/sys/dev/asr/osd_defs.h index 871d8f92c1ca..c954be9816b1 100644 --- a/sys/dev/asr/osd_defs.h +++ b/sys/dev/asr/osd_defs.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. * diff --git a/sys/dev/asr/osd_unix.h b/sys/dev/asr/osd_unix.h index e1309e4f0ddc..04f7a29b6969 100644 --- a/sys/dev/asr/osd_unix.h +++ b/sys/dev/asr/osd_unix.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. * diff --git a/sys/dev/asr/osd_util.h b/sys/dev/asr/osd_util.h index a243c04d1edb..baa233804a3f 100644 --- a/sys/dev/asr/osd_util.h +++ b/sys/dev/asr/osd_util.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. * diff --git a/sys/dev/asr/sys_info.h b/sys/dev/asr/sys_info.h index 80da928e7cbb..b4c78fe819fd 100644 --- a/sys/dev/asr/sys_info.h +++ b/sys/dev/asr/sys_info.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-1999 Distributed Processing Technology Corporation * All rights reserved. * diff --git a/sys/dev/auxio/auxio.c b/sys/dev/auxio/auxio.c index 74d68808b743..ebd0e254b18e 100644 --- a/sys/dev/auxio/auxio.c +++ b/sys/dev/auxio/auxio.c @@ -27,7 +27,7 @@ /* $NetBSD: auxio.c,v 1.11 2003/07/15 03:36:04 lukem Exp $ */ -/* +/*- * Copyright (c) 2000, 2001 Matthew R. Green * All rights reserved. * diff --git a/sys/dev/auxio/auxioreg.h b/sys/dev/auxio/auxioreg.h index 439bf3487434..0c9ce8e9fa93 100644 --- a/sys/dev/auxio/auxioreg.h +++ b/sys/dev/auxio/auxioreg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $NetBSD: auxioreg.h,v 1.4 2001/10/22 07:31:41 mrg Exp $ */ -/* +/*- * Copyright (c) 2000 Matthew R. Green * All rights reserved. * diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index 683790a5cb80..1f00ff7a51a1 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Atsushi Onoe * All rights reserved. * diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index 4d9a4627f8d2..c6e93a26b517 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -1,9 +1,7 @@ -/* +/*- * Copyright (c) 2003 Stuart Walsh * and Duncan Barclay - */ - -/* + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/dev/bfe/if_bfereg.h b/sys/dev/bfe/if_bfereg.h index 383154f22db7..c76779a91a93 100644 --- a/sys/dev/bfe/if_bfereg.h +++ b/sys/dev/bfe/if_bfereg.h @@ -1,5 +1,6 @@ -/* Copyright (c) 2003 Stuart Walsh */ -/* +/*- + * Copyright (c) 2003 Stuart Walsh + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 4563f32b15dc..9c5e4b5f10ec 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h index 026ec81280ac..c95265597ed5 100644 --- a/sys/dev/bge/if_bgereg.h +++ b/sys/dev/bge/if_bgereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/bktr/bktr_audio.h b/sys/dev/bktr/bktr_audio.h index 9b7500703b24..c05e40c31ea3 100644 --- a/sys/dev/bktr/bktr_audio.h +++ b/sys/dev/bktr/bktr_audio.h @@ -13,7 +13,7 @@ * */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_card.h b/sys/dev/bktr/bktr_card.h index 720a798f4982..77ccaf44ab0a 100644 --- a/sys/dev/bktr/bktr_card.h +++ b/sys/dev/bktr/bktr_card.h @@ -14,7 +14,7 @@ * */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_core.h b/sys/dev/bktr/bktr_core.h index 315566f31a40..980ced76621a 100644 --- a/sys/dev/bktr/bktr_core.h +++ b/sys/dev/bktr/bktr_core.h @@ -15,7 +15,7 @@ * */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_mem.c b/sys/dev/bktr/bktr_mem.c index 3adacce803a9..5683410db415 100644 --- a/sys/dev/bktr/bktr_mem.c +++ b/sys/dev/bktr/bktr_mem.c @@ -11,7 +11,7 @@ * time the bktr driver is loaded. */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 2000 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_mem.h b/sys/dev/bktr/bktr_mem.h index 4c6d7a508ac7..8feb55206c11 100644 --- a/sys/dev/bktr/bktr_mem.h +++ b/sys/dev/bktr/bktr_mem.h @@ -13,7 +13,7 @@ * time the bktr driver is loaded. */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 2000 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_os.h b/sys/dev/bktr/bktr_os.h index d2826022a94d..1cd708df3c6a 100644 --- a/sys/dev/bktr/bktr_os.h +++ b/sys/dev/bktr/bktr_os.h @@ -10,7 +10,7 @@ * */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/bktr_reg.h b/sys/dev/bktr/bktr_reg.h index c8fc4d4bc7ea..e03b99a96e3d 100644 --- a/sys/dev/bktr/bktr_reg.h +++ b/sys/dev/bktr/bktr_reg.h @@ -1,4 +1,4 @@ -/* +/*- * $FreeBSD$ * * Copyright (c) 1999 Roger Hardiman diff --git a/sys/dev/bktr/bktr_tuner.h b/sys/dev/bktr/bktr_tuner.h index 338d1168f543..a1aa64a28d4a 100644 --- a/sys/dev/bktr/bktr_tuner.h +++ b/sys/dev/bktr/bktr_tuner.h @@ -10,7 +10,7 @@ * */ -/* +/*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. diff --git a/sys/dev/bktr/ioctl_meteor.h b/sys/dev/bktr/ioctl_meteor.h index 5f70a4b87ecd..681990aa03c0 100644 --- a/sys/dev/bktr/ioctl_meteor.h +++ b/sys/dev/bktr/ioctl_meteor.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 Mark Tinguely and Jim Lowe * All rights reserved. * diff --git a/sys/dev/buslogic/bt.c b/sys/dev/buslogic/bt.c index 4920cdb351dc..74ad13b81875 100644 --- a/sys/dev/buslogic/bt.c +++ b/sys/dev/buslogic/bt.c @@ -1,4 +1,4 @@ -/* +/*- * Generic driver for the BusLogic MultiMaster SCSI host adapters * Product specific probe and attach routines can be found in: * sys/dev/buslogic/bt_isa.c BT-54X, BT-445 cards diff --git a/sys/dev/buslogic/bt_eisa.c b/sys/dev/buslogic/bt_eisa.c index 3157503513a3..b1c40107aa78 100644 --- a/sys/dev/buslogic/bt_eisa.c +++ b/sys/dev/buslogic/bt_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * Buslogic BT74x SCSI controllers * diff --git a/sys/dev/buslogic/bt_isa.c b/sys/dev/buslogic/bt_isa.c index 3241abdb00c0..78f4b2e1133b 100644 --- a/sys/dev/buslogic/bt_isa.c +++ b/sys/dev/buslogic/bt_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * Buslogic BT-54X and BT-445 cards * diff --git a/sys/dev/buslogic/btreg.h b/sys/dev/buslogic/btreg.h index 4a796f2a5813..be6e74f90ebe 100644 --- a/sys/dev/buslogic/btreg.h +++ b/sys/dev/buslogic/btreg.h @@ -1,4 +1,4 @@ -/* +/*- * Generic register and struct definitions for the BusLogic * MultiMaster SCSI host adapters. Product specific probe and * attach routines can be found in: diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 29557d20fb13..ba3f1ca42d3e 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 M. Warner Losh. All Rights Reserved. * Copyright (c) 2000,2001 Jonathan Chen. All rights reserved. * diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index e17b935aed2d..6c4a3727a49e 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/cardbus/cardbus_cis.h b/sys/dev/cardbus/cardbus_cis.h index a56d13b9df97..43adcfa01ce1 100644 --- a/sys/dev/cardbus/cardbus_cis.h +++ b/sys/dev/cardbus/cardbus_cis.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/cardbus/cardbusreg.h b/sys/dev/cardbus/cardbusreg.h index c356323d2125..56171aad3982 100644 --- a/sys/dev/cardbus/cardbusreg.h +++ b/sys/dev/cardbus/cardbusreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/cardbus/cardbusvar.h b/sys/dev/cardbus/cardbusvar.h index b8276894912d..d200f59e539e 100644 --- a/sys/dev/cardbus/cardbusvar.h +++ b/sys/dev/cardbus/cardbusvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/cnw/if_cnwioctl.h b/sys/dev/cnw/if_cnwioctl.h index 04e8c3b23727..cc1b54890a99 100644 --- a/sys/dev/cnw/if_cnwioctl.h +++ b/sys/dev/cnw/if_cnwioctl.h @@ -1,7 +1,7 @@ /* $NetBSD: if_cnwioctl.h,v 1.2 1999/11/29 12:54:00 itojun Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1996, 1997 Berkeley Software Design, Inc. * All rights reserved. * diff --git a/sys/dev/cp/cpddk.c b/sys/dev/cp/cpddk.c index 1fbd22d57fea..7c82f9b85208 100644 --- a/sys/dev/cp/cpddk.c +++ b/sys/dev/cp/cpddk.c @@ -1,4 +1,4 @@ -/* +/*- * Low-level subroutines for Cronyx Tau-PCI adapter. * * Copyright (C) 1999-2003 Cronyx Engineering. diff --git a/sys/dev/cp/cpddk.h b/sys/dev/cp/cpddk.h index 69d0512d66cb..3ff40bbd68d1 100644 --- a/sys/dev/cp/cpddk.h +++ b/sys/dev/cp/cpddk.h @@ -1,4 +1,4 @@ -/* +/*- * Cronyx Tau-PCI DDK definitions. * * Copyright (C) 1999-2003 Cronyx Engineering. diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 2674c90ba391..bcc818f53bdd 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -1,4 +1,4 @@ -/* +/*- * Cronyx-Tau-PCI adapter driver for FreeBSD. * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode, * and asyncronous channels with full modem control. diff --git a/sys/dev/cp/ng_cp.h b/sys/dev/cp/ng_cp.h index 0dd65618cce3..f35d81760499 100644 --- a/sys/dev/cp/ng_cp.h +++ b/sys/dev/cp/ng_cp.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Tau-PCI adapter driver. * * Copyright (C) 1999-2004 Cronyx Engineering. diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c index 939c2080c815..a8f058068f53 100644 --- a/sys/dev/cs/if_cs.c +++ b/sys/dev/cs/if_cs.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. * All rights reserved. * diff --git a/sys/dev/cs/if_cs_isa.c b/sys/dev/cs/if_cs_isa.c index dcbd02f06869..8064f4b3a7a4 100644 --- a/sys/dev/cs/if_cs_isa.c +++ b/sys/dev/cs/if_cs_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. * All rights reserved. * diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c index 721a49a9de91..dbd3e54aad14 100644 --- a/sys/dev/cs/if_cs_pccard.c +++ b/sys/dev/cs/if_cs_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/cs/if_csreg.h b/sys/dev/cs/if_csreg.h index 5a93643591d5..dc844c8cc810 100644 --- a/sys/dev/cs/if_csreg.h +++ b/sys/dev/cs/if_csreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko. * All rights reserved. * diff --git a/sys/dev/cs/if_csvar.h b/sys/dev/cs/if_csvar.h index 0f62c62d934d..0222841fcf08 100644 --- a/sys/dev/cs/if_csvar.h +++ b/sys/dev/cs/if_csvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/ct/bshw_machdep.c b/sys/dev/ct/bshw_machdep.c index 5528f439f1ce..0e48f77ad286 100644 --- a/sys/dev/ct/bshw_machdep.c +++ b/sys/dev/ct/bshw_machdep.c @@ -4,7 +4,7 @@ __FBSDID("$FreeBSD$"); /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ct/bshwvar.h b/sys/dev/ct/bshwvar.h index 9e2259c94c76..ba42a7206979 100644 --- a/sys/dev/ct/bshwvar.h +++ b/sys/dev/ct/bshwvar.h @@ -2,7 +2,7 @@ /* $NecBSD: bshwvar.h,v 1.3.14.3 2001/06/21 04:07:37 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1994, 1995, 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ct/ct.c b/sys/dev/ct/ct.c index eb87dbfb7e55..602e094509ca 100644 --- a/sys/dev/ct/ct.c +++ b/sys/dev/ct/ct.c @@ -7,7 +7,7 @@ __FBSDID("$FreeBSD$"); #define CT_DEBUG #define CT_IO_CONTROL_FLAGS (CT_USE_CCSEQ | CT_FAST_INTR) -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ct/ct_isa.c b/sys/dev/ct/ct_isa.c index 15173e23a550..b16b1d872f0e 100644 --- a/sys/dev/ct/ct_isa.c +++ b/sys/dev/ct/ct_isa.c @@ -4,7 +4,7 @@ __FBSDID("$FreeBSD$"); /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ct/ct_machdep.h b/sys/dev/ct/ct_machdep.h index 18a9ec86673c..2e069f5d33a1 100644 --- a/sys/dev/ct/ct_machdep.h +++ b/sys/dev/ct/ct_machdep.h @@ -2,7 +2,7 @@ /* $NecBSD: ct_machdep.h,v 1.4.12.2 2001/06/20 06:13:34 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ct/ctvar.h b/sys/dev/ct/ctvar.h index 4e7ba1569edc..8c63445e0200 100644 --- a/sys/dev/ct/ctvar.h +++ b/sys/dev/ct/ctvar.h @@ -2,7 +2,7 @@ /* $NecBSD: ctvar.h,v 1.4.14.3 2001/06/20 06:13:34 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ctau/am8530.h b/sys/dev/ctau/am8530.h index 0ab2d4eaeb45..09831c624ed7 100644 --- a/sys/dev/ctau/am8530.h +++ b/sys/dev/ctau/am8530.h @@ -1,4 +1,4 @@ -/* +/*- * AMD Am83C30 serial communication controller registers. * * Copyright (C) 1996 Cronyx Engineering. diff --git a/sys/dev/ctau/ctau.c b/sys/dev/ctau/ctau.c index 37cbd4698caa..9b4f40475af3 100644 --- a/sys/dev/ctau/ctau.c +++ b/sys/dev/ctau/ctau.c @@ -1,4 +1,4 @@ -/* +/*- * Low-level subroutines for Cronyx-Tau adapter. * * Copyright (C) 1994-2001 Cronyx Engineering. diff --git a/sys/dev/ctau/ctaureg.h b/sys/dev/ctau/ctaureg.h index 9097a5522a1e..3cd2ce21cedd 100644 --- a/sys/dev/ctau/ctaureg.h +++ b/sys/dev/ctau/ctaureg.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Tau adapter, based on Hitachi HD64570 controller. * * Copyright (C) 1996 Cronyx Engineering. diff --git a/sys/dev/ctau/ctddk.c b/sys/dev/ctau/ctddk.c index 92f98056697f..0a9dbd2fd46b 100644 --- a/sys/dev/ctau/ctddk.c +++ b/sys/dev/ctau/ctddk.c @@ -1,4 +1,4 @@ -/* +/*- * DDK library for Cronyx-Tau adapters. * * Copyright (C) 1998-1999 Cronyx Engineering. diff --git a/sys/dev/ctau/ctddk.h b/sys/dev/ctau/ctddk.h index d48e1092319a..99620902fc96 100644 --- a/sys/dev/ctau/ctddk.h +++ b/sys/dev/ctau/ctddk.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Tau adapter driver. * * Copyright (C) 1994-2003 Cronyx Engineering. diff --git a/sys/dev/ctau/ds2153.h b/sys/dev/ctau/ds2153.h index bb0241464a55..44ab02d41fe9 100644 --- a/sys/dev/ctau/ds2153.h +++ b/sys/dev/ctau/ds2153.h @@ -1,4 +1,4 @@ -/* +/*- * Dallas DS2153, DS21x54 single-chip E1 tranceiver registers. * * Copyright (C) 1996 Cronyx Engineering. diff --git a/sys/dev/ctau/hdc64570.h b/sys/dev/ctau/hdc64570.h index 978ff6ab20c5..29d28cddb04c 100644 --- a/sys/dev/ctau/hdc64570.h +++ b/sys/dev/ctau/hdc64570.h @@ -1,4 +1,4 @@ -/* +/*- * Hitachi HD64570 serial communications adaptor registers. * * Copyright (C) 1996 Cronyx Engineering. diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index 0292be058fb3..b18dc9497b4a 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -1,4 +1,4 @@ -/* +/*- * Cronyx-Tau adapter driver for FreeBSD. * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, * and asyncronous channels with full modem control. diff --git a/sys/dev/ctau/lxt318.h b/sys/dev/ctau/lxt318.h index f194b7bda03b..a1064afca67c 100644 --- a/sys/dev/ctau/lxt318.h +++ b/sys/dev/ctau/lxt318.h @@ -1,4 +1,4 @@ -/* +/*- * Level One LXT318 E1 transceiver registers. * Crystal CS61318 E1 Line Interface Unit registers. * Crystal CS61581 T1/E1 Line Interface Unit registers. diff --git a/sys/dev/ctau/ng_ct.h b/sys/dev/ctau/ng_ct.h index 5fba87812cda..bd4d208e1204 100644 --- a/sys/dev/ctau/ng_ct.h +++ b/sys/dev/ctau/ng_ct.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Tau adapter driver. * * Copyright (C) 1999-2004 Cronyx Engineering. diff --git a/sys/dev/cx/cronyxfw.h b/sys/dev/cx/cronyxfw.h index 70264136ec14..56b2033b09ab 100644 --- a/sys/dev/cx/cronyxfw.h +++ b/sys/dev/cx/cronyxfw.h @@ -1,4 +1,4 @@ -/* +/*- * Cronyx firmware definitions. * * Copyright (C) 1996 Cronyx Engineering. diff --git a/sys/dev/cx/csigma.c b/sys/dev/cx/csigma.c index db2c1380c264..e880b88cbef0 100644 --- a/sys/dev/cx/csigma.c +++ b/sys/dev/cx/csigma.c @@ -1,4 +1,4 @@ -/* +/*- * Low-level subroutines for Cronyx-Sigma adapter. * * Copyright (C) 1994-2000 Cronyx Engineering. diff --git a/sys/dev/cx/cxddk.c b/sys/dev/cx/cxddk.c index e4328b59b127..bbcc904051e8 100644 --- a/sys/dev/cx/cxddk.c +++ b/sys/dev/cx/cxddk.c @@ -1,4 +1,4 @@ -/* +/*- * Cronyx-Sigma Driver Development Kit. * * Copyright (C) 1998 Cronyx Engineering. diff --git a/sys/dev/cx/cxddk.h b/sys/dev/cx/cxddk.h index 75b40c04884d..bd95aa6e254c 100644 --- a/sys/dev/cx/cxddk.h +++ b/sys/dev/cx/cxddk.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Sigma adapter driver. * * Copyright (C) 1994-2001 Cronyx Engineering. diff --git a/sys/dev/cx/cxreg.h b/sys/dev/cx/cxreg.h index 0cfc6b0f101a..70a937d11280 100644 --- a/sys/dev/cx/cxreg.h +++ b/sys/dev/cx/cxreg.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Sigma adapter, based on Cirrus Logic multiprotocol * controller RISC processor CL-CD2400/2401. * diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index c7f667344c04..8ff12c029dc2 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -1,4 +1,4 @@ -/* +/*- * Cronyx-Sigma adapter driver for FreeBSD. * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode, * and asyncronous channels with full modem control. diff --git a/sys/dev/cx/machdep.h b/sys/dev/cx/machdep.h index 0a622f1e8cc7..c4affc46923a 100644 --- a/sys/dev/cx/machdep.h +++ b/sys/dev/cx/machdep.h @@ -1,4 +1,4 @@ -/* +/*- * Cronyx DDK: platform dependent definitions. * * Copyright (C) 1998-1999 Cronyx Engineering diff --git a/sys/dev/cx/ng_cx.h b/sys/dev/cx/ng_cx.h index a878e9872dfa..30b3c14daa4e 100644 --- a/sys/dev/cx/ng_cx.h +++ b/sys/dev/cx/ng_cx.h @@ -1,4 +1,4 @@ -/* +/*- * Defines for Cronyx-Tau adapter driver. * * Copyright (C) 1999-2004 Cronyx Engineering. diff --git a/sys/dev/cy/cy_pci.c b/sys/dev/cy/cy_pci.c index 98c21973b3a2..dd119e9145a2 100644 --- a/sys/dev/cy/cy_pci.c +++ b/sys/dev/cy/cy_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996, David Greenman * All rights reserved. * diff --git a/sys/dev/dc/dcphy.c b/sys/dev/dc/dcphy.c index 28affb81063c..ddf9b7e2a605 100644 --- a/sys/dev/dc/dcphy.c +++ b/sys/dev/dc/dcphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index b48a5040d24e..0bfbbe2fce8a 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003,2004 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/dcons/dcons.h b/sys/dev/dcons/dcons.h index 988c81f2722c..daf9cb4e3b0e 100644 --- a/sys/dev/dcons/dcons.h +++ b/sys/dev/dcons/dcons.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2002-2004 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index 32ae15a01be9..bfa91464a834 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 3bdbb69039da..8ca20aa272f3 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003,2004 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/dcons/dcons_os.h b/sys/dev/dcons/dcons_os.h index f88738b5b221..b1d1c627589c 100644 --- a/sys/dev/dcons/dcons_os.h +++ b/sys/dev/dcons/dcons_os.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2002-2004 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/dec/mc146818reg.h b/sys/dev/dec/mc146818reg.h index e60d043f13dd..4a3df1c117b0 100644 --- a/sys/dev/dec/mc146818reg.h +++ b/sys/dev/dec/mc146818reg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $NetBSD: mc146818reg.h,v 1.2 1997/03/12 06:53:42 cgd Exp $ */ -/* +/*- * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/dec/mcclock.c b/sys/dev/dec/mcclock.c index 5c1472cb1975..da8664e007af 100644 --- a/sys/dev/dec/mcclock.c +++ b/sys/dev/dec/mcclock.c @@ -3,7 +3,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/dec/mcclock_if.m b/sys/dev/dec/mcclock_if.m index a67caca2604e..89bc6c481194 100644 --- a/sys/dev/dec/mcclock_if.m +++ b/sys/dev/dec/mcclock_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1998 Doug Rabson # All rights reserved. # diff --git a/sys/dev/dec/mcclockvar.h b/sys/dev/dec/mcclockvar.h index 196209be3bce..b0df9d2eff2c 100644 --- a/sys/dev/dec/mcclockvar.h +++ b/sys/dev/dec/mcclockvar.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $NetBSD: mcclockvar.h,v 1.4 1997/06/22 08:02:19 jonathan Exp $ */ -/* +/*- * Copyright (c) 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h index d04c95a3b8bb..39171950f414 100644 --- a/sys/dev/dpt/dpt.h +++ b/sys/dev/dpt/dpt.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997 by Simon Shapiro * All Rights Reserved * diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c index 59256872916f..db2f7b06603c 100644 --- a/sys/dev/dpt/dpt_scsi.c +++ b/sys/dev/dpt/dpt_scsi.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997 by Simon Shapiro * All Rights Reserved * diff --git a/sys/dev/drm/ati_pcigart.h b/sys/dev/drm/ati_pcigart.h index dd1141f5303a..0bdb3363313b 100644 --- a/sys/dev/drm/ati_pcigart.h +++ b/sys/dev/drm/ati_pcigart.h @@ -1,6 +1,6 @@ /* ati_pcigart.h -- ATI PCI GART support -*- linux-c -*- - * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com - * + * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/drm.h b/sys/dev/drm/drm.h index 36e86b364e1a..167578308eb3 100644 --- a/sys/dev/drm/drm.h +++ b/sys/dev/drm/drm.h @@ -8,7 +8,7 @@ * Dec 1999, Richard Henderson , move to generic \c cmpxchg. */ -/* +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index e45bad4fda9a..c30ab875a8b8 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -1,6 +1,6 @@ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- - * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com - * + * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/drm_agpsupport.h b/sys/dev/drm/drm_agpsupport.h index fc2f4d1e5663..4758a88e9d3c 100644 --- a/sys/dev/drm/drm_agpsupport.h +++ b/sys/dev/drm/drm_agpsupport.h @@ -1,6 +1,6 @@ /* drm_agpsupport.h -- DRM support for AGP/GART backend -*- linux-c -*- - * Created: Mon Dec 13 09:56:45 1999 by faith@precisioninsight.com - * + * Created: Mon Dec 13 09:56:45 1999 by faith@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_auth.h b/sys/dev/drm/drm_auth.h index 9141d5778b06..faa3ffcb0234 100644 --- a/sys/dev/drm/drm_auth.h +++ b/sys/dev/drm/drm_auth.h @@ -1,6 +1,6 @@ /* drm_auth.h -- IOCTLs for authentication -*- linux-c -*- - * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com - * + * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_bufs.h b/sys/dev/drm/drm_bufs.h index 8b40f9847430..841fb1360da0 100644 --- a/sys/dev/drm/drm_bufs.h +++ b/sys/dev/drm/drm_bufs.h @@ -1,6 +1,6 @@ /* drm_bufs.h -- Generic buffer template -*- linux-c -*- - * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com - * + * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com */ +/*- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_context.h b/sys/dev/drm/drm_context.h index 9d832641fb7d..177bd5967399 100644 --- a/sys/dev/drm/drm_context.h +++ b/sys/dev/drm/drm_context.h @@ -1,6 +1,6 @@ /* drm_context.h -- IOCTLs for generic contexts -*- linux-c -*- - * Created: Fri Nov 24 18:31:37 2000 by gareth@valinux.com - * + * Created: Fri Nov 24 18:31:37 2000 by gareth@valinux.com */ +/*- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_dma.h b/sys/dev/drm/drm_dma.h index 7cf3d174653d..9a0f2aa27062 100644 --- a/sys/dev/drm/drm_dma.h +++ b/sys/dev/drm/drm_dma.h @@ -1,6 +1,6 @@ /* drm_dma.c -- DMA IOCTL and function support -*- linux-c -*- - * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com - * + * Created: Fri Mar 19 14:30:16 1999 by faith@valinux.com */ +/*- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_drawable.h b/sys/dev/drm/drm_drawable.h index 7f3938d62090..d7381f17b110 100644 --- a/sys/dev/drm/drm_drawable.h +++ b/sys/dev/drm/drm_drawable.h @@ -1,6 +1,6 @@ /* drm_drawable.h -- IOCTLs for drawables -*- linux-c -*- - * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com - * + * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index 1227296eb6ac..59bf0c83dc6c 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -1,6 +1,6 @@ /* drm_drv.h -- Generic driver template -*- linux-c -*- - * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com - * + * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com */ +/*- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_fops.h b/sys/dev/drm/drm_fops.h index 4c79fe117237..0e4b24c97297 100644 --- a/sys/dev/drm/drm_fops.h +++ b/sys/dev/drm/drm_fops.h @@ -1,6 +1,6 @@ /* drm_fops.h -- File operations for DRM -*- linux-c -*- - * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com - * + * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_ioctl.h b/sys/dev/drm/drm_ioctl.h index d34851937721..e04e47bd0609 100644 --- a/sys/dev/drm/drm_ioctl.h +++ b/sys/dev/drm/drm_ioctl.h @@ -1,6 +1,6 @@ /* drm_ioctl.h -- IOCTL processing for DRM -*- linux-c -*- - * Created: Fri Jan 8 09:01:26 1999 by faith@valinux.com - * + * Created: Fri Jan 8 09:01:26 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_irq.h b/sys/dev/drm/drm_irq.h index 8f7d747f4799..89f5cda6b745 100644 --- a/sys/dev/drm/drm_irq.h +++ b/sys/dev/drm/drm_irq.h @@ -1,6 +1,6 @@ /* drm_dma.c -- DMA IOCTL and function support - * Created: Fri Oct 18 2003 by anholt@FreeBSD.org - * + * Created: Fri Oct 18 2003 by anholt@FreeBSD.org */ +/*- * Copyright 2003 Eric Anholt * All Rights Reserved. * diff --git a/sys/dev/drm/drm_linux_list.h b/sys/dev/drm/drm_linux_list.h index 4fef61c528b6..12de8233f150 100644 --- a/sys/dev/drm/drm_linux_list.h +++ b/sys/dev/drm/drm_linux_list.h @@ -1,6 +1,6 @@ /* drm_linux_list.h -- linux list functions for the BSDs. - * Created: Mon Apr 7 14:30:16 1999 by anholt@FreeBSD.org - * + * Created: Mon Apr 7 14:30:16 1999 by anholt@FreeBSD.org */ +/*- * Copyright 2003 Eric Anholt * All Rights Reserved. * diff --git a/sys/dev/drm/drm_lock.h b/sys/dev/drm/drm_lock.h index f0937076e552..bcdcbfe3dc05 100644 --- a/sys/dev/drm/drm_lock.h +++ b/sys/dev/drm/drm_lock.h @@ -1,6 +1,6 @@ /* lock.c -- IOCTLs for locking -*- linux-c -*- - * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com - * + * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_memory.h b/sys/dev/drm/drm_memory.h index 917cb1e15e7a..1bf0e8e1470f 100644 --- a/sys/dev/drm/drm_memory.h +++ b/sys/dev/drm/drm_memory.h @@ -1,6 +1,6 @@ /* drm_memory.h -- Memory management wrappers for DRM -*- linux-c -*- - * Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com - * + * Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_memory_debug.h b/sys/dev/drm/drm_memory_debug.h index a627fb4281de..1ce7ffe403c6 100644 --- a/sys/dev/drm/drm_memory_debug.h +++ b/sys/dev/drm/drm_memory_debug.h @@ -1,6 +1,6 @@ /* drm_memory.h -- Memory management wrappers for DRM -*- linux-c -*- - * Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com - * + * Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index a9a7308ccd3d..c2fafad2fc32 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -5,7 +5,7 @@ * \author Eric Anholt */ -/* +/*- * Copyright 2003 Eric Anholt * All Rights Reserved. * diff --git a/sys/dev/drm/drm_pci.h b/sys/dev/drm/drm_pci.h index 2a0569d06d0c..12add61778e5 100644 --- a/sys/dev/drm/drm_pci.h +++ b/sys/dev/drm/drm_pci.h @@ -5,7 +5,7 @@ * \author Eric Anholt */ -/* +/*- * Copyright 2003 Eric Anholt. * All Rights Reserved. * diff --git a/sys/dev/drm/drm_sarea.h b/sys/dev/drm/drm_sarea.h index 45bef824e7cc..cee32192f0b3 100644 --- a/sys/dev/drm/drm_sarea.h +++ b/sys/dev/drm/drm_sarea.h @@ -5,7 +5,7 @@ * \author Michel D�zer */ -/* +/*- * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. * diff --git a/sys/dev/drm/drm_scatter.h b/sys/dev/drm/drm_scatter.h index 4da0a1b6f1ca..a67f1c62d95c 100644 --- a/sys/dev/drm/drm_scatter.h +++ b/sys/dev/drm/drm_scatter.h @@ -1,6 +1,6 @@ /* drm_scatter.h -- IOCTLs to manage scatter/gather memory -*- linux-c -*- - * Created: Mon Dec 18 23:20:54 2000 by gareth@valinux.com - * + * Created: Mon Dec 18 23:20:54 2000 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/drm_sysctl.h b/sys/dev/drm/drm_sysctl.h index c7e6eef980a1..64b3408e9ca1 100644 --- a/sys/dev/drm/drm_sysctl.h +++ b/sys/dev/drm/drm_sysctl.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright 2003 Eric Anholt * All Rights Reserved. * diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h index 2637a83998ed..23a6de74a47a 100644 --- a/sys/dev/drm/drm_vm.h +++ b/sys/dev/drm/drm_vm.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright 2003 Eric Anholt * All Rights Reserved. * diff --git a/sys/dev/drm/mga.h b/sys/dev/drm/mga.h index 74a98ac40ef4..6f463c31c8b4 100644 --- a/sys/dev/drm/mga.h +++ b/sys/dev/drm/mga.h @@ -1,6 +1,6 @@ /* mga.h -- Matrox G200/G400 DRM template customization -*- linux-c -*- - * Created: Thu Jan 11 21:29:32 2001 by gareth@valinux.com - * + * Created: Thu Jan 11 21:29:32 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/mga_dma.c b/sys/dev/drm/mga_dma.c index 3f75d7663f2a..57db72d6dad6 100644 --- a/sys/dev/drm/mga_dma.c +++ b/sys/dev/drm/mga_dma.c @@ -1,6 +1,6 @@ /* mga_dma.c -- DMA support for mga g200/g400 -*- linux-c -*- - * Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com - * + * Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/mga_drm.h b/sys/dev/drm/mga_drm.h index 57ecc16c5719..fb851a9890bc 100644 --- a/sys/dev/drm/mga_drm.h +++ b/sys/dev/drm/mga_drm.h @@ -1,6 +1,6 @@ /* mga_drm.h -- Public header for the Matrox g200/g400 driver -*- linux-c -*- - * Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com - * + * Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/mga_drv.c b/sys/dev/drm/mga_drv.c index cbec2999beb5..6de110a04e98 100644 --- a/sys/dev/drm/mga_drv.c +++ b/sys/dev/drm/mga_drv.c @@ -1,6 +1,6 @@ /* mga_drv.c -- Matrox G200/G400 driver -*- linux-c -*- - * Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com - * + * Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/mga_drv.h b/sys/dev/drm/mga_drv.h index c84c9ea5b963..b4f333a6c09d 100644 --- a/sys/dev/drm/mga_drv.h +++ b/sys/dev/drm/mga_drv.h @@ -1,6 +1,6 @@ /* mga_drv.h -- Private header for the Matrox G200/G400 driver -*- linux-c -*- - * Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com - * + * Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/mga_irq.c b/sys/dev/drm/mga_irq.c index 1c9a93f5940a..82a2705add19 100644 --- a/sys/dev/drm/mga_irq.c +++ b/sys/dev/drm/mga_irq.c @@ -1,5 +1,5 @@ -/* mga_irq.c -- IRQ handling for radeon -*- linux-c -*- - * +/* mga_irq.c -- IRQ handling for radeon -*- linux-c -*- */ +/*- * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. * * The Weather Channel (TM) funded Tungsten Graphics to develop the diff --git a/sys/dev/drm/mga_state.c b/sys/dev/drm/mga_state.c index b4a7d6f07d9f..8e72f2200f67 100644 --- a/sys/dev/drm/mga_state.c +++ b/sys/dev/drm/mga_state.c @@ -1,6 +1,6 @@ /* mga_state.c -- State support for MGA G200/G400 -*- linux-c -*- - * Created: Thu Jan 27 02:53:43 2000 by jhartmann@precisioninsight.com - * + * Created: Thu Jan 27 02:53:43 2000 by jhartmann@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/mga_ucode.h b/sys/dev/drm/mga_ucode.h index 3dd85e3bea2f..575166e96d24 100644 --- a/sys/dev/drm/mga_ucode.h +++ b/sys/dev/drm/mga_ucode.h @@ -1,6 +1,6 @@ /* mga_ucode.h -- Matrox G200/G400 WARP engine microcode -*- linux-c -*- - * Created: Thu Jan 11 21:20:43 2001 by gareth@valinux.com - * + * Created: Thu Jan 11 21:20:43 2001 by gareth@valinux.com */ +/*- * Copyright 1999 Matrox Graphics Inc. * All Rights Reserved. * diff --git a/sys/dev/drm/mga_warp.c b/sys/dev/drm/mga_warp.c index 035d04589add..db292dd69bdd 100644 --- a/sys/dev/drm/mga_warp.c +++ b/sys/dev/drm/mga_warp.c @@ -1,6 +1,6 @@ /* mga_warp.c -- Matrox G200/G400 WARP engine management -*- linux-c -*- - * Created: Thu Jan 11 21:29:32 2001 by gareth@valinux.com - * + * Created: Thu Jan 11 21:29:32 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/r128.h b/sys/dev/drm/r128.h index 3a22671f3724..0b0fc928b181 100644 --- a/sys/dev/drm/r128.h +++ b/sys/dev/drm/r128.h @@ -1,6 +1,6 @@ /* r128.h -- ATI Rage 128 DRM template customization -*- linux-c -*- - * Created: Wed Feb 14 16:07:10 2001 by gareth@valinux.com - * + * Created: Wed Feb 14 16:07:10 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/r128_cce.c b/sys/dev/drm/r128_cce.c index e7160bd9a5da..75a3c3015337 100644 --- a/sys/dev/drm/r128_cce.c +++ b/sys/dev/drm/r128_cce.c @@ -1,6 +1,6 @@ /* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*- - * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com - * + * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com */ +/*- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/r128_drm.h b/sys/dev/drm/r128_drm.h index 30b8b3eaf548..32a58daa13b0 100644 --- a/sys/dev/drm/r128_drm.h +++ b/sys/dev/drm/r128_drm.h @@ -1,6 +1,6 @@ /* r128_drm.h -- Public header for the r128 driver -*- linux-c -*- - * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com - * + * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com */ +/*- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/r128_drv.c b/sys/dev/drm/r128_drv.c index b9df5ecf9708..16035fccd747 100644 --- a/sys/dev/drm/r128_drv.c +++ b/sys/dev/drm/r128_drv.c @@ -1,6 +1,6 @@ /* r128_drv.c -- ATI Rage 128 driver -*- linux-c -*- - * Created: Mon Dec 13 09:47:27 1999 by faith@precisioninsight.com - * + * Created: Mon Dec 13 09:47:27 1999 by faith@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/r128_drv.h b/sys/dev/drm/r128_drv.h index 0695684c1db2..8d8f87794330 100644 --- a/sys/dev/drm/r128_drv.h +++ b/sys/dev/drm/r128_drv.h @@ -1,6 +1,6 @@ /* r128_drv.h -- Private header for r128 driver -*- linux-c -*- - * Created: Mon Dec 13 09:51:11 1999 by faith@precisioninsight.com - * + * Created: Mon Dec 13 09:51:11 1999 by faith@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/r128_irq.c b/sys/dev/drm/r128_irq.c index 2da58d61b4bf..fa3fb43f3cfe 100644 --- a/sys/dev/drm/r128_irq.c +++ b/sys/dev/drm/r128_irq.c @@ -1,5 +1,5 @@ -/* r128_irq.c -- IRQ handling for radeon -*- linux-c -*- - * +/* r128_irq.c -- IRQ handling for radeon -*- linux-c -*- */ +/*- * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. * * The Weather Channel (TM) funded Tungsten Graphics to develop the diff --git a/sys/dev/drm/r128_state.c b/sys/dev/drm/r128_state.c index 703d5508e42e..5286e29c606f 100644 --- a/sys/dev/drm/r128_state.c +++ b/sys/dev/drm/r128_state.c @@ -1,6 +1,6 @@ /* r128_state.c -- State support for r128 -*- linux-c -*- - * Created: Thu Jan 27 02:53:43 2000 by gareth@valinux.com - * + * Created: Thu Jan 27 02:53:43 2000 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/radeon.h b/sys/dev/drm/radeon.h index 517d9d27cccf..f7f9708c07b4 100644 --- a/sys/dev/drm/radeon.h +++ b/sys/dev/drm/radeon.h @@ -1,6 +1,6 @@ /* radeon.h -- ATI Radeon DRM template customization -*- linux-c -*- - * Created: Wed Feb 14 17:07:34 2001 by gareth@valinux.com - * + * Created: Wed Feb 14 17:07:34 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/radeon_cp.c b/sys/dev/drm/radeon_cp.c index 59cd9ff58b01..2418f803a871 100644 --- a/sys/dev/drm/radeon_cp.c +++ b/sys/dev/drm/radeon_cp.c @@ -1,5 +1,5 @@ -/* radeon_cp.c -- CP support for Radeon -*- linux-c -*- - * +/* radeon_cp.c -- CP support for Radeon -*- linux-c -*- */ +/*- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * All Rights Reserved. diff --git a/sys/dev/drm/radeon_drm.h b/sys/dev/drm/radeon_drm.h index 51bbacfbf424..b0e59aa620a8 100644 --- a/sys/dev/drm/radeon_drm.h +++ b/sys/dev/drm/radeon_drm.h @@ -1,5 +1,5 @@ -/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*- - * +/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*- */ +/*- * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. diff --git a/sys/dev/drm/radeon_drv.c b/sys/dev/drm/radeon_drv.c index 37dcc2bcf7ac..ca94080d2696 100644 --- a/sys/dev/drm/radeon_drv.c +++ b/sys/dev/drm/radeon_drv.c @@ -1,6 +1,6 @@ /* radeon_drv.c -- ATI Radeon driver -*- linux-c -*- - * Created: Wed Feb 14 17:10:04 2001 by gareth@valinux.com - * + * Created: Wed Feb 14 17:10:04 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/radeon_drv.h b/sys/dev/drm/radeon_drv.h index d14d34204afd..ab694dec9f8a 100644 --- a/sys/dev/drm/radeon_drv.h +++ b/sys/dev/drm/radeon_drv.h @@ -1,5 +1,5 @@ -/* radeon_drv.h -- Private header for radeon driver -*- linux-c -*- - * +/* radeon_drv.h -- Private header for radeon driver -*- linux-c -*- */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * All rights reserved. diff --git a/sys/dev/drm/radeon_irq.c b/sys/dev/drm/radeon_irq.c index 636653c2ae1e..2d600a4e51c1 100644 --- a/sys/dev/drm/radeon_irq.c +++ b/sys/dev/drm/radeon_irq.c @@ -1,5 +1,5 @@ -/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*- - * +/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*- */ +/*- * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. * * The Weather Channel (TM) funded Tungsten Graphics to develop the diff --git a/sys/dev/drm/radeon_mem.c b/sys/dev/drm/radeon_mem.c index 3238c2717a27..472b21f1e92c 100644 --- a/sys/dev/drm/radeon_mem.c +++ b/sys/dev/drm/radeon_mem.c @@ -1,5 +1,5 @@ -/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*- - * +/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*- */ +/*- * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. * * The Weather Channel (TM) funded Tungsten Graphics to develop the diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c index 950a8eec2df2..e1227705e6a6 100644 --- a/sys/dev/drm/radeon_state.c +++ b/sys/dev/drm/radeon_state.c @@ -1,5 +1,5 @@ /* radeon_state.c -- State support for Radeon -*- linux-c -*- - * +/*- * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * All Rights Reserved. * diff --git a/sys/dev/drm/sis.h b/sys/dev/drm/sis.h index 03498183f2e7..dde5d9555195 100644 --- a/sys/dev/drm/sis.h +++ b/sys/dev/drm/sis.h @@ -1,5 +1,5 @@ -/* sis_drv.h -- Private header for sis driver -*- linux-c -*- - * +/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/sis_drv.c b/sys/dev/drm/sis_drv.c index ae6615b912aa..5009f9d940bf 100644 --- a/sys/dev/drm/sis_drv.c +++ b/sys/dev/drm/sis_drv.c @@ -1,5 +1,5 @@ -/* sis.c -- sis driver -*- linux-c -*- - * +/* sis.c -- sis driver -*- linux-c -*- */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/drm/sis_drv.h b/sys/dev/drm/sis_drv.h index 3f80901bb171..156e2b24787e 100644 --- a/sys/dev/drm/sis_drv.h +++ b/sys/dev/drm/sis_drv.h @@ -1,5 +1,5 @@ -/* sis_drv.h -- Private header for sis driver -*- linux-c -*- - * +/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All rights reserved. diff --git a/sys/dev/drm/sis_ds.c b/sys/dev/drm/sis_ds.c index 74b111e33750..cf837a7e504c 100644 --- a/sys/dev/drm/sis_ds.c +++ b/sys/dev/drm/sis_ds.c @@ -1,6 +1,6 @@ /* sis_ds.c -- Private header for Direct Rendering Manager -*- linux-c -*- - * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw - * + * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw */ +/*- * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. * All rights reserved. * diff --git a/sys/dev/drm/sis_ds.h b/sys/dev/drm/sis_ds.h index d5cdbc27800a..ce9535bf926d 100644 --- a/sys/dev/drm/sis_ds.h +++ b/sys/dev/drm/sis_ds.h @@ -1,6 +1,6 @@ /* sis_ds.h -- Private header for Direct Rendering Manager -*- linux-c -*- - * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw - * + * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw */ +/*- * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. * All rights reserved. * diff --git a/sys/dev/drm/sis_mm.c b/sys/dev/drm/sis_mm.c index 6f29974ee082..6ff18e5d8c09 100644 --- a/sys/dev/drm/sis_mm.c +++ b/sys/dev/drm/sis_mm.c @@ -1,6 +1,6 @@ /* sis_mm.c -- Private header for Direct Rendering Manager -*- linux-c -*- - * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw - * + * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw * +/*- * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. * All rights reserved. * diff --git a/sys/dev/drm/tdfx.h b/sys/dev/drm/tdfx.h index cc2b72035c8b..9a8cf720e851 100644 --- a/sys/dev/drm/tdfx.h +++ b/sys/dev/drm/tdfx.h @@ -1,6 +1,6 @@ /* tdfx.h -- 3dfx DRM template customization -*- linux-c -*- - * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com - * + * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com */ +/*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * diff --git a/sys/dev/drm/tdfx_drv.c b/sys/dev/drm/tdfx_drv.c index 93083fdeea23..4985ee05762b 100644 --- a/sys/dev/drm/tdfx_drv.c +++ b/sys/dev/drm/tdfx_drv.c @@ -1,6 +1,6 @@ /* tdfx_drv.c -- tdfx driver -*- linux-c -*- - * Created: Thu Oct 7 10:38:32 1999 by faith@precisioninsight.com - * + * Created: Thu Oct 7 10:38:32 1999 by faith@precisioninsight.com */ +/*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 5f441e6a97c2..28fe83779964 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/ed/if_ed98.h b/sys/dev/ed/if_ed98.h index 22bbf78be0e6..2a2af0498cca 100644 --- a/sys/dev/ed/if_ed98.h +++ b/sys/dev/ed/if_ed98.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) KATO Takenori, 1996. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c index 0b9a1220b9c7..1f8424355c1f 100644 --- a/sys/dev/ed/if_ed_cbus.c +++ b/sys/dev/ed/if_ed_cbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/ed/if_ed_isa.c b/sys/dev/ed/if_ed_isa.c index 69da715f2646..3a5804c8dcdd 100644 --- a/sys/dev/ed/if_ed_isa.c +++ b/sys/dev/ed/if_ed_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index dfe71fa12de6..b9f75e77dcb2 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/ed/if_edreg.h b/sys/dev/ed/if_edreg.h index 4b0857894ce9..cfe5b7053142 100644 --- a/sys/dev/ed/if_edreg.h +++ b/sys/dev/ed/if_edreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1993, David Greenman. This software may be used, modified, * copied, distributed, and sold, in both source and binary form provided * that the above copyright and these terms are retained. Under no diff --git a/sys/dev/ed/if_edvar.h b/sys/dev/ed/if_edvar.h index fd3bcf1cf169..d8da2fcc816d 100644 --- a/sys/dev/ed/if_edvar.h +++ b/sys/dev/ed/if_edvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/eisa/eisa_if.m b/sys/dev/eisa/eisa_if.m index 9bf7e56bb542..72c8184cdce5 100644 --- a/sys/dev/eisa/eisa_if.m +++ b/sys/dev/eisa/eisa_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 2004 M. Warner Losh # All rights reserved. # diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c index 2ef026561aeb..b9c77f5b5c60 100644 --- a/sys/dev/eisa/eisaconf.c +++ b/sys/dev/eisa/eisaconf.c @@ -1,4 +1,4 @@ -/* +/*- * EISA bus probe and attach routines * * Copyright (c) 1995, 1996 Justin T. Gibbs. diff --git a/sys/dev/eisa/eisaconf.h b/sys/dev/eisa/eisaconf.h index ebdee5a6cdd6..522cd5db59e1 100644 --- a/sys/dev/eisa/eisaconf.h +++ b/sys/dev/eisa/eisaconf.h @@ -1,4 +1,4 @@ -/* +/*- * EISA bus device definitions * * Copyright (c) 1995, 1996 Justin T. Gibbs. diff --git a/sys/dev/em/LICENSE b/sys/dev/em/LICENSE index de8145e47a90..42545ca85f97 100644 --- a/sys/dev/em/LICENSE +++ b/sys/dev/em/LICENSE @@ -1,4 +1,5 @@ $FreeBSD$ +/*- Copyright (c) 2001-2003, Intel Corporation All rights reserved. @@ -27,3 +28,4 @@ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/sys/dev/en/if_en_pci.c b/sys/dev/en/if_en_pci.c index 1ca6e35a2ed0..1aaf76108b82 100644 --- a/sys/dev/en/if_en_pci.c +++ b/sys/dev/en/if_en_pci.c @@ -1,6 +1,5 @@ /* $NetBSD: if_en_pci.c,v 1.1 1996/06/22 02:00:31 chuck Exp $ */ -/* - * +/*- * Copyright (c) 1996 Charles D. Cranor and Washington University. * All rights reserved. * diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c index 33108381ec81..265b60ea7833 100644 --- a/sys/dev/en/midway.c +++ b/sys/dev/en/midway.c @@ -1,8 +1,7 @@ /* $NetBSD: midway.c,v 1.30 1997/09/29 17:40:38 chuck Exp $ */ /* (sync'd to midway.c 1.68) */ -/* - * +/*- * Copyright (c) 1996 Charles D. Cranor and Washington University. * All rights reserved. * diff --git a/sys/dev/en/midwayvar.h b/sys/dev/en/midwayvar.h index 27da2f57aed2..27e047deffef 100644 --- a/sys/dev/en/midwayvar.h +++ b/sys/dev/en/midwayvar.h @@ -1,7 +1,6 @@ /* $NetBSD: midwayvar.h,v 1.10 1997/03/20 21:34:46 chuck Exp $ */ -/* - * +/*- * Copyright (c) 1996 Charles D. Cranor and Washington University. * All rights reserved. * diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 60197577cafe..7cb257321e9d 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Herb Peyerl * All rights reserved. * diff --git a/sys/dev/ep/if_ep_eisa.c b/sys/dev/ep/if_ep_eisa.c index 9d1e6030d3f7..efe49cf25751 100644 --- a/sys/dev/ep/if_ep_eisa.c +++ b/sys/dev/ep/if_ep_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Product specific probe and attach routines for: * 3COM 3C579 and 3C509(in eisa config mode) ethernet controllers * diff --git a/sys/dev/ep/if_ep_isa.c b/sys/dev/ep/if_ep_isa.c index 5bc38bc5d1f3..bd9c5c25a313 100644 --- a/sys/dev/ep/if_ep_isa.c +++ b/sys/dev/ep/if_ep_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Herb Peyerl * All rights reserved. * diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index 021b504e1761..5101a176a105 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Herb Peyerl * All rights reserved. * diff --git a/sys/dev/ep/if_epreg.h b/sys/dev/ep/if_epreg.h index acc8f79f0fd0..6f8e968802bd 100644 --- a/sys/dev/ep/if_epreg.h +++ b/sys/dev/ep/if_epreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ep/if_epvar.h b/sys/dev/ep/if_epvar.h index 242ccd46569d..6ba7bf4c6af6 100644 --- a/sys/dev/ep/if_epvar.h +++ b/sys/dev/ep/if_epvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 48686110f30c..a222f3e366a8 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -63,7 +63,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1994 Peter Galbavy * Copyright (c) 1995 Paul Kranenburg * All rights reserved. diff --git a/sys/dev/esp/ncr53c9xreg.h b/sys/dev/esp/ncr53c9xreg.h index b4ba1e81f5e3..d85cb452a46a 100644 --- a/sys/dev/esp/ncr53c9xreg.h +++ b/sys/dev/esp/ncr53c9xreg.h @@ -1,6 +1,6 @@ /* $NetBSD: ncr53c9xreg.h,v 1.11 2003/02/21 17:14:05 tsutsui Exp $ */ -/* +/*- * Copyright (c) 1994 Peter Galbavy. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/esp/ncr53c9xvar.h b/sys/dev/esp/ncr53c9xvar.h index 7bf6b2d737de..f8be39edd40e 100644 --- a/sys/dev/esp/ncr53c9xvar.h +++ b/sys/dev/esp/ncr53c9xvar.h @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1994 Peter Galbavy. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c index 7218529b4ffb..33598ba0a155 100644 --- a/sys/dev/ex/if_ex.c +++ b/sys/dev/ex/if_ex.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) * All rights reserved. * diff --git a/sys/dev/ex/if_exreg.h b/sys/dev/ex/if_exreg.h index a924c2822efa..157eda37298c 100644 --- a/sys/dev/ex/if_exreg.h +++ b/sys/dev/ex/if_exreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) * All rights reserved. * diff --git a/sys/dev/exca/exca.c b/sys/dev/exca/exca.c index 5c0e8a4b82d1..2ef4f89681d8 100644 --- a/sys/dev/exca/exca.c +++ b/sys/dev/exca/exca.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 M Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/exca/excareg.h b/sys/dev/exca/excareg.h index e2f092aac4dd..094379e79c77 100644 --- a/sys/dev/exca/excareg.h +++ b/sys/dev/exca/excareg.h @@ -1,7 +1,7 @@ /* $NetBSD: i82365reg.h,v 1.3 1998/12/20 17:53:28 nathanw Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2002 M Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/exca/excavar.h b/sys/dev/exca/excavar.h index 147cf1562229..bc29c81a0990 100644 --- a/sys/dev/exca/excavar.h +++ b/sys/dev/exca/excavar.h @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2002 M Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/fatm/firmware.h b/sys/dev/fatm/firmware.h index 6e9caf28deb6..24c7bc8e8865 100644 --- a/sys/dev/fatm/firmware.h +++ b/sys/dev/fatm/firmware.h @@ -1,4 +1,4 @@ -/* +/*- * (Copyright Notice) * * Copyright (c) 1995-2000 FORE Systems, Inc., as an unpublished work. diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c index 8335e929ff7a..35ef8b9fffaf 100644 --- a/sys/dev/fatm/if_fatm.c +++ b/sys/dev/fatm/if_fatm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/fatm/if_fatm_rate.h b/sys/dev/fatm/if_fatm_rate.h index 45b885a4f1bf..5cfd38a9c28c 100644 --- a/sys/dev/fatm/if_fatm_rate.h +++ b/sys/dev/fatm/if_fatm_rate.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/fatm/if_fatmreg.h b/sys/dev/fatm/if_fatmreg.h index 0b4a403d39f9..d488dbfda5bf 100644 --- a/sys/dev/fatm/if_fatmreg.h +++ b/sys/dev/fatm/if_fatmreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/fatm/if_fatmvar.h b/sys/dev/fatm/if_fatmvar.h index 8919d24b0712..8c550fefdd1d 100644 --- a/sys/dev/fatm/if_fatmvar.h +++ b/sys/dev/fatm/if_fatmvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/fb/gallant12x22.c b/sys/dev/fb/gallant12x22.c index b26ad34f873c..a089f6a2ec46 100644 --- a/sys/dev/fb/gallant12x22.c +++ b/sys/dev/fb/gallant12x22.c @@ -1,7 +1,7 @@ /* $OpenBSD: gallant12x22.h,v 1.2 2002/05/09 08:59:03 maja Exp $ */ /* $NetBSD: gallant12x22.h,v 1.2 1999/05/18 21:51:58 ad Exp $ */ -/* +/*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/sys/dev/fb/gallant12x22.h b/sys/dev/fb/gallant12x22.h index b26ad34f873c..a089f6a2ec46 100644 --- a/sys/dev/fb/gallant12x22.h +++ b/sys/dev/fb/gallant12x22.h @@ -1,7 +1,7 @@ /* $OpenBSD: gallant12x22.h,v 1.2 2002/05/09 08:59:03 maja Exp $ */ /* $NetBSD: gallant12x22.h,v 1.2 1999/05/18 21:51:58 ad Exp $ */ -/* +/*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/sys/dev/fb/gfb.h b/sys/dev/fb/gfb.h index 470dfc268864..89ead2e3a225 100644 --- a/sys/dev/fb/gfb.h +++ b/sys/dev/fb/gfb.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/fb/tga.h b/sys/dev/fb/tga.h index 28302485ac54..3616b61bd04c 100644 --- a/sys/dev/fb/tga.h +++ b/sys/dev/fb/tga.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 4713ef4a4356..4cb7da08549a 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -1,4 +1,4 @@ -/* +/*- * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 * * This software may be used, modified, copied, distributed, and sold, in diff --git a/sys/dev/fe/if_fe_cbus.c b/sys/dev/fe/if_fe_cbus.c index 6df70ae92eac..b92cc3df9a97 100644 --- a/sys/dev/fe/if_fe_cbus.c +++ b/sys/dev/fe/if_fe_cbus.c @@ -1,4 +1,4 @@ -/* +/*- * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 * * This software may be used, modified, copied, distributed, and sold, in diff --git a/sys/dev/fe/if_fe_isa.c b/sys/dev/fe/if_fe_isa.c index 1856951b4874..b1fa3e01d41c 100644 --- a/sys/dev/fe/if_fe_isa.c +++ b/sys/dev/fe/if_fe_isa.c @@ -1,4 +1,4 @@ -/* +/*- * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 * * This software may be used, modified, copied, distributed, and sold, in diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c index 49266deeacea..37c600e51370 100644 --- a/sys/dev/fe/if_fe_pccard.c +++ b/sys/dev/fe/if_fe_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 * * This software may be used, modified, copied, distributed, and sold, in diff --git a/sys/dev/fe/if_fereg.h b/sys/dev/fe/if_fereg.h index 21da37ab0d26..afc9c5704c58 100644 --- a/sys/dev/fe/if_fereg.h +++ b/sys/dev/fe/if_fereg.h @@ -1,4 +1,4 @@ -/* +/*- * Hardware specification of various 8696x based Ethernet cards. * Contributed by M. Sekiguchi * diff --git a/sys/dev/fe/if_fevar.h b/sys/dev/fe/if_fevar.h index c8fd35579625..99f7184a4a51 100644 --- a/sys/dev/fe/if_fevar.h +++ b/sys/dev/fe/if_fevar.h @@ -1,4 +1,4 @@ -/* +/*- * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 * * This software may be used, modified, copied, distributed, and sold, in diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 0a4a0dde5734..9636b12ad6e3 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/firewire.h b/sys/dev/firewire/firewire.h index 04c62873730e..ab34748bec25 100644 --- a/sys/dev/firewire/firewire.h +++ b/sys/dev/firewire/firewire.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/firewire_phy.h b/sys/dev/firewire/firewire_phy.h index 02cda696ea3f..42feff2d27c8 100644 --- a/sys/dev/firewire/firewire_phy.h +++ b/sys/dev/firewire/firewire_phy.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. * diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index 3c44a553adeb..3b991ea65236 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index cffb6369b747..79c74af9fe84 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwdma.c b/sys/dev/firewire/fwdma.c index afb1a09b1155..c64dbe66731a 100644 --- a/sys/dev/firewire/fwdma.c +++ b/sys/dev/firewire/fwdma.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/fwdma.h b/sys/dev/firewire/fwdma.h index 6bf66c702d6f..3a8278c1c709 100644 --- a/sys/dev/firewire/fwdma.h +++ b/sys/dev/firewire/fwdma.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index 1674405f44f8..4fac8dd06b4d 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/fwmem.h b/sys/dev/firewire/fwmem.h index f8188d10aa25..de717947e844 100644 --- a/sys/dev/firewire/fwmem.h +++ b/sys/dev/firewire/fwmem.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index ad20edcce359..ddcd05d0bccf 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index c3660a6e8305..b38f38bd1721 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwohcireg.h b/sys/dev/firewire/fwohcireg.h index 9abcb417bc41..39986223c4bf 100644 --- a/sys/dev/firewire/fwohcireg.h +++ b/sys/dev/firewire/fwohcireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwohcivar.h b/sys/dev/firewire/fwohcivar.h index 014335a1d992..3002b63c0ce4 100644 --- a/sys/dev/firewire/fwohcivar.h +++ b/sys/dev/firewire/fwohcivar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi SHimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi SHimokawa * All rights reserved. diff --git a/sys/dev/firewire/fwphyreg.h b/sys/dev/firewire/fwphyreg.h index f2e77768adf7..77a006ed3c54 100644 --- a/sys/dev/firewire/fwphyreg.h +++ b/sys/dev/firewire/fwphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/iec13213.h b/sys/dev/firewire/iec13213.h index 5cafc8de34e6..058649fc0cc4 100644 --- a/sys/dev/firewire/iec13213.h +++ b/sys/dev/firewire/iec13213.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/iec68113.h b/sys/dev/firewire/iec68113.h index 58a8cfe7d9eb..11f3042ff9b0 100644 --- a/sys/dev/firewire/iec68113.h +++ b/sys/dev/firewire/iec68113.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index a5bdb5b7baf6..34e540b877c9 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/if_fwevar.h b/sys/dev/firewire/if_fwevar.h index 97422168621b..805301a1be1e 100644 --- a/sys/dev/firewire/if_fwevar.h +++ b/sys/dev/firewire/if_fwevar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 2c11a253ecbe..23e812a2e76d 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Doug Rabson * Copyright (c) 2002-2003 diff --git a/sys/dev/firewire/if_fwipvar.h b/sys/dev/firewire/if_fwipvar.h index fe202180a274..0a9ef244752e 100644 --- a/sys/dev/firewire/if_fwipvar.h +++ b/sys/dev/firewire/if_fwipvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Doug Rabson * Copyright (c) 2002-2003 diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index df40877b849f..c2f8e4f23a57 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/sbp.h b/sys/dev/firewire/sbp.h index 49ec97e0caeb..9f85fab38de5 100644 --- a/sys/dev/firewire/sbp.h +++ b/sys/dev/firewire/sbp.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index c6fea6bcbe50..5267ea3b3532 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. * diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h index 1e8d660e4c6e..b1c8407adabe 100644 --- a/sys/dev/fxp/if_fxpreg.h +++ b/sys/dev/fxp/if_fxpreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * Copyright (c) 2001 Jonathan Lemon * All rights reserved. diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h index 8168bd308f53..906fea6cb9a4 100644 --- a/sys/dev/fxp/if_fxpvar.h +++ b/sys/dev/fxp/if_fxpvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/fxp/rcvbundl.h b/sys/dev/fxp/rcvbundl.h index e97e9aaf5b38..ec9b99bd33aa 100644 --- a/sys/dev/fxp/rcvbundl.h +++ b/sys/dev/fxp/rcvbundl.h @@ -1,4 +1,4 @@ -/* +/*- Copyright (c) 1999-2001, Intel Corporation All rights reserved. diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c index 19c0de2628ec..58988900e86f 100644 --- a/sys/dev/gem/if_gem_pci.c +++ b/sys/dev/gem/if_gem_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2001 Eduardo Horvath. * All rights reserved. * diff --git a/sys/dev/gem/if_gemreg.h b/sys/dev/gem/if_gemreg.h index 700c732d0ebc..fecfb152eddd 100644 --- a/sys/dev/gem/if_gemreg.h +++ b/sys/dev/gem/if_gemreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2001 Eduardo Horvath. * All rights reserved. * diff --git a/sys/dev/gem/if_gemvar.h b/sys/dev/gem/if_gemvar.h index d93728e225f9..07d71e11f02e 100644 --- a/sys/dev/gem/if_gemvar.h +++ b/sys/dev/gem/if_gemvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2001 Eduardo Horvath. * All rights reserved. * diff --git a/sys/dev/gfb/gfb_pci.c b/sys/dev/gfb/gfb_pci.c index ba57878d8d04..c58ae0e021e1 100644 --- a/sys/dev/gfb/gfb_pci.c +++ b/sys/dev/gfb/gfb_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/gfb/gfb_pci.h b/sys/dev/gfb/gfb_pci.h index e0f517e7331a..263b3980c5b8 100644 --- a/sys/dev/gfb/gfb_pci.h +++ b/sys/dev/gfb/gfb_pci.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/harp/if_harp.c b/sys/dev/harp/if_harp.c index 435b64e293e8..7a0352036e45 100644 --- a/sys/dev/harp/if_harp.c +++ b/sys/dev/harp/if_harp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index 823801781bd2..cf5b182cfd2f 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index 2dbfc693e038..70bbde89a531 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatm_ioctl.c b/sys/dev/hatm/if_hatm_ioctl.c index 410be9db4733..c81027911505 100644 --- a/sys/dev/hatm/if_hatm_ioctl.c +++ b/sys/dev/hatm/if_hatm_ioctl.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatm_rx.c b/sys/dev/hatm/if_hatm_rx.c index fb80f81bb673..1b3ee8d437cc 100644 --- a/sys/dev/hatm/if_hatm_rx.c +++ b/sys/dev/hatm/if_hatm_rx.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c index a7c2452431ff..b084b9e17ecf 100644 --- a/sys/dev/hatm/if_hatm_tx.c +++ b/sys/dev/hatm/if_hatm_tx.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatmconf.h b/sys/dev/hatm/if_hatmconf.h index 9d2d794c1339..5402697410d7 100644 --- a/sys/dev/hatm/if_hatmconf.h +++ b/sys/dev/hatm/if_hatmconf.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatmreg.h b/sys/dev/hatm/if_hatmreg.h index 7e88a5c61e5a..9085f07f5a4b 100644 --- a/sys/dev/hatm/if_hatmreg.h +++ b/sys/dev/hatm/if_hatmreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h index 2ca6f9473031..acddaa1e3555 100644 --- a/sys/dev/hatm/if_hatmvar.h +++ b/sys/dev/hatm/if_hatmvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/hfa/fore.h b/sys/dev/hfa/fore.h index 5b64c31864ae..8f0a17f58a9c 100644 --- a/sys/dev/hfa/fore.h +++ b/sys/dev/hfa/fore.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_aali.h b/sys/dev/hfa/fore_aali.h index 3e00a941072f..93fbf5d587e2 100644 --- a/sys/dev/hfa/fore_aali.h +++ b/sys/dev/hfa/fore_aali.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_command.c b/sys/dev/hfa/fore_command.c index 84b36808445e..c7e38892e460 100644 --- a/sys/dev/hfa/fore_command.c +++ b/sys/dev/hfa/fore_command.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_if.c b/sys/dev/hfa/fore_if.c index f4f796ffa435..51bbd0fb6933 100644 --- a/sys/dev/hfa/fore_if.c +++ b/sys/dev/hfa/fore_if.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_include.h b/sys/dev/hfa/fore_include.h index c23e0cb294f0..93062f451f63 100644 --- a/sys/dev/hfa/fore_include.h +++ b/sys/dev/hfa/fore_include.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_init.c b/sys/dev/hfa/fore_init.c index 6124bdaaefd3..ccaed3f0e085 100644 --- a/sys/dev/hfa/fore_init.c +++ b/sys/dev/hfa/fore_init.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_intr.c b/sys/dev/hfa/fore_intr.c index 9c0f29dabba7..8454b93f2464 100644 --- a/sys/dev/hfa/fore_intr.c +++ b/sys/dev/hfa/fore_intr.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_output.c b/sys/dev/hfa/fore_output.c index a37e2ecb0cba..d4ab4dd921ba 100644 --- a/sys/dev/hfa/fore_output.c +++ b/sys/dev/hfa/fore_output.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_slave.h b/sys/dev/hfa/fore_slave.h index 83960d977e4b..33d73c21dced 100644 --- a/sys/dev/hfa/fore_slave.h +++ b/sys/dev/hfa/fore_slave.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_stats.c b/sys/dev/hfa/fore_stats.c index 17f165724387..4126c1f0635c 100644 --- a/sys/dev/hfa/fore_stats.c +++ b/sys/dev/hfa/fore_stats.c @@ -1,4 +1,4 @@ -/* +/*- * =================================== * HARP | Host ATM Research Platform * =================================== diff --git a/sys/dev/hfa/fore_stats.h b/sys/dev/hfa/fore_stats.h index 53b568f69ebd..32095164d8e4 100644 --- a/sys/dev/hfa/fore_stats.h +++ b/sys/dev/hfa/fore_stats.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_var.h b/sys/dev/hfa/fore_var.h index d0f05b8de114..57cedb3a761f 100644 --- a/sys/dev/hfa/fore_var.h +++ b/sys/dev/hfa/fore_var.h @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hfa/fore_vcm.c b/sys/dev/hfa/fore_vcm.c index cd0dd3c495df..95bc6524be99 100644 --- a/sys/dev/hfa/fore_vcm.c +++ b/sys/dev/hfa/fore_vcm.c @@ -1,4 +1,4 @@ -/* +/*- * * =================================== * HARP | Host ATM Research Platform diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index 2f3bebc60bee..2df4de7dca7e 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -1,6 +1,6 @@ /* $OpenBSD: hifn7751.c,v 1.120 2002/05/17 00:33:34 deraadt Exp $ */ -/* +/*- * Invertex AEON / Hifn 7751 driver * Copyright (c) 1999 Invertex Inc. All rights reserved. * Copyright (c) 1999 Theo de Raadt diff --git a/sys/dev/hifn/hifn7751reg.h b/sys/dev/hifn/hifn7751reg.h index 5f7099aa0668..8114f3f9d06c 100644 --- a/sys/dev/hifn/hifn7751reg.h +++ b/sys/dev/hifn/hifn7751reg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD: hifn7751reg.h,v 1.35 2002/04/08 17:49:42 jason Exp $ */ -/* +/*- * Invertex AEON / Hifn 7751 driver * Copyright (c) 1999 Invertex Inc. All rights reserved. * Copyright (c) 1999 Theo de Raadt diff --git a/sys/dev/hifn/hifn7751var.h b/sys/dev/hifn/hifn7751var.h index e3bd2f66e3d1..a92d77ba45d7 100644 --- a/sys/dev/hifn/hifn7751var.h +++ b/sys/dev/hifn/hifn7751var.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD: hifn7751var.h,v 1.42 2002/04/08 17:49:42 jason Exp $ */ -/* +/*- * Invertex AEON / Hifn 7751 driver * Copyright (c) 1999 Invertex Inc. All rights reserved. * Copyright (c) 1999 Theo de Raadt diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 16f8fb0c17ef..b5766d659bd4 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/hptmv/global.h b/sys/dev/hptmv/global.h index 3b8d99c5dfbb..3f8d4dd7ae3b 100644 --- a/sys/dev/hptmv/global.h +++ b/sys/dev/hptmv/global.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/hptmv/hptintf.h b/sys/dev/hptmv/hptintf.h index 5b54475593e7..9839a6718271 100644 --- a/sys/dev/hptmv/hptintf.h +++ b/sys/dev/hptmv/hptintf.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/hptmv/mv.c b/sys/dev/hptmv/mv.c index b135bfa2215c..474b3d5ddb23 100644 --- a/sys/dev/hptmv/mv.c +++ b/sys/dev/hptmv/mv.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/hptmv/mvOs.h b/sys/dev/hptmv/mvOs.h index 3325d14c7cc1..2c0a5f4b1c66 100644 --- a/sys/dev/hptmv/mvOs.h +++ b/sys/dev/hptmv/mvOs.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/hptmv/osbsd.h b/sys/dev/hptmv/osbsd.h index f9a41fcb73a4..5637c44c5e9a 100644 --- a/sys/dev/hptmv/osbsd.h +++ b/sys/dev/hptmv/osbsd.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 HighPoint Technologies, Inc. * All rights reserved. * diff --git a/sys/dev/ic/cd180.h b/sys/dev/ic/cd180.h index a9a5a83348e0..ae46a4809b68 100644 --- a/sys/dev/ic/cd180.h +++ b/sys/dev/ic/cd180.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. * All rights reserved. diff --git a/sys/dev/ic/hd64570.h b/sys/dev/ic/hd64570.h index b676e25a9cd5..3399e0a0de57 100644 --- a/sys/dev/ic/hd64570.h +++ b/sys/dev/ic/hd64570.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 John Hay. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ic/sab82532.h b/sys/dev/ic/sab82532.h index 1dd33bd52d7a..e570c6a9ae5f 100644 --- a/sys/dev/ic/sab82532.h +++ b/sys/dev/ic/sab82532.h @@ -1,6 +1,6 @@ /* $OpenBSD: sab82532reg.h,v 1.2 2002/04/08 17:49:42 jason Exp $ */ -/* +/*- * Copyright (c) 2001 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/ic/wd33c93reg.h b/sys/dev/ic/wd33c93reg.h index c286c65a16eb..8e536cd1d32d 100644 --- a/sys/dev/ic/wd33c93reg.h +++ b/sys/dev/ic/wd33c93reg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $NecBSD: wd33c93reg.h,v 1.21.24.1 2001/06/13 05:52:05 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ic/z8530.h b/sys/dev/ic/z8530.h index d6db68d80ec0..d86a662a1d0b 100644 --- a/sys/dev/ic/z8530.h +++ b/sys/dev/ic/z8530.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index 0d8dd59b07a3..2d92a65f9fe5 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -1,5 +1,4 @@ - -/* +/*- * ichsmb.c * * Author: Archie Cobbs diff --git a/sys/dev/ichsmb/ichsmb_reg.h b/sys/dev/ichsmb/ichsmb_reg.h index ca0577c7d178..a031607f4fdc 100644 --- a/sys/dev/ichsmb/ichsmb_reg.h +++ b/sys/dev/ichsmb/ichsmb_reg.h @@ -1,5 +1,4 @@ - -/* +/*- * ichsmb_reg.h * * Copyright (c) 2000 Whistle Communications, Inc. diff --git a/sys/dev/ichsmb/ichsmb_var.h b/sys/dev/ichsmb/ichsmb_var.h index 99abbe55afbe..d8def6de9c48 100644 --- a/sys/dev/ichsmb/ichsmb_var.h +++ b/sys/dev/ichsmb/ichsmb_var.h @@ -1,5 +1,4 @@ - -/* +/*- * ichsmb_var.h * * Copyright (c) 2000 Whistle Communications, Inc. diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c index 73f871990c2f..893efbd722d4 100644 --- a/sys/dev/ichwd/ichwd.c +++ b/sys/dev/ichwd/ichwd.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 Texas A&M University * All rights reserved. * diff --git a/sys/dev/ichwd/ichwd.h b/sys/dev/ichwd/ichwd.h index ab0e117fbdf8..ef08b2ff7ef5 100644 --- a/sys/dev/ichwd/ichwd.h +++ b/sys/dev/ichwd/ichwd.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 Texas A&M University * All rights reserved. * diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index be247864ab96..a4f8cd535522 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Jonathan Lemon * Copyright (c) 1999 by Matthew N. Dodd * All Rights Reserved. diff --git a/sys/dev/idt/idt.c b/sys/dev/idt/idt.c index 0edceeb9bb10..fbcd9161ab04 100644 --- a/sys/dev/idt/idt.c +++ b/sys/dev/idt/idt.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Richard Hodges and Matriplex, inc. * All rights reserved. * diff --git a/sys/dev/idt/idt_harp.c b/sys/dev/idt/idt_harp.c index 61cbdf9d1a7c..4659c4689037 100644 --- a/sys/dev/idt/idt_harp.c +++ b/sys/dev/idt/idt_harp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Richard Hodges and Matriplex, inc. * All rights reserved. * diff --git a/sys/dev/idt/idt_pci.c b/sys/dev/idt/idt_pci.c index 1112d31d48ae..035b68f96f4c 100644 --- a/sys/dev/idt/idt_pci.c +++ b/sys/dev/idt/idt_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Richard Hodges and Matriplex, inc. * All rights reserved. * diff --git a/sys/dev/idt/idtreg.h b/sys/dev/idt/idtreg.h index 43ede7e292da..230bbbb1c78c 100644 --- a/sys/dev/idt/idtreg.h +++ b/sys/dev/idt/idtreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Richard Hodges and Matriplex, inc. * All rights reserved. * diff --git a/sys/dev/idt/idtvar.h b/sys/dev/idt/idtvar.h index 6761a00ee4df..b98ee1af2dad 100644 --- a/sys/dev/idt/idtvar.h +++ b/sys/dev/idt/idtvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000, 2001 Richard Hodges and Matriplex, inc. * All rights reserved. * diff --git a/sys/dev/ie/if_iee16.h b/sys/dev/ie/if_iee16.h index dcd8bae8155a..1196676cfed2 100644 --- a/sys/dev/ie/if_iee16.h +++ b/sys/dev/ie/if_iee16.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993, 1994, 1995 * Rodney W. Grimes, Milwaukie, Oregon 97222. All rights reserved. * diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 5a6578d48942..f075a27c7c2c 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/if_ndis/if_ndis_pccard.c b/sys/dev/if_ndis/if_ndis_pccard.c index 8f26eaca8552..0786b016020b 100644 --- a/sys/dev/if_ndis/if_ndis_pccard.c +++ b/sys/dev/if_ndis/if_ndis_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index 00f4086ab157..8af48f4a0304 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/if_ndis/if_ndisvar.h b/sys/dev/if_ndis/if_ndisvar.h index 339d965a8195..8da9b39fc00d 100644 --- a/sys/dev/if_ndis/if_ndisvar.h +++ b/sys/dev/if_ndis/if_ndisvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/iicbus/iicbb_if.m b/sys/dev/iicbus/iicbb_if.m index 564274166968..7d10fe748b22 100644 --- a/sys/dev/iicbus/iicbb_if.m +++ b/sys/dev/iicbus/iicbb_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1998 Nicolas Souchu # All rights reserved. # diff --git a/sys/dev/iicbus/iicbus_if.m b/sys/dev/iicbus/iicbus_if.m index eddc022b97d7..068cf4d86ff3 100644 --- a/sys/dev/iicbus/iicbus_if.m +++ b/sys/dev/iicbus/iicbus_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1998 Nicolas Souchu # All rights reserved. # diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c index b1c9992827c5..60b2962e64fd 100644 --- a/sys/dev/iir/iir.c +++ b/sys/dev/iir/iir.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-04 ICP vortex GmbH * Copyright (c) 2002-04 Intel Corporation * Copyright (c) 2003-04 Adaptec Inc. diff --git a/sys/dev/iir/iir.h b/sys/dev/iir/iir.h index 688cf634d153..830cf087e9c5 100644 --- a/sys/dev/iir/iir.h +++ b/sys/dev/iir/iir.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000-04 ICP vortex GmbH * Copyright (c) 2002-04 Intel Corporation * Copyright (c) 2003-04 Adaptec Inc. diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c index 4d976b3e9e81..172d85bd22ba 100644 --- a/sys/dev/iir/iir_ctrl.c +++ b/sys/dev/iir/iir_ctrl.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-03 ICP vortex GmbH * Copyright (c) 2002-03 Intel Corporation * Copyright (c) 2003 Adaptec Inc. diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index a12c3d4472b9..704acb9f3e46 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Machine and OS Independent (well, as best as possible) * code for the Qlogic ISP SCSI adapters. * diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 986fc8d6cb9f..8a9642a259ff 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -1,4 +1,4 @@ -/* +/*- * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. * * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index 3f60a948a3b6..4b1586c1b295 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob * diff --git a/sys/dev/isp/isp_inline.h b/sys/dev/isp/isp_inline.h index 6bc54fbf08e7..e78eb7621c1b 100644 --- a/sys/dev/isp/isp_inline.h +++ b/sys/dev/isp/isp_inline.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Qlogic Host Adapter Inline Functions * * Copyright (c) 1999, 2000, 2001 by Matthew Jacob diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h index 93ccc53f9ceb..921272aa2490 100644 --- a/sys/dev/isp/isp_ioctl.h +++ b/sys/dev/isp/isp_ioctl.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2001 by Matthew Jacob * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c index d26d1e35d427..1d4dc6bd86e5 100644 --- a/sys/dev/isp/isp_target.c +++ b/sys/dev/isp/isp_target.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Machine and OS Independent Target Mode Code for the Qlogic SCSI/FC adapters. * * Copyright (c) 1999, 2000, 2001 by Matthew Jacob diff --git a/sys/dev/isp/isp_target.h b/sys/dev/isp/isp_target.h index c0bbc89fb11e..2156da118789 100644 --- a/sys/dev/isp/isp_target.h +++ b/sys/dev/isp/isp_target.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Qlogic Target Mode Structure and Flag Definitions * * Copyright (c) 1997, 1998 diff --git a/sys/dev/isp/isp_tpublic.h b/sys/dev/isp/isp_tpublic.h index 358e956036d9..a2773323d68e 100644 --- a/sys/dev/isp/isp_tpublic.h +++ b/sys/dev/isp/isp_tpublic.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Qlogic ISP Host Adapter Public Target Interface Structures && Routines *--------------------------------------- * Copyright (c) 2000 by Matthew Jacob diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index 77aeb00c5ec9..4834fd32c79b 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob diff --git a/sys/dev/isp/ispreg.h b/sys/dev/isp/ispreg.h index 2f51790819e2..163ac9894d90 100644 --- a/sys/dev/isp/ispreg.h +++ b/sys/dev/isp/ispreg.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Machine Independent (well, as best as possible) register * definitions for Qlogic ISP SCSI adapters. * diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 1e99dc9b5c4b..d4bdb0d4648d 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Soft Definitions for for Qlogic ISP SCSI adapters. * * Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob diff --git a/sys/dev/ispfw/asm_1000.h b/sys/dev/ispfw/asm_1000.h index 965d0b084d7c..fb064094d30b 100644 --- a/sys/dev/ispfw/asm_1000.h +++ b/sys/dev/ispfw/asm_1000.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_1040.h b/sys/dev/ispfw/asm_1040.h index dbb3992e67e8..9e78a56e5c11 100644 --- a/sys/dev/ispfw/asm_1040.h +++ b/sys/dev/ispfw/asm_1040.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_1080.h b/sys/dev/ispfw/asm_1080.h index de896a08b5df..edb0ad711a28 100644 --- a/sys/dev/ispfw/asm_1080.h +++ b/sys/dev/ispfw/asm_1080.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_12160.h b/sys/dev/ispfw/asm_12160.h index 7279007f29b1..bc1d42089853 100644 --- a/sys/dev/ispfw/asm_12160.h +++ b/sys/dev/ispfw/asm_12160.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_2100.h b/sys/dev/ispfw/asm_2100.h index f593ec3f45cf..399707d57543 100644 --- a/sys/dev/ispfw/asm_2100.h +++ b/sys/dev/ispfw/asm_2100.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_2200.h b/sys/dev/ispfw/asm_2200.h index 8bd389f236c8..3d92bf7c99e4 100644 --- a/sys/dev/ispfw/asm_2200.h +++ b/sys/dev/ispfw/asm_2200.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ispfw/asm_2300.h b/sys/dev/ispfw/asm_2300.h index 152b05700639..7a553b01ce0d 100644 --- a/sys/dev/ispfw/asm_2300.h +++ b/sys/dev/ispfw/asm_2300.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 2001 Qlogic, Inc. * All rights reserved. * diff --git a/sys/dev/ixgb/LICENSE b/sys/dev/ixgb/LICENSE index 35e396476bb9..501764514696 100644 --- a/sys/dev/ixgb/LICENSE +++ b/sys/dev/ixgb/LICENSE @@ -1,4 +1,6 @@ /*$FreeBSD$*/ +/*- + Copyright (c) 2001-2004, Intel Corporation All rights reserved. @@ -27,3 +29,5 @@ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ diff --git a/sys/dev/ixgb/if_ixgb.c b/sys/dev/ixgb/if_ixgb.c index cc4739199f9f..6e58eea97b7a 100644 --- a/sys/dev/ixgb/if_ixgb.c +++ b/sys/dev/ixgb/if_ixgb.c @@ -1,4 +1,4 @@ -/************************************************************************** +/******************************************************************************* Copyright (c) 2001-2004, Intel Corporation All rights reserved. diff --git a/sys/dev/ixgb/if_ixgb.h b/sys/dev/ixgb/if_ixgb.h index a8a7a580664b..f0be0062ee52 100644 --- a/sys/dev/ixgb/if_ixgb.h +++ b/sys/dev/ixgb/if_ixgb.h @@ -1,4 +1,4 @@ -/************************************************************************** +/******************************************************************************* Copyright (c) 2001-2004, Intel Corporation All rights reserved. diff --git a/sys/dev/ixgb/if_ixgb_osdep.h b/sys/dev/ixgb/if_ixgb_osdep.h index 999863cc59a7..31ba6846abab 100644 --- a/sys/dev/ixgb/if_ixgb_osdep.h +++ b/sys/dev/ixgb/if_ixgb_osdep.h @@ -1,4 +1,4 @@ -/************************************************************************** +/******************************************************************************* Copyright (c) 2001-2004, Intel Corporation All rights reserved. diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index 12912f2298d0..6a8ab86f8b77 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/lge/if_lgereg.h b/sys/dev/lge/if_lgereg.h index 28a6aec85f41..7c552b03f2e0 100644 --- a/sys/dev/lge/if_lgereg.h +++ b/sys/dev/lge/if_lgereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/lnc/if_lnc_cbus.c b/sys/dev/lnc/if_lnc_cbus.c index c03afc6b4ddb..c52d56ecc3f5 100644 --- a/sys/dev/lnc/if_lnc_cbus.c +++ b/sys/dev/lnc/if_lnc_cbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994-2000 * Paul Richards. All rights reserved. * diff --git a/sys/dev/lnc/if_lnc_isa.c b/sys/dev/lnc/if_lnc_isa.c index 5f6ed66abb36..f53fd4629fd3 100644 --- a/sys/dev/lnc/if_lnc_isa.c +++ b/sys/dev/lnc/if_lnc_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994-2000 * Paul Richards. All rights reserved. * diff --git a/sys/dev/matcd/creativeif.h b/sys/dev/matcd/creativeif.h index 739550b27c84..adf5b005ab4b 100644 --- a/sys/dev/matcd/creativeif.h +++ b/sys/dev/matcd/creativeif.h @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c index aead16c72ef5..b73112de7f76 100644 --- a/sys/dev/matcd/matcd.c +++ b/sys/dev/matcd/matcd.c @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/matcd/matcd_data.h b/sys/dev/matcd/matcd_data.h index 1923cec4cbcc..08983cf71d30 100644 --- a/sys/dev/matcd/matcd_data.h +++ b/sys/dev/matcd/matcd_data.h @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/matcd/matcd_isa.c b/sys/dev/matcd/matcd_isa.c index 48d01dd23788..978ede8c2a7f 100644 --- a/sys/dev/matcd/matcd_isa.c +++ b/sys/dev/matcd/matcd_isa.c @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/matcd/matcddrv.h b/sys/dev/matcd/matcddrv.h index b2f069e0bec1..e7ffd5dc3ea7 100644 --- a/sys/dev/matcd/matcddrv.h +++ b/sys/dev/matcd/matcddrv.h @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/matcd/options.h b/sys/dev/matcd/options.h index fe0c8f2adc03..3abf958de6cc 100644 --- a/sys/dev/matcd/options.h +++ b/sys/dev/matcd/options.h @@ -2,7 +2,8 @@ Matsushita(Panasonic) / Creative CD-ROM Driver (matcd) Authored by Frank Durda IV - +*/ +/*- Copyright 1994, 1995, 2002, 2003 Frank Durda IV. All rights reserved. "FDIV" is a trademark of Frank Durda IV. diff --git a/sys/dev/mc146818/mc146818.c b/sys/dev/mc146818/mc146818.c index 48d36a729a92..4d0919341487 100644 --- a/sys/dev/mc146818/mc146818.c +++ b/sys/dev/mc146818/mc146818.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Izumi Tsutsui. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mc146818/mc146818reg.h b/sys/dev/mc146818/mc146818reg.h index 48d558cc78d4..3aab55f56a5a 100644 --- a/sys/dev/mc146818/mc146818reg.h +++ b/sys/dev/mc146818/mc146818reg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/mc146818/mc146818var.h b/sys/dev/mc146818/mc146818var.h index 78d9945f686f..4e8600cd04e1 100644 --- a/sys/dev/mc146818/mc146818var.h +++ b/sys/dev/mc146818/mc146818var.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Izumi Tsutsui. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 0af98c887d68..db351909c652 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright 1993 by Holger Veit (data part) * Copyright 1993 by Brian Moore (audio part) * Changes Copyright 1993 by Gary Clark II diff --git a/sys/dev/mcd/mcdreg.h b/sys/dev/mcd/mcdreg.h index cc8a3ab7163a..7a255afa04df 100644 --- a/sys/dev/mcd/mcdreg.h +++ b/sys/dev/mcd/mcdreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright 1993 by Holger Veit (data part) * Copyright 1993 by Brian Moore (audio part) * Changes Copyright 1993 by Gary Clark II diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index f9c72b2917fa..a152f67d778e 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1,4 +1,4 @@ -/* +/*- * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you @@ -10,7 +10,7 @@ * */ -/* +/*- * The following functions are based in the vn(4) driver: mdstart_swap(), * mdstart_vnode(), mdcreate_swap(), mdcreate_vnode() and mddestroy(), * and as such under the following copyright: diff --git a/sys/dev/mii/acphy.c b/sys/dev/mii/acphy.c index 78aa5561b7f6..aba0b26f9bdf 100644 --- a/sys/dev/mii/acphy.c +++ b/sys/dev/mii/acphy.c @@ -35,7 +35,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/amphy.c b/sys/dev/mii/amphy.c index ca13a844892d..dac0938ec1ba 100644 --- a/sys/dev/mii/amphy.c +++ b/sys/dev/mii/amphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/amphyreg.h b/sys/dev/mii/amphyreg.h index ffc362a8c7b1..6cdbc95647b5 100644 --- a/sys/dev/mii/amphyreg.h +++ b/sys/dev/mii/amphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/bmtphy.c b/sys/dev/mii/bmtphy.c index c180b5ef5928..b086c8680ef3 100644 --- a/sys/dev/mii/bmtphy.c +++ b/sys/dev/mii/bmtphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/mii/bmtphyreg.h b/sys/dev/mii/bmtphyreg.h index 7f2956ad0b75..223d631a54d5 100644 --- a/sys/dev/mii/bmtphyreg.h +++ b/sys/dev/mii/bmtphyreg.h @@ -1,4 +1,3 @@ - /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 85cf768b2263..9e62df19ac1f 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/brgphyreg.h b/sys/dev/mii/brgphyreg.h index 786f49dae8d5..bb9636d882fb 100644 --- a/sys/dev/mii/brgphyreg.h +++ b/sys/dev/mii/brgphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c index 03a71d528349..86567c004715 100644 --- a/sys/dev/mii/ciphy.c +++ b/sys/dev/mii/ciphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/ciphyreg.h b/sys/dev/mii/ciphyreg.h index 2822ac18704c..8c0a8a46cc61 100644 --- a/sys/dev/mii/ciphyreg.h +++ b/sys/dev/mii/ciphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c index 28affb81063c..ddf9b7e2a605 100644 --- a/sys/dev/mii/dcphy.c +++ b/sys/dev/mii/dcphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/e1000phy.c b/sys/dev/mii/e1000phy.c index 2dc1448988a0..7894e95f06be 100644 --- a/sys/dev/mii/e1000phy.c +++ b/sys/dev/mii/e1000phy.c @@ -1,4 +1,4 @@ -/* +/*- * Principal Author: Parag Patel * Copyright (c) 2001 * All rights reserved. diff --git a/sys/dev/mii/e1000phyreg.h b/sys/dev/mii/e1000phyreg.h index bdfc665f8901..14bf6124e69a 100644 --- a/sys/dev/mii/e1000phyreg.h +++ b/sys/dev/mii/e1000phyreg.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Principal Author: Parag Patel * Copyright (c) 2001 * All rights reserved. @@ -30,7 +30,7 @@ * Secondary Author: Matthew Jacob */ -/* +/*- * Derived by information released by Intel under the following license: * * Copyright (c) 1999 - 2001, Intel Corporation diff --git a/sys/dev/mii/exphy.c b/sys/dev/mii/exphy.c index 914577289fd9..afb90137388b 100644 --- a/sys/dev/mii/exphy.c +++ b/sys/dev/mii/exphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c index db5c1002d757..e4d0c1916748 100644 --- a/sys/dev/mii/lxtphy.c +++ b/sys/dev/mii/lxtphy.c @@ -38,7 +38,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/mii.h b/sys/dev/mii/mii.h index 963c22617722..0f1a4426e6fe 100644 --- a/sys/dev/mii/mii.h +++ b/sys/dev/mii/mii.h @@ -1,6 +1,6 @@ /* $NetBSD: mii.h,v 1.9 2001/05/31 03:07:14 thorpej Exp $ */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Modification to match BSD/OS 3.0 MII interface by Jason R. Thorpe, diff --git a/sys/dev/mii/mlphy.c b/sys/dev/mii/mlphy.c index ecb84f776979..9b2693314ba5 100644 --- a/sys/dev/mii/mlphy.c +++ b/sys/dev/mii/mlphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/nsgphy.c b/sys/dev/mii/nsgphy.c index 8c74a39bb4e7..259739e15a81 100644 --- a/sys/dev/mii/nsgphy.c +++ b/sys/dev/mii/nsgphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/mii/nsgphyreg.h b/sys/dev/mii/nsgphyreg.h index c7680f1e8a3c..44899191715e 100644 --- a/sys/dev/mii/nsgphyreg.h +++ b/sys/dev/mii/nsgphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/mii/nsphy.c b/sys/dev/mii/nsphy.c index 70676ddc1e4f..05941492947d 100644 --- a/sys/dev/mii/nsphy.c +++ b/sys/dev/mii/nsphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/pnaphy.c b/sys/dev/mii/pnaphy.c index 50986dc52f5c..6f3ab65a9deb 100644 --- a/sys/dev/mii/pnaphy.c +++ b/sys/dev/mii/pnaphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Berkeley Software Design, Inc. * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c index 2f09eeb3d09b..9c92ed8a5de3 100644 --- a/sys/dev/mii/qsphy.c +++ b/sys/dev/mii/qsphy.c @@ -38,7 +38,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/rgephy.c b/sys/dev/mii/rgephy.c index 98609db14d26..ad384a93e82e 100644 --- a/sys/dev/mii/rgephy.c +++ b/sys/dev/mii/rgephy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/rgephyreg.h b/sys/dev/mii/rgephyreg.h index 1adecf4611cb..0ce44dfcd9ac 100644 --- a/sys/dev/mii/rgephyreg.h +++ b/sys/dev/mii/rgephyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c index 2e93373d84bf..f9c9b5e3102c 100644 --- a/sys/dev/mii/rlphy.c +++ b/sys/dev/mii/rlphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/tdkphy.c b/sys/dev/mii/tdkphy.c index c5efb691683b..8ae7b0506d01 100644 --- a/sys/dev/mii/tdkphy.c +++ b/sys/dev/mii/tdkphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/mii/tdkphyreg.h b/sys/dev/mii/tdkphyreg.h index 1f106251b607..4429c9481ec7 100644 --- a/sys/dev/mii/tdkphyreg.h +++ b/sys/dev/mii/tdkphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c index ff00a4708312..f07e33e16c43 100644 --- a/sys/dev/mii/tlphy.c +++ b/sys/dev/mii/tlphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/tlphyreg.h b/sys/dev/mii/tlphyreg.h index 77e4a45700bd..a016f4cc6910 100644 --- a/sys/dev/mii/tlphyreg.h +++ b/sys/dev/mii/tlphyreg.h @@ -1,6 +1,6 @@ /* $NetBSD: tlphyreg.h,v 1.1 1998/08/10 23:59:58 thorpej Exp $ */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/ukphy.c b/sys/dev/mii/ukphy.c index c75bd6cfa820..2d87b565c241 100644 --- a/sys/dev/mii/ukphy.c +++ b/sys/dev/mii/ukphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1997 Manuel Bouyer. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mii/xmphy.c b/sys/dev/mii/xmphy.c index 1270c42c154a..c6d2ee9b383a 100644 --- a/sys/dev/mii/xmphy.c +++ b/sys/dev/mii/xmphy.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mii/xmphyreg.h b/sys/dev/mii/xmphyreg.h index e06b1970831e..1e828e1681a1 100644 --- a/sys/dev/mii/xmphyreg.h +++ b/sys/dev/mii/xmphyreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/mpt/mpilib/fc_log.h b/sys/dev/mpt/mpilib/fc_log.h index 2b02a9ac95b3..fd68bf645931 100644 --- a/sys/dev/mpt/mpilib/fc_log.h +++ b/sys/dev/mpt/mpilib/fc_log.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi.h b/sys/dev/mpt/mpilib/mpi.h index a3fab3c2aeb9..1044d8205ca7 100644 --- a/sys/dev/mpt/mpilib/mpi.h +++ b/sys/dev/mpt/mpilib/mpi.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_cnfg.h b/sys/dev/mpt/mpilib/mpi_cnfg.h index 6008f4227771..356aee748696 100644 --- a/sys/dev/mpt/mpilib/mpi_cnfg.h +++ b/sys/dev/mpt/mpilib/mpi_cnfg.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_fc.h b/sys/dev/mpt/mpilib/mpi_fc.h index 60487e139d69..470d385ed5ab 100644 --- a/sys/dev/mpt/mpilib/mpi_fc.h +++ b/sys/dev/mpt/mpilib/mpi_fc.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_init.h b/sys/dev/mpt/mpilib/mpi_init.h index 78545889f819..527b1f9ab7e5 100644 --- a/sys/dev/mpt/mpilib/mpi_init.h +++ b/sys/dev/mpt/mpilib/mpi_init.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_ioc.h b/sys/dev/mpt/mpilib/mpi_ioc.h index e2e8f43fe81e..a8f8d3e1bc7e 100644 --- a/sys/dev/mpt/mpilib/mpi_ioc.h +++ b/sys/dev/mpt/mpilib/mpi_ioc.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_lan.h b/sys/dev/mpt/mpilib/mpi_lan.h index 0c2a137b3517..ceaf353a54e7 100644 --- a/sys/dev/mpt/mpilib/mpi_lan.h +++ b/sys/dev/mpt/mpilib/mpi_lan.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_raid.h b/sys/dev/mpt/mpilib/mpi_raid.h index c78a600b64a5..196f1ba00d6a 100644 --- a/sys/dev/mpt/mpilib/mpi_raid.h +++ b/sys/dev/mpt/mpilib/mpi_raid.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_targ.h b/sys/dev/mpt/mpilib/mpi_targ.h index f212c62d13dc..ba8b2ca7b553 100644 --- a/sys/dev/mpt/mpilib/mpi_targ.h +++ b/sys/dev/mpt/mpilib/mpi_targ.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpilib/mpi_type.h b/sys/dev/mpt/mpilib/mpi_type.h index becf1a0747c4..c10cb92bbc8d 100644 --- a/sys/dev/mpt/mpilib/mpi_type.h +++ b/sys/dev/mpt/mpilib/mpi_type.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000, 2001 by LSI Logic Corporation * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c index 99c0faf37cc7..9e6e144678f9 100644 --- a/sys/dev/mpt/mpt.c +++ b/sys/dev/mpt/mpt.c @@ -1,4 +1,4 @@ -/* +/*- * Generic routines for LSI '909 FC adapters. * FreeBSD Version. * diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h index 82e8cf518752..8161d2412575 100644 --- a/sys/dev/mpt/mpt.h +++ b/sys/dev/mpt/mpt.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Generic defines for LSI '909 FC adapters. * FreeBSD Version. * diff --git a/sys/dev/mpt/mpt_debug.c b/sys/dev/mpt/mpt_debug.c index d7ec166aee36..84ea8ddd27ad 100644 --- a/sys/dev/mpt/mpt_debug.c +++ b/sys/dev/mpt/mpt_debug.c @@ -1,4 +1,4 @@ -/* +/*- * Debug routines for LSI '909 FC adapters. * FreeBSD Version. * diff --git a/sys/dev/mpt/mpt_freebsd.c b/sys/dev/mpt/mpt_freebsd.c index 58e147db1806..d7bb43055066 100644 --- a/sys/dev/mpt/mpt_freebsd.c +++ b/sys/dev/mpt/mpt_freebsd.c @@ -1,4 +1,4 @@ -/* +/*- * FreeBSD/CAM specific routines for LSI '909 FC adapters. * FreeBSD Version. * diff --git a/sys/dev/mpt/mpt_freebsd.h b/sys/dev/mpt/mpt_freebsd.h index 991e56e5e6bd..49e6f4e0c371 100644 --- a/sys/dev/mpt/mpt_freebsd.h +++ b/sys/dev/mpt/mpt_freebsd.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * LSI MPT Host Adapter FreeBSD Wrapper Definitions (CAM version) * * Copyright (c) 2000, 2001 by Greg Ansley, Adam Prewett diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index 8a827d1eb30d..6847f16e589d 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/mse/mse_cbus.c b/sys/dev/mse/mse_cbus.c index 8fd99559e1d3..60129e7842ae 100644 --- a/sys/dev/mse/mse_cbus.c +++ b/sys/dev/mse/mse_cbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/mse/mse_isa.c b/sys/dev/mse/mse_isa.c index d06bfa80999c..1bf0669b57d8 100644 --- a/sys/dev/mse/mse_isa.c +++ b/sys/dev/mse/mse_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/mse/msevar.h b/sys/dev/mse/msevar.h index edbb482a77a3..37ca728cfc90 100644 --- a/sys/dev/mse/msevar.h +++ b/sys/dev/mse/msevar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/my/if_myreg.h b/sys/dev/my/if_myreg.h index ccc7338a9eb7..9d889d12acef 100644 --- a/sys/dev/my/if_myreg.h +++ b/sys/dev/my/if_myreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Myson Technology Inc. * All rights reserved. * diff --git a/sys/dev/ncv/ncr53c500.c b/sys/dev/ncv/ncr53c500.c index dbb8ea9df3a7..346c09aebda8 100644 --- a/sys/dev/ncv/ncr53c500.c +++ b/sys/dev/ncv/ncr53c500.c @@ -5,7 +5,7 @@ #define NCV_STATICS #define NCV_IO_CONTROL_FLAGS (0) -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c index 1e97372aa263..fddb9e2fe04d 100644 --- a/sys/dev/ncv/ncr53c500_pccard.c +++ b/sys/dev/ncv/ncr53c500_pccard.c @@ -1,7 +1,7 @@ /* $NecBSD: ncr53c500_pisa.c,v 1.28 1998/11/26 01:59:11 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [Ported for FreeBSD] * Copyright (c) 2000 * Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe. diff --git a/sys/dev/ncv/ncr53c500hw.h b/sys/dev/ncv/ncr53c500hw.h index cf1228855515..7a4b337b8985 100644 --- a/sys/dev/ncv/ncr53c500hw.h +++ b/sys/dev/ncv/ncr53c500hw.h @@ -2,7 +2,7 @@ /* $NecBSD: ncr53c500hw.h,v 1.6.18.1 2001/06/08 06:27:44 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ncv/ncr53c500hwtab.h b/sys/dev/ncv/ncr53c500hwtab.h index 7e16b9e72fbd..47406b1947e4 100644 --- a/sys/dev/ncv/ncr53c500hwtab.h +++ b/sys/dev/ncv/ncr53c500hwtab.h @@ -2,7 +2,7 @@ /* $NecBSD: ncr53c500hwtab.h,v 1.2.18.1 2001/06/08 06:27:44 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ncv/ncr53c500reg.h b/sys/dev/ncv/ncr53c500reg.h index 0296c5eae004..2a9906e44cdf 100644 --- a/sys/dev/ncv/ncr53c500reg.h +++ b/sys/dev/ncv/ncr53c500reg.h @@ -2,7 +2,7 @@ /* $NecBSD: ncr53c500reg.h,v 1.5.14.1 2001/06/08 06:27:44 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ncv/ncr53c500var.h b/sys/dev/ncv/ncr53c500var.h index 6d5edce9cae7..b3aff4660f0d 100644 --- a/sys/dev/ncv/ncr53c500var.h +++ b/sys/dev/ncv/ncr53c500var.h @@ -2,7 +2,7 @@ /* $NecBSD: ncr53c500var.h,v 1.11.18.1 2001/06/08 06:27:45 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 070e177482a2..1958301546be 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/nge/if_ngereg.h b/sys/dev/nge/if_ngereg.h index e27359fc8645..5a46aa64038a 100644 --- a/sys/dev/nge/if_ngereg.h +++ b/sys/dev/nge/if_ngereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 * Bill Paul . All rights reserved. diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index a408d10ad20d..ccb34673f7b2 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/sys/dev/nsp/nsp.c b/sys/dev/nsp/nsp.c index 954d1bb98898..d955ff2938b2 100644 --- a/sys/dev/nsp/nsp.c +++ b/sys/dev/nsp/nsp.c @@ -8,7 +8,7 @@ NSP_READ_FIFO_INTERRUPTS | NSP_WRITE_FIFO_INTERRUPTS | \ NSP_USE_MEMIO | NSP_WAIT_FOR_SELECT) -/* +/*- * Copyright (c) 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. * diff --git a/sys/dev/nsp/nsp_pccard.c b/sys/dev/nsp/nsp_pccard.c index 4c61b07d122d..3be1cdbba059 100644 --- a/sys/dev/nsp/nsp_pccard.c +++ b/sys/dev/nsp/nsp_pccard.c @@ -1,7 +1,7 @@ /* $NecBSD: nsp_pisa.c,v 1.4 1999/04/15 01:35:54 kmatsuda Exp $ */ /* $NetBSD$ */ -/* +/*- * [Ported for FreeBSD] * Copyright (c) 2000 * Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe. diff --git a/sys/dev/nsp/nspreg.h b/sys/dev/nsp/nspreg.h index 3bfcd9696bcf..81512c91a609 100644 --- a/sys/dev/nsp/nspreg.h +++ b/sys/dev/nsp/nspreg.h @@ -2,7 +2,7 @@ /* $NecBSD: nspreg.h,v 1.4.14.3 2001/06/29 06:27:53 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/nsp/nspvar.h b/sys/dev/nsp/nspvar.h index 57614084834f..59af783ade02 100644 --- a/sys/dev/nsp/nspvar.h +++ b/sys/dev/nsp/nspvar.h @@ -2,7 +2,7 @@ /* $NecBSD: nspvar.h,v 1.7.14.5 2001/06/29 06:27:54 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/ofw/ofw_bus_if.m b/sys/dev/ofw/ofw_bus_if.m index 87e4fcc41e28..edeee5f655b0 100644 --- a/sys/dev/ofw/ofw_bus_if.m +++ b/sys/dev/ofw/ofw_bus_if.m @@ -1,3 +1,4 @@ +#- # Copyright (c) 2001, 2003 by Thomas Moestl # Copyright (c) 2004 by Marius Strobl # All rights reserved. diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 40ac7dc7ca7b..08609944190e 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2001 Benno Rice. * All rights reserved. * diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c index 67a9451d94db..5c759d1cee68 100644 --- a/sys/dev/ofw/ofw_disk.c +++ b/sys/dev/ofw/ofw_disk.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2002 Benno Rice * All rights reserved. * diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index db87a4a2da5c..f7ef330597b3 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -1,6 +1,6 @@ /* $NetBSD: Locore.c,v 1.7 2000/08/20 07:04:59 tsubai Exp $ */ -/* +/*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. * Copyright (C) 1995, 1996 TooLs GmbH. * All rights reserved. @@ -33,7 +33,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (C) 2000 Benno Rice. * All rights reserved. * diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index acbaad741564..28b95b339761 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -1,6 +1,6 @@ /* $NetBSD: openfirm.h,v 1.1 1998/05/15 10:16:00 tsubai Exp $ */ -/* +/*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. * Copyright (C) 1995, 1996 TooLs GmbH. * All rights reserved. diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c index b67a1f8fb015..d9272d1145d3 100644 --- a/sys/dev/ofw/openfirmio.c +++ b/sys/dev/ofw/openfirmio.c @@ -3,7 +3,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/sys/dev/ofw/openfirmio.h b/sys/dev/ofw/openfirmio.h index c4f21d2897a4..bb020262ccba 100644 --- a/sys/dev/ofw/openfirmio.h +++ b/sys/dev/ofw/openfirmio.h @@ -1,6 +1,6 @@ /* $NetBSD: openfirmio.h,v 1.4 2002/09/06 13:23:19 gehenna Exp $ */ -/* +/*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * diff --git a/sys/dev/owi/if_owi.c b/sys/dev/owi/if_owi.c index c8a1aa8693dd..b33da65059cf 100644 --- a/sys/dev/owi/if_owi.c +++ b/sys/dev/owi/if_owi.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/owi/if_owi_pccard.c b/sys/dev/owi/if_owi_pccard.c index 1720820a453d..e51bda006144 100644 --- a/sys/dev/owi/if_owi_pccard.c +++ b/sys/dev/owi/if_owi_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/owi/if_wireg.h b/sys/dev/owi/if_wireg.h index 04de3b3538ce..697463fffcad 100644 --- a/sys/dev/owi/if_wireg.h +++ b/sys/dev/owi/if_wireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/owi/if_wivar.h b/sys/dev/owi/if_wivar.h index 98f197069fd1..a439949e5916 100644 --- a/sys/dev/owi/if_wivar.h +++ b/sys/dev/owi/if_wivar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 * M Warner Losh . All rights reserved. * Copyright (c) 1997, 1998, 1999 diff --git a/sys/dev/patm/genrtab/genrtab.c b/sys/dev/patm/genrtab/genrtab.c index eef0749fc8c4..8d696cfa8ef6 100644 --- a/sys/dev/patm/genrtab/genrtab.c +++ b/sys/dev/patm/genrtab/genrtab.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/idt77252reg.h b/sys/dev/patm/idt77252reg.h index c970568f6ac3..13013a2f1056 100644 --- a/sys/dev/patm/idt77252reg.h +++ b/sys/dev/patm/idt77252reg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm.c b/sys/dev/patm/if_patm.c index 900d1fa7161a..ac01b9586e54 100644 --- a/sys/dev/patm/if_patm.c +++ b/sys/dev/patm/if_patm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm_attach.c b/sys/dev/patm/if_patm_attach.c index dd4a52d0e335..f7847250d2ae 100644 --- a/sys/dev/patm/if_patm_attach.c +++ b/sys/dev/patm/if_patm_attach.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm_intr.c b/sys/dev/patm/if_patm_intr.c index a8f1c3b0a8a7..f17725395d85 100644 --- a/sys/dev/patm/if_patm_intr.c +++ b/sys/dev/patm/if_patm_intr.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm_ioctl.c b/sys/dev/patm/if_patm_ioctl.c index 359d447cec48..6dc669d99ff3 100644 --- a/sys/dev/patm/if_patm_ioctl.c +++ b/sys/dev/patm/if_patm_ioctl.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm_rx.c b/sys/dev/patm/if_patm_rx.c index a008b3563a59..01c32435fb7f 100644 --- a/sys/dev/patm/if_patm_rx.c +++ b/sys/dev/patm/if_patm_rx.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patm_tx.c b/sys/dev/patm/if_patm_tx.c index 112251627f56..0c6a99e185a9 100644 --- a/sys/dev/patm/if_patm_tx.c +++ b/sys/dev/patm/if_patm_tx.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/patm/if_patmvar.h b/sys/dev/patm/if_patmvar.h index f26cf17132e5..5cadbc3522da 100644 --- a/sys/dev/patm/if_patmvar.h +++ b/sys/dev/patm/if_patmvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/pbio/pbio.c b/sys/dev/pbio/pbio.c index 14b21f3957e4..84b883da1bc6 100644 --- a/sys/dev/pbio/pbio.c +++ b/sys/dev/pbio/pbio.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2004 * Diomidis D. Spinellis, Athens, Greece * All rights reserved. diff --git a/sys/dev/pbio/pbioio.h b/sys/dev/pbio/pbioio.h index a2b6c7e615ae..9a08bfab0254 100644 --- a/sys/dev/pbio/pbioio.h +++ b/sys/dev/pbio/pbioio.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2004 * Diomidis D. Spinellis, Athens, Greece * All rights reserved. diff --git a/sys/dev/pccard/card_if.m b/sys/dev/pccard/card_if.m index 40c429eac148..5328bc6daf0f 100644 --- a/sys/dev/pccard/card_if.m +++ b/sys/dev/pccard/card_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1999 M. Warner Losh. # All rights reserved. # diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 3509a8c0690c..020f89494f12 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -1,6 +1,6 @@ /* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */ -/* +/*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 99ec42780503..2fa88efd17cb 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -1,7 +1,7 @@ /* $NetBSD: pcmcia_cis.c,v 1.17 2000/02/10 09:01:52 chopps Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/pccard_cis.h b/sys/dev/pccard/pccard_cis.h index 9c8221cacbe1..d6b9c3899f86 100644 --- a/sys/dev/pccard/pccard_cis.h +++ b/sys/dev/pccard/pccard_cis.h @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/pccard_cis_quirks.c b/sys/dev/pccard/pccard_cis_quirks.c index 7e7bf519fa35..e465e381c741 100644 --- a/sys/dev/pccard/pccard_cis_quirks.c +++ b/sys/dev/pccard/pccard_cis_quirks.c @@ -5,7 +5,7 @@ __FBSDID("$FreeBSD$"); #define PCCARDDEBUG -/* +/*- * Copyright (c) 1998 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/pccardreg.h b/sys/dev/pccard/pccardreg.h index f6f67f8dba80..e0f6647771bc 100644 --- a/sys/dev/pccard/pccardreg.h +++ b/sys/dev/pccard/pccardreg.h @@ -1,7 +1,7 @@ /* $NetBSD: pcmciareg.h,v 1.7 1998/10/29 09:45:52 enami Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index e6aa22f6b383..37835e2bbebb 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -1,7 +1,7 @@ /* $NetBSD: pcmciavar.h,v 1.12 2000/02/08 12:51:31 enami Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1997 Marc Horowitz. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccard/power_if.m b/sys/dev/pccard/power_if.m index d661d5c5ccd9..a85fd01e50e0 100644 --- a/sys/dev/pccard/power_if.m +++ b/sys/dev/pccard/power_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1999 M. Warner Losh. # All rights reserved. # diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 418696e2bc2a..363515637519 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2004 M. Warner Losh. * Copyright (c) 2000-2001 Jonathan Chen. * All rights reserved. diff --git a/sys/dev/pccbb/pccbb_isa.c b/sys/dev/pccbb/pccbb_isa.c index 9d5818e25865..e173ab29352f 100644 --- a/sys/dev/pccbb/pccbb_isa.c +++ b/sys/dev/pccbb/pccbb_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2004 M. Warner Losh. * All rights reserved. * diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 280141584222..461a85f329d1 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002-2004 M. Warner Losh. * Copyright (c) 2000-2001 Jonathan Chen. * All rights reserved. diff --git a/sys/dev/pccbb/pccbbdevid.h b/sys/dev/pccbb/pccbbdevid.h index 85df56a61f83..0e3ab5b25e6b 100644 --- a/sys/dev/pccbb/pccbbdevid.h +++ b/sys/dev/pccbb/pccbbdevid.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001-2004 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/pccbb/pccbbreg.h b/sys/dev/pccbb/pccbbreg.h index fddf46739cf6..5c892ff499a4 100644 --- a/sys/dev/pccbb/pccbbreg.h +++ b/sys/dev/pccbb/pccbbreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * diff --git a/sys/dev/pccbb/pccbbvar.h b/sys/dev/pccbb/pccbbvar.h index 75458af7398b..61dc600cb0c7 100644 --- a/sys/dev/pccbb/pccbbvar.h +++ b/sys/dev/pccbb/pccbbvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 Warner Losh. * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 5fc6f233b76a..0ef7dd1a0dd8 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, Stefan Esser * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi diff --git a/sys/dev/pci/pci_if.m b/sys/dev/pci/pci_if.m index 635005dc1bcb..107746b25f0a 100644 --- a/sys/dev/pci/pci_if.m +++ b/sys/dev/pci/pci_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1998 Doug Rabson # All rights reserved. # diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h index 041e8e306d14..fdeeaaab2bae 100644 --- a/sys/dev/pci/pci_private.h +++ b/sys/dev/pci/pci_private.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, Stefan Esser * Copyright (c) 2000, Michael Smith * Copyright (c) 2000, BSDi diff --git a/sys/dev/pci/pcib_if.m b/sys/dev/pci/pcib_if.m index 1ea253800563..c9f480e701a3 100644 --- a/sys/dev/pci/pcib_if.m +++ b/sys/dev/pci/pcib_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 2000 Doug Rabson # All rights reserved. # diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 9f0f612848ec..b4de6fd741c5 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, Stefan Esser * All rights reserved. * diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 38eaa1d8c2cc..75bc8d3f9e4d 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, Stefan Esser * All rights reserved. * diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index 3b978d7a9873..251f56e594fb 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1990 William F. Jolitz, TeleMuse * All rights reserved. * diff --git a/sys/dev/ppbus/lptio.h b/sys/dev/ppbus/lptio.h index 8458bc6bd357..e8471d396d20 100644 --- a/sys/dev/ppbus/lptio.h +++ b/sys/dev/ppbus/lptio.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1994 Geoffrey M. Rehmet * * This program is free software; you may redistribute it and/or diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c index 58bbf2c36e0a..0a650552aece 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Sascha Schumann. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ppbus/ppbus_if.m b/sys/dev/ppbus/ppbus_if.m index f21dd837568b..ccc308d23f36 100644 --- a/sys/dev/ppbus/ppbus_if.m +++ b/sys/dev/ppbus/ppbus_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1999 Nicolas Souchu # All rights reserved. # diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c index 033d1fef0a56..bf7c08b41ece 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -1,4 +1,4 @@ -/* +/*- * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you diff --git a/sys/dev/ppc/ppcvar.h b/sys/dev/ppc/ppcvar.h index ad3f74cd316f..9bef9080aa7a 100644 --- a/sys/dev/ppc/ppcvar.h +++ b/sys/dev/ppc/ppcvar.h @@ -1,4 +1,3 @@ - /*- * Copyright (c) 1997-2000 Nicolas Souchu * Copyright (c) 2001 Alcove - Nicolas Souchu diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c index e3f192c4dbc4..d078ad18095f 100644 --- a/sys/dev/puc/puc.c +++ b/sys/dev/puc/puc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1996, 1998, 1999 * Christopher G. Demetriou. All rights reserved. * diff --git a/sys/dev/puc/puc_ebus.c b/sys/dev/puc/puc_ebus.c index c7ddeb40153e..12ac8766c8b8 100644 --- a/sys/dev/puc/puc_ebus.c +++ b/sys/dev/puc/puc_ebus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/puc/puc_pci.c b/sys/dev/puc/puc_pci.c index b4c0cf4ecc69..7d876de81e60 100644 --- a/sys/dev/puc/puc_pci.c +++ b/sys/dev/puc/puc_pci.c @@ -29,7 +29,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1996, 1998, 1999 * Christopher G. Demetriou. All rights reserved. * diff --git a/sys/dev/puc/puc_sbus.c b/sys/dev/puc/puc_sbus.c index 3d2e7d67a81a..44abd0bccd95 100644 --- a/sys/dev/puc/puc_sbus.c +++ b/sys/dev/puc/puc_sbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 24cfcc199e32..ebfbe3952cbc 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -1,6 +1,6 @@ /* $NetBSD: pucdata.c,v 1.25 2001/12/16 22:23:01 thorpej Exp $ */ -/* +/*- * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/puc/pucvar.h b/sys/dev/puc/pucvar.h index f0dbe585f813..e6c390d6d0a8 100644 --- a/sys/dev/puc/pucvar.h +++ b/sys/dev/puc/pucvar.h @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ray/if_ray.c b/sys/dev/ray/if_ray.c index 2a6c7415eb21..bed18b256324 100644 --- a/sys/dev/ray/if_ray.c +++ b/sys/dev/ray/if_ray.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2000 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk. * diff --git a/sys/dev/ray/if_raydbg.h b/sys/dev/ray/if_raydbg.h index 2ab5310c91d9..4981da6b85fe 100644 --- a/sys/dev/ray/if_raydbg.h +++ b/sys/dev/ray/if_raydbg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2000 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk. * diff --git a/sys/dev/ray/if_raymib.h b/sys/dev/ray/if_raymib.h index c8ce2551f240..de3bb1641131 100644 --- a/sys/dev/ray/if_raymib.h +++ b/sys/dev/ray/if_raymib.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2000 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk. * diff --git a/sys/dev/ray/if_rayreg.h b/sys/dev/ray/if_rayreg.h index cff653f6d0fb..562279f7aa3d 100644 --- a/sys/dev/ray/if_rayreg.h +++ b/sys/dev/ray/if_rayreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2000 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk. * diff --git a/sys/dev/ray/if_rayvar.h b/sys/dev/ray/if_rayvar.h index 0f9ed5c830c6..0a91859ebf67 100644 --- a/sys/dev/ray/if_rayvar.h +++ b/sys/dev/ray/if_rayvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 2000 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk. * diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 8a7e49c4ff4f..071dbc777efc 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. * Copyright (C) 2002 by John Baldwin diff --git a/sys/dev/rc/rcreg.h b/sys/dev/rc/rcreg.h index 321222ed26de..8ba287e7251c 100644 --- a/sys/dev/rc/rcreg.h +++ b/sys/dev/rc/rcreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. * Copyright (C) 2002 by John Baldwin diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 35cbd815e933..8440331da711 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998-2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/rndtest/rndtest.c b/sys/dev/rndtest/rndtest.c index 1912f92262d4..15ddcceeb59c 100644 --- a/sys/dev/rndtest/rndtest.c +++ b/sys/dev/rndtest/rndtest.c @@ -1,6 +1,6 @@ /* $OpenBSD$ */ -/* +/*- * Copyright (c) 2002 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/rndtest/rndtest.h b/sys/dev/rndtest/rndtest.h index 93b7eb8f1291..5a284e9a91de 100644 --- a/sys/dev/rndtest/rndtest.h +++ b/sys/dev/rndtest/rndtest.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD$ */ -/* +/*- * Copyright (c) 2002 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 7bf0669f0cb9..e336bca461d1 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) Comtrol Corporation * All rights reserved. * diff --git a/sys/dev/rp/rp_isa.c b/sys/dev/rp/rp_isa.c index 9cb567786afb..ebefe4f8b3ad 100644 --- a/sys/dev/rp/rp_isa.c +++ b/sys/dev/rp/rp_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) Comtrol Corporation * All rights reserved. * diff --git a/sys/dev/rp/rpreg.h b/sys/dev/rp/rpreg.h index 1122ace5fb9a..7ab041d3ccb8 100644 --- a/sys/dev/rp/rpreg.h +++ b/sys/dev/rp/rpreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) Comtrol Corporation * All rights reserved. * diff --git a/sys/dev/rp/rpvar.h b/sys/dev/rp/rpvar.h index 9a4a98108972..66aa21966c7b 100644 --- a/sys/dev/rp/rpvar.h +++ b/sys/dev/rp/rpvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) Comtrol Corporation * All rights reserved. * diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index dbce512c243a..230fde55bcf5 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -1,6 +1,6 @@ /* $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $ */ -/* +/*- * Copyright (c) 2001 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/sab/sab82532reg.h b/sys/dev/sab/sab82532reg.h index 8b53371972de..77e48216357f 100644 --- a/sys/dev/sab/sab82532reg.h +++ b/sys/dev/sab/sab82532reg.h @@ -1,6 +1,6 @@ /* $OpenBSD: sab82532reg.h,v 1.2 2002/04/08 17:49:42 jason Exp $ */ -/* +/*- * Copyright (c) 2001 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c index 27ebcae4ca27..c5228b318484 100644 --- a/sys/dev/sbni/if_sbni.c +++ b/sys/dev/sbni/if_sbni.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. * Author: Denis I.Timofeev * diff --git a/sys/dev/sbni/if_sbni_isa.c b/sys/dev/sbni/if_sbni_isa.c index 0cd88ba696be..956882aeaf99 100644 --- a/sys/dev/sbni/if_sbni_isa.c +++ b/sys/dev/sbni/if_sbni_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. * Author: Denis I.Timofeev * diff --git a/sys/dev/sbni/if_sbnireg.h b/sys/dev/sbni/if_sbnireg.h index 70fca443051b..4fec30c62f1f 100644 --- a/sys/dev/sbni/if_sbnireg.h +++ b/sys/dev/sbni/if_sbnireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. * Author: Denis I.Timofeev * diff --git a/sys/dev/sbni/if_sbnivar.h b/sys/dev/sbni/if_sbnivar.h index 8668a6050870..0fe2f09568b9 100644 --- a/sys/dev/sbni/if_sbnivar.h +++ b/sys/dev/sbni/if_sbnivar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997-2001 Granch, Ltd. All rights reserved. * Author: Denis I.Timofeev * diff --git a/sys/dev/sbsh/if_sbshreg.h b/sys/dev/sbsh/if_sbshreg.h index 44404712a952..94cb0aac46c9 100644 --- a/sys/dev/sbsh/if_sbshreg.h +++ b/sys/dev/sbsh/if_sbshreg.h @@ -1,4 +1,4 @@ -/** +/*- * Granch SBNI16 G.SHDSL Modem driver definitions * Written by Denis I. Timofeev, 2002-2003. * diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index ddd3c0f9f3a0..2f9f872668c8 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * * Copyright (C) 1990, 1992, 1998 Specialix International, diff --git a/sys/dev/si/si.h b/sys/dev/si/si.h index 32f4ab55df5a..c9adefb788e9 100644 --- a/sys/dev/si/si.h +++ b/sys/dev/si/si.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * 'C' definitions for Specialix serial multiplex driver. * diff --git a/sys/dev/si/si2_z280.c b/sys/dev/si/si2_z280.c index 84179dd8d1ab..6caaf3d577a3 100644 --- a/sys/dev/si/si2_z280.c +++ b/sys/dev/si/si2_z280.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1998 Specialix International. * * Download code for SI/XIO/SX host cards. diff --git a/sys/dev/si/si3_t225.c b/sys/dev/si/si3_t225.c index 16a928902a98..17980075a658 100644 --- a/sys/dev/si/si3_t225.c +++ b/sys/dev/si/si3_t225.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1998 Specialix International. * * Download code for SI/XIO/SX host cards. diff --git a/sys/dev/si/si_eisa.c b/sys/dev/si/si_eisa.c index 6be3c87af6be..edb0a8ef0359 100644 --- a/sys/dev/si/si_eisa.c +++ b/sys/dev/si/si_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * * Copyright (C) 2000, Peter Wemm diff --git a/sys/dev/si/si_isa.c b/sys/dev/si/si_isa.c index 91cc6e869a9c..5758a8391d4b 100644 --- a/sys/dev/si/si_isa.c +++ b/sys/dev/si/si_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * * Copyright (C) 2000, Peter Wemm diff --git a/sys/dev/si/sireg.h b/sys/dev/si/sireg.h index 0d59ea9fff62..4b4ef6ad6063 100644 --- a/sys/dev/si/sireg.h +++ b/sys/dev/si/sireg.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * 'C' definitions for Specialix serial multiplex driver. * diff --git a/sys/dev/si/sivar.h b/sys/dev/si/sivar.h index 8e28344b6b14..e479f470faf4 100644 --- a/sys/dev/si/sivar.h +++ b/sys/dev/si/sivar.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix range (SI/XIO) of serial line multiplexors. * * Copyright (C) 2000, Peter Wemm diff --git a/sys/dev/sio/sio_isa.c b/sys/dev/sio/sio_isa.c index 137f47ecde5f..40541e662521 100644 --- a/sys/dev/sio/sio_isa.c +++ b/sys/dev/sio/sio_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sio/sio_pccard.c b/sys/dev/sio/sio_pccard.c index cafb143eddd7..713393a87097 100644 --- a/sys/dev/sio/sio_pccard.c +++ b/sys/dev/sio/sio_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/smbus/smbus_if.m b/sys/dev/smbus/smbus_if.m index 781a15961292..6b213e1f4c23 100644 --- a/sys/dev/smbus/smbus_if.m +++ b/sys/dev/smbus/smbus_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1998 Nicolas Souchu # All rights reserved. # diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index ed8fcbb8dc8b..07cefd566776 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996 Gardner Buchanan * All rights reserved. * diff --git a/sys/dev/sn/if_sn_isa.c b/sys/dev/sn/if_sn_isa.c index f88f3385d28b..7907f744764c 100644 --- a/sys/dev/sn/if_sn_isa.c +++ b/sys/dev/sn/if_sn_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/sn/if_snreg.h b/sys/dev/sn/if_snreg.h index 55dba1def772..3f5efd01f5a7 100644 --- a/sys/dev/sn/if_snreg.h +++ b/sys/dev/sn/if_snreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996 Gardner Buchanan * All rights reserved. * diff --git a/sys/dev/sn/if_snvar.h b/sys/dev/sn/if_snvar.h index 284b43f85dbf..91c6d8a5b596 100644 --- a/sys/dev/sn/if_snvar.h +++ b/sys/dev/sn/if_snvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c index 582b77094db0..1ffd4f15cd9c 100644 --- a/sys/dev/snc/dp83932.c +++ b/sys/dev/snc/dp83932.c @@ -2,7 +2,7 @@ /* $NecBSD: dp83932.c,v 1.5 1999/07/29 05:08:44 kmatsuda Exp $ */ /* $NetBSD: if_snc.c,v 1.18 1998/04/25 21:27:40 scottr Exp $ */ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Kouichi Matsuda. All rights reserved. * @@ -45,7 +45,7 @@ * (64 * 16 bits) Microwire Serial EEPROM. */ -/* +/*- * National Semiconductor DP8393X SONIC Driver * Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk) * You may use, copy, and modify this program so long as you retain the diff --git a/sys/dev/snc/dp83932reg.h b/sys/dev/snc/dp83932reg.h index b72fe86afc6b..31ab550b83ca 100644 --- a/sys/dev/snc/dp83932reg.h +++ b/sys/dev/snc/dp83932reg.h @@ -2,7 +2,7 @@ /* $NecBSD: dp83932reg.h,v 1.2 1999/02/12 05:50:13 kmatsuda Exp $ */ /* $NetBSD: if_snreg.h,v 1.4 1997/06/15 20:20:12 scottr Exp $ */ -/* +/*- * Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk) * You may use, copy, and modify this program so long as you retain the * copyright line. diff --git a/sys/dev/snc/dp83932subr.c b/sys/dev/snc/dp83932subr.c index 7e4b1d75df54..064cb2c3d614 100644 --- a/sys/dev/snc/dp83932subr.c +++ b/sys/dev/snc/dp83932subr.c @@ -1,7 +1,7 @@ /* $NecBSD: dp83932subr.c,v 1.5.6.2 1999/10/09 05:47:23 kmatsuda Exp $ */ /* $NetBSD$ */ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Kouichi Matsuda. All rights reserved. * diff --git a/sys/dev/snc/dp83932subr.h b/sys/dev/snc/dp83932subr.h index 78fa636cc890..f5df4f97970f 100644 --- a/sys/dev/snc/dp83932subr.h +++ b/sys/dev/snc/dp83932subr.h @@ -1,8 +1,8 @@ /* $FreeBSD$ */ /* $NecBSD: dp83932subr.h,v 1.5 1999/02/02 00:47:25 kmatsuda Exp $ */ /* $NetBSD$ */ - -/* + +/*- * Copyright (c) 1997, 1998, 1999 * Kouichi Matsuda. All rights reserved. * diff --git a/sys/dev/snc/dp83932var.h b/sys/dev/snc/dp83932var.h index fcc6a2245284..f621397b930d 100644 --- a/sys/dev/snc/dp83932var.h +++ b/sys/dev/snc/dp83932var.h @@ -2,12 +2,11 @@ /* $NecBSD: dp83932var.h,v 1.3 1999/01/24 01:39:51 kmatsuda Exp $ */ /* $NetBSD: if_snvar.h,v 1.12 1998/05/01 03:42:47 scottr Exp $ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1997, 1998, 1999 * Kouichi Matsuda. All rights reserved. - */ -/* + * * Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk) * You may use, copy, and modify this program so long as you retain the * copyright line. diff --git a/sys/dev/snc/if_snc.c b/sys/dev/snc/if_snc.c index 69a6ca60315e..7cbdd804f7ba 100644 --- a/sys/dev/snc/if_snc.c +++ b/sys/dev/snc/if_snc.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/snc/if_snc_cbus.c b/sys/dev/snc/if_snc_cbus.c index 19a0505ded4f..1b9ef3ef5655 100644 --- a/sys/dev/snc/if_snc_cbus.c +++ b/sys/dev/snc/if_snc_cbus.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/snc/if_snc_pccard.c b/sys/dev/snc/if_snc_pccard.c index 1478d26bd307..c22fa756e42f 100644 --- a/sys/dev/snc/if_snc_pccard.c +++ b/sys/dev/snc/if_snc_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/snc/if_sncreg.h b/sys/dev/snc/if_sncreg.h index 30b0bb755992..888aa4f3ceb3 100644 --- a/sys/dev/snc/if_sncreg.h +++ b/sys/dev/snc/if_sncreg.h @@ -2,7 +2,7 @@ /* $NecBSD: if_snreg.h,v 1.3 1999/01/24 01:39:52 kmatsuda Exp $ */ /* $NetBSD$ */ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Kouichi Matsuda. All rights reserved. * diff --git a/sys/dev/snc/if_sncvar.h b/sys/dev/snc/if_sncvar.h index 33e39f32a3bf..8b6a75b99812 100644 --- a/sys/dev/snc/if_sncvar.h +++ b/sys/dev/snc/if_sncvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, David Greenman * All rights reserved. * diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index c6d8c32eeae0..643c6e7ba2cb 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 Ugen J.S.Antsilevich * * Redistribution and use in source forms, with and without modification, diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c index f9952665b71b..7da109923b16 100644 --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index 40e006b36636..f34a5c623f65 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Copyright Luigi Rizzo, 1997,1998 * Copyright by Hannu Savolainen 1994, 1995 diff --git a/sys/dev/sound/isa/ad1816.h b/sys/dev/sound/isa/ad1816.h index 078523f1d12e..3fe4a3dc3ff1 100644 --- a/sys/dev/sound/isa/ad1816.h +++ b/sys/dev/sound/isa/ad1816.h @@ -1,4 +1,4 @@ -/* +/*- * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it) * * This file contains information and macro definitions for diff --git a/sys/dev/sound/isa/es1888.c b/sys/dev/sound/isa/es1888.c index 24830a258edc..bc89ca4b3bba 100644 --- a/sys/dev/sound/isa/es1888.c +++ b/sys/dev/sound/isa/es1888.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Doug Rabson * All rights reserved. * diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 1cf756a28aa5..248aebe833ba 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Copyright 1997,1998 Luigi Rizzo. * diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c index bd88322f484d..cb1b1ade4e9a 100644 --- a/sys/dev/sound/isa/gusc.c +++ b/sys/dev/sound/isa/gusc.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Seigo Tanimura * Copyright (c) 1999 Ville-Pertti Keinonen * All rights reserved. diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index 3a39569954b9..60b1927380a5 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 George Reid * Copyright (c) 1999 Cameron Grant * Copyright Luigi Rizzo, 1997,1998 diff --git a/sys/dev/sound/isa/mss.h b/sys/dev/sound/isa/mss.h index d97c70a14cf2..d9247f93b7e6 100644 --- a/sys/dev/sound/isa/mss.h +++ b/sys/dev/sound/isa/mss.h @@ -1,4 +1,4 @@ -/* +/*- * file: mss.h * * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it) @@ -8,6 +8,34 @@ * */ +/*- + * Copyright (c) 1999 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + /* * @@ -278,34 +306,6 @@ MIX_NONE(SOUND_MIXER_LINE3), SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | \ SOUND_MASK_IGAIN | SOUND_MASK_LINE1 ) -/*- - * Copyright (c) 1999 Doug Rabson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - /* * Register definitions for the Yamaha OPL3-SA[23x]. */ diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 25ad11c25b7a..58cb46ff5def 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Copyright 1997,1998 Luigi Rizzo. * diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index 53e508c728d1..eefe02544536 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Copyright 1997,1998 Luigi Rizzo. * diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c index 7783c084db9c..d41cf1029307 100644 --- a/sys/dev/sound/isa/sbc.c +++ b/sys/dev/sound/isa/sbc.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Seigo Tanimura * All rights reserved. * diff --git a/sys/dev/sound/isa/sndbuf_dma.c b/sys/dev/sound/isa/sndbuf_dma.c index 2b980807245e..9e45cde9636d 100644 --- a/sys/dev/sound/isa/sndbuf_dma.c +++ b/sys/dev/sound/isa/sndbuf_dma.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index edfb55b97c1c..6f909ccbb0ed 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/als4000.h b/sys/dev/sound/pci/als4000.h index a6a67df786bc..00661a039b45 100644 --- a/sys/dev/sound/pci/als4000.h +++ b/sys/dev/sound/pci/als4000.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c index 68bebb30469d..8ff1b4057696 100644 --- a/sys/dev/sound/pci/aureal.c +++ b/sys/dev/sound/pci/aureal.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/aureal.h b/sys/dev/sound/pci/aureal.h index d710b2e0ba85..e835c7119fcb 100644 --- a/sys/dev/sound/pci/aureal.h +++ b/sys/dev/sound/pci/aureal.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 857592af000d..196fb69353dc 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/cmireg.h b/sys/dev/sound/pci/cmireg.h index 9e838a6faad3..5c468b55ed8b 100644 --- a/sys/dev/sound/pci/cmireg.h +++ b/sys/dev/sound/pci/cmireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index ea9e0fcd33ba..f8da280cb43a 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/cs4281.h b/sys/dev/sound/pci/cs4281.h index 68a71e7b7f0a..c7b3799ab89d 100644 --- a/sys/dev/sound/pci/cs4281.h +++ b/sys/dev/sound/pci/cs4281.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 5cc205abfcb9..d9823d732e25 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Seigo Tanimura * All rights reserved. * diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index c53647db2dd5..753f518e2502 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Seigo Tanimura * All rights reserved. * diff --git a/sys/dev/sound/pci/ds1-fw.h b/sys/dev/sound/pci/ds1-fw.h index 72a052a2b9bc..a34d2338954c 100644 --- a/sys/dev/sound/pci/ds1-fw.h +++ b/sys/dev/sound/pci/ds1-fw.h @@ -1,4 +1,5 @@ -/* ============================================================================= +/*- + * ============================================================================= * Copyright (c) 1997-1999 Yamaha Corporation. All Rights Reserved. * * Title: diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 59890d7fc5fc..fa70de1d149e 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index aeeba4dac1b9..3716cc07ff29 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 David O'Brien * Copyright (c) 2003 Orlando Bassotto * Copyright (c) 1999 Cameron Grant diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 7b9797312065..b23245e9328f 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1,4 +1,4 @@ -/* +/*- * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI * boards based on the ES1370, ES1371 and ES1373 chips. * diff --git a/sys/dev/sound/pci/es137x.h b/sys/dev/sound/pci/es137x.h index 076fe3c01a1b..8d9b9915050a 100644 --- a/sys/dev/sound/pci/es137x.h +++ b/sys/dev/sound/pci/es137x.h @@ -1,4 +1,4 @@ -/* +/*- * This supports the ENSONIQ AudioPCI board based on the ES1370. * * Copyright (c) 1998 Joachim Kuebart diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 1bc52e96553e..9875e0e4b2cd 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Dmitry Dicky diwil@dataart.com * All rights reserved. * diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 8756993d2438..af27f810b8a3 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Katsurajima Naoto * Copyright (c) 2001 Cameron Grant * All rights reserved. diff --git a/sys/dev/sound/pci/ich.h b/sys/dev/sound/pci/ich.h index 8f6cf68bcb48..be3f3fca3b4a 100644 --- a/sys/dev/sound/pci/ich.h +++ b/sys/dev/sound/pci/ich.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Katsurajima Naoto * Copyright (c) 2001 Cameron Grant * All rights reserved. diff --git a/sys/dev/sound/pci/neomagic-coeff.h b/sys/dev/sound/pci/neomagic-coeff.h index f6cdecfd2f02..2fec6427ae14 100644 --- a/sys/dev/sound/pci/neomagic-coeff.h +++ b/sys/dev/sound/pci/neomagic-coeff.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 5c4619b8c862..3ed79e5cfb88 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/neomagic.h b/sys/dev/sound/pci/neomagic.h index be5e7e296498..0b87f99cbf97 100644 --- a/sys/dev/sound/pci/neomagic.h +++ b/sys/dev/sound/pci/neomagic.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 5cb0c1395ea8..ed102753c1b8 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 8bcc588f3958..f570f0773472 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/t4dwave.h b/sys/dev/sound/pci/t4dwave.h index 67e3e4993501..4a2ec626c508 100644 --- a/sys/dev/sound/pci/t4dwave.h +++ b/sys/dev/sound/pci/t4dwave.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 851d7725b45d..2c338685837f 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Orion Hodson * Portions of this code derived from via82c686.c: * Copyright (c) 2000 David Jones diff --git a/sys/dev/sound/pci/via8233.h b/sys/dev/sound/pci/via8233.h index bc6f57aa6208..a38afc96255c 100644 --- a/sys/dev/sound/pci/via8233.h +++ b/sys/dev/sound/pci/via8233.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index 9ed693b1e9b2..6a94a1992fe7 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 David Jones * All rights reserved. * diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 6fd1f8fa1462..801a2edaab63 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pci/vibes.h b/sys/dev/sound/pci/vibes.h index 36cbadd66781..d1eac407efbe 100644 --- a/sys/dev/sound/pci/vibes.h +++ b/sys/dev/sound/pci/vibes.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index a6303f93c2fd..e2313661aeef 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/ac97.h b/sys/dev/sound/pcm/ac97.h index 933281cb8a9e..2d2db4b22f5e 100644 --- a/sys/dev/sound/pcm/ac97.h +++ b/sys/dev/sound/pcm/ac97.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/ac97_if.m b/sys/dev/sound/pcm/ac97_if.m index 36c5c19091a6..19f7378d1c6d 100644 --- a/sys/dev/sound/pcm/ac97_if.m +++ b/sys/dev/sound/pcm/ac97_if.m @@ -1,3 +1,4 @@ +#- # KOBJ # # Copyright (c) 2000 Cameron Grant diff --git a/sys/dev/sound/pcm/ac97_patch.c b/sys/dev/sound/pcm/ac97_patch.c index e5e728f8b314..05c73d7553a7 100644 --- a/sys/dev/sound/pcm/ac97_patch.c +++ b/sys/dev/sound/pcm/ac97_patch.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright 2002 FreeBSD, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sound/pcm/ac97_patch.h b/sys/dev/sound/pcm/ac97_patch.h index 740031d2ed3a..d0184c4c6be2 100644 --- a/sys/dev/sound/pcm/ac97_patch.h +++ b/sys/dev/sound/pcm/ac97_patch.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright 2003 FreeBSD, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 096262c2ccf3..9ca6a3238441 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h index 48981b5c4078..7b2bffbe127b 100644 --- a/sys/dev/sound/pcm/buffer.h +++ b/sys/dev/sound/pcm/buffer.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index cf970c7132a7..2948e41c9d2d 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Portions Copyright by Luigi Rizzo - 1997-99 * All rights reserved. diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index f2fb5957ae1d..23cd7199f58b 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/channel_if.m b/sys/dev/sound/pcm/channel_if.m index 9d8e289509c2..cdc6a3b6f2b3 100644 --- a/sys/dev/sound/pcm/channel_if.m +++ b/sys/dev/sound/pcm/channel_if.m @@ -1,3 +1,4 @@ +#- # KOBJ # # Copyright (c) 2000 Cameron Grant diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 64088f95117c..1adc6ceed341 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/dsp.h b/sys/dev/sound/pcm/dsp.h index 0a42e74ef1c1..0d067ededb1a 100644 --- a/sys/dev/sound/pcm/dsp.h +++ b/sys/dev/sound/pcm/dsp.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/fake.c b/sys/dev/sound/pcm/fake.c index 1fd0900bff9f..ba9c4b641303 100644 --- a/sys/dev/sound/pcm/fake.c +++ b/sys/dev/sound/pcm/fake.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 0ec36df6f80a..5bc7b81ae2b9 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index 61d42255d966..1a9c37b751aa 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/feeder_fmt.c b/sys/dev/sound/pcm/feeder_fmt.c index 59d7edc485f5..7eb66f515fd1 100644 --- a/sys/dev/sound/pcm/feeder_fmt.c +++ b/sys/dev/sound/pcm/feeder_fmt.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/feeder_if.m b/sys/dev/sound/pcm/feeder_if.m index a100a6dbf0ea..83c0fb073b53 100644 --- a/sys/dev/sound/pcm/feeder_if.m +++ b/sys/dev/sound/pcm/feeder_if.m @@ -1,3 +1,4 @@ +#- # KOBJ # # Copyright (c) 2000 Cameron Grant diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index c3752a0ad7b1..55d51fc1e2dc 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Orion Hodson * All rights reserved. * diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index f40b4301abd5..fed0fc5a3be5 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h index 22bd22aa6c3f..2c8dff753e36 100644 --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/mixer_if.m b/sys/dev/sound/pcm/mixer_if.m index 38d99fbd05df..9bd974ce7d9e 100644 --- a/sys/dev/sound/pcm/mixer_if.m +++ b/sys/dev/sound/pcm/mixer_if.m @@ -1,3 +1,4 @@ +#- # KOBJ # # Copyright (c) 2000 Cameron Grant diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index c8e63877394c..7113bf1e6d24 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 4446b3241e9e..fd4ce76bf80f 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it) * All rights reserved. diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index f1fd6df23d3e..e4cac240247d 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Cameron Grant * Copyright by Hannu Savolainen 1995 * All rights reserved. diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index ce67fb1559c4..91a114e65706 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/pcm/vchan.h b/sys/dev/sound/pcm/vchan.h index 99b0d41399a5..cb9e1c8ea17c 100644 --- a/sys/dev/sound/pcm/vchan.h +++ b/sys/dev/sound/pcm/vchan.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 Cameron Grant * All rights reserved. * diff --git a/sys/dev/sound/sbus/apcdmareg.h b/sys/dev/sound/sbus/apcdmareg.h index 28abd8b16dc6..d4296adbe9fe 100644 --- a/sys/dev/sound/sbus/apcdmareg.h +++ b/sys/dev/sound/sbus/apcdmareg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD: apcdmareg.h,v 1.2 2003/06/02 18:53:18 jason Exp $ */ -/* +/*- * Copyright (c) 2001 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/sound/sbus/cs4231.c b/sys/dev/sound/sbus/cs4231.c index 5a236a6b5f0a..11f6b0806bb2 100644 --- a/sys/dev/sound/sbus/cs4231.c +++ b/sys/dev/sound/sbus/cs4231.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1999 Jason L. Wright (jason@thought.net) * Copyright (c) 2004 Pyun YongHyeon * All rights reserved. diff --git a/sys/dev/sound/sbus/cs4231.h b/sys/dev/sound/sbus/cs4231.h index 2b160c178da6..26ca399a0fe0 100644 --- a/sys/dev/sound/sbus/cs4231.h +++ b/sys/dev/sound/sbus/cs4231.h @@ -35,7 +35,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* +/** * Register defs for Crystal Semiconductor CS4231 Audio Codec/mixer * chip, used on Gravis UltraSound MAX cards. * diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 18b5bfb4072f..a9c38e404b8f 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1,7 +1,7 @@ /* $NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/sound/usb/uaudio.h b/sys/dev/sound/usb/uaudio.h index 9ba8d97d10c8..ff748368d294 100644 --- a/sys/dev/sound/usb/uaudio.h +++ b/sys/dev/sound/usb/uaudio.h @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000-2002 Hiroyuki Aizu * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c index 34412759eeb0..c71e58095d0e 100644 --- a/sys/dev/sound/usb/uaudio_pcm.c +++ b/sys/dev/sound/usb/uaudio_pcm.c @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000-2002 Hiroyuki Aizu * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/sound/usb/uaudioreg.h b/sys/dev/sound/usb/uaudioreg.h index dd402e297041..3cc09ba5ae45 100644 --- a/sys/dev/sound/usb/uaudioreg.h +++ b/sys/dev/sound/usb/uaudioreg.h @@ -1,7 +1,7 @@ /* $NetBSD: uaudioreg.h,v 1.12 2004/11/05 19:08:29 kent Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c index 88668a7cb370..033b3393145f 100644 --- a/sys/dev/sr/if_sr.c +++ b/sys/dev/sr/if_sr.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996 - 2001 John Hay. * Copyright (c) 1996 SDL Communications, Inc. * All rights reserved. diff --git a/sys/dev/sr/if_sr.h b/sys/dev/sr/if_sr.h index a55a6d3f6b56..c66f667f0023 100644 --- a/sys/dev/sr/if_sr.h +++ b/sys/dev/sr/if_sr.h @@ -1,4 +1,4 @@ -/* +/*- * if_sr.h * * Copyright (C) 1997-1999 Whistle Communications Inc. diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c index e9a00764f5ee..510a32b74196 100644 --- a/sys/dev/sr/if_sr_isa.c +++ b/sys/dev/sr/if_sr_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996 - 2001 John Hay. * Copyright (c) 1996 SDL Communications, Inc. * All rights reserved. diff --git a/sys/dev/sr/if_sr_pci.c b/sys/dev/sr/if_sr_pci.c index dd41d74bcf58..389476126660 100644 --- a/sys/dev/sr/if_sr_pci.c +++ b/sys/dev/sr/if_sr_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996 - 2001 John Hay. * Copyright (c) 1996 SDL Communications, Inc. * All rights reserved. diff --git a/sys/dev/sr/if_srregs.h b/sys/dev/sr/if_srregs.h index 3d80b22ea184..16925e6e581e 100644 --- a/sys/dev/sr/if_srregs.h +++ b/sys/dev/sr/if_srregs.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995 - 2001 John Hay. * Copyright (c) 1996 SDL Communications, Inc. * All rights reserved. diff --git a/sys/dev/stg/tmc18c30.c b/sys/dev/stg/tmc18c30.c index 223ed53d6051..c07c4c8b516d 100644 --- a/sys/dev/stg/tmc18c30.c +++ b/sys/dev/stg/tmc18c30.c @@ -5,7 +5,7 @@ #define STG_STATICS #define STG_IO_CONTROL_FLAGS (STG_FIFO_INTERRUPTS | STG_WAIT_FOR_SELECT) -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/stg/tmc18c30_isa.c b/sys/dev/stg/tmc18c30_isa.c index b674c2eefc07..40966697dc43 100644 --- a/sys/dev/stg/tmc18c30_isa.c +++ b/sys/dev/stg/tmc18c30_isa.c @@ -1,7 +1,7 @@ /* $NecBSD: tmc18c30_pisa.c,v 1.22 1998/11/26 01:59:21 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [Ported for FreeBSD] * Copyright (c) 2000 * Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe. diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c index 0ea2df0f91b1..67bffd3f40c2 100644 --- a/sys/dev/stg/tmc18c30_pccard.c +++ b/sys/dev/stg/tmc18c30_pccard.c @@ -1,7 +1,7 @@ /* $NecBSD: tmc18c30_pisa.c,v 1.22 1998/11/26 01:59:21 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [Ported for FreeBSD] * Copyright (c) 2000 * Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe. diff --git a/sys/dev/stg/tmc18c30_subr.c b/sys/dev/stg/tmc18c30_subr.c index 7ffd4d39d349..c2cfd44b42ac 100644 --- a/sys/dev/stg/tmc18c30_subr.c +++ b/sys/dev/stg/tmc18c30_subr.c @@ -1,4 +1,4 @@ -/* +/*- * [Ported for FreeBSD] * Copyright (c) 2000 * Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe. diff --git a/sys/dev/stg/tmc18c30reg.h b/sys/dev/stg/tmc18c30reg.h index 9c84d89bc3a3..93c9940ba649 100644 --- a/sys/dev/stg/tmc18c30reg.h +++ b/sys/dev/stg/tmc18c30reg.h @@ -2,7 +2,7 @@ /* $NecBSD: tmc18c30reg.h,v 1.4.24.1 2001/06/08 06:27:50 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/stg/tmc18c30var.h b/sys/dev/stg/tmc18c30var.h index d6bc4ac4cc49..69e837fc6786 100644 --- a/sys/dev/stg/tmc18c30var.h +++ b/sys/dev/stg/tmc18c30var.h @@ -2,7 +2,7 @@ /* $NecBSD: tmc18c30var.h,v 1.12.18.2 2001/06/13 05:51:23 honda Exp $ */ /* $NetBSD$ */ -/* +/*- * [NetBSD for NEC PC-98 series] * Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001 * NetBSD/pc98 porting staff. All rights reserved. diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 28a77c8906a8..0a15c86dad3d 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1998 Mark Newton * Copyright (c) 1994 Christos Zoulas * Copyright (c) 1997 Todd Vierling diff --git a/sys/dev/sx/cd1865.h b/sys/dev/sx/cd1865.h index 5056deaeecab..297a415ff698 100644 --- a/sys/dev/sx/cd1865.h +++ b/sys/dev/sx/cd1865.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 25a967b84def..8821c374af87 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -1,4 +1,4 @@ -/* +/*- * Device tsfsdriver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sx.h b/sys/dev/sx/sx.h index 2c06028dd3c7..0e035ddbfb16 100644 --- a/sys/dev/sx/sx.h +++ b/sys/dev/sx/sx.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sx_pci.c b/sys/dev/sx/sx_pci.c index 3187caf682ca..49052947791f 100644 --- a/sys/dev/sx/sx_pci.c +++ b/sys/dev/sx/sx_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sx_util.c b/sys/dev/sx/sx_util.c index d9409254d322..0eeb8aeb7549 100644 --- a/sys/dev/sx/sx_util.c +++ b/sys/dev/sx/sx_util.c @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sx_util.h b/sys/dev/sx/sx_util.h index 582e73be1bb1..57f42c9f7517 100644 --- a/sys/dev/sx/sx_util.h +++ b/sys/dev/sx/sx_util.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sx/sxvar.h b/sys/dev/sx/sxvar.h index 7eea73337abe..fa33e371ec90 100644 --- a/sys/dev/sx/sxvar.h +++ b/sys/dev/sx/sxvar.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver for Specialix I/O8+ multiport serial card. * * Copyright 2003 Frank Mayhar diff --git a/sys/dev/sym/README.sym b/sys/dev/sym/README.sym index b4612237e7bf..d310cd4d150f 100644 --- a/sys/dev/sym/README.sym +++ b/sys/dev/sym/README.sym @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/sym/sym_conf.h b/sys/dev/sym/sym_conf.h index 4154b6c33bf7..768baa7b10a5 100644 --- a/sys/dev/sym/sym_conf.h +++ b/sys/dev/sym/sym_conf.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/sym/sym_defs.h b/sys/dev/sym/sym_defs.h index 61caabddc0ae..ad1481f71af3 100644 --- a/sys/dev/sym/sym_defs.h +++ b/sys/dev/sym/sym_defs.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/sym/sym_fw.h b/sys/dev/sym/sym_fw.h index 65b2838bb3d6..a274bbcee430 100644 --- a/sys/dev/sym/sym_fw.h +++ b/sys/dev/sym/sym_fw.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/sym/sym_fw1.h b/sys/dev/sym/sym_fw1.h index 96ae523ddc1d..9a43dc431f0d 100644 --- a/sys/dev/sym/sym_fw1.h +++ b/sys/dev/sym/sym_fw1.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/sym/sym_fw2.h b/sys/dev/sym/sym_fw2.h index 77f8df32d7ec..5ff740aa3cd9 100644 --- a/sys/dev/sym/sym_fw2.h +++ b/sys/dev/sym/sym_fw2.h @@ -1,4 +1,4 @@ -/* +/*- * Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 * PCI-SCSI controllers. * diff --git a/sys/dev/tdfx/tdfx_io.h b/sys/dev/tdfx/tdfx_io.h index 8742fd7341cd..faec61e11771 100644 --- a/sys/dev/tdfx/tdfx_io.h +++ b/sys/dev/tdfx/tdfx_io.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2001 by Coleman Kane * All rights reserved. * diff --git a/sys/dev/tdfx/tdfx_linux.h b/sys/dev/tdfx/tdfx_linux.h index fa4351de226f..a3235cc8ba02 100644 --- a/sys/dev/tdfx/tdfx_linux.h +++ b/sys/dev/tdfx/tdfx_linux.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2001 by Coleman Kane * All rights reserved. * diff --git a/sys/dev/tdfx/tdfx_pci.h b/sys/dev/tdfx/tdfx_pci.h index 1ecc554e8edc..0c60e5a2b6c1 100644 --- a/sys/dev/tdfx/tdfx_pci.h +++ b/sys/dev/tdfx/tdfx_pci.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2001 by Coleman Kane * All rights reserved. * diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h index 95a9bbf9c165..1e10e3c3a669 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2001 by Coleman Kane * All rights reserved. * diff --git a/sys/dev/tga/tga_pci.c b/sys/dev/tga/tga_pci.c index 1477a7c4210a..63f9c5a32b92 100644 --- a/sys/dev/tga/tga_pci.c +++ b/sys/dev/tga/tga_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/tga/tga_pci.h b/sys/dev/tga/tga_pci.h index 269913104493..21dc74e37417 100644 --- a/sys/dev/tga/tga_pci.h +++ b/sys/dev/tga/tga_pci.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1995, 1996 Carnegie-Mellon University. * All rights reserved. * diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index 2319828b8d0c..fac2c90dec9b 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -8,7 +8,6 @@ * DC395U2D/U2W(TRM-S2080) * PCI SCSI Bus Master Host Adapter * (SCSI chip set used Tekram ASIC TRM-S1040,TRM-S2080) - *(C)Copyright 1995-2001 Tekram Technology Co.,Ltd. */ #include @@ -27,8 +26,8 @@ __FBSDID("$FreeBSD$"); * 1.11 10/13/2001 Oscar Feng Fixed wrong Async speed display bug. */ -/* - * +/*- + * (C)Copyright 1995-2001 Tekram Technology Co.,Ltd. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/sys/dev/trm/trm.h b/sys/dev/trm/trm.h index e9eadbea8181..21248835a510 100644 --- a/sys/dev/trm/trm.h +++ b/sys/dev/trm/trm.h @@ -1,10 +1,12 @@ -/* +/*- * File Name : trm.h * * Tekram DC395U/UW/F ,DC315/U * PCI SCSI Bus Master Host Adapter Device Driver * (SCSI chip set used Tekram ASIC TRM-S1040) * + * (C)Copyright 1995-2001 Tekram Technology Co.,Ltd. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/dev/txp/3c990img.h b/sys/dev/txp/3c990img.h index a14441d3ed3c..6e75f5d83cf0 100644 --- a/sys/dev/txp/3c990img.h +++ b/sys/dev/txp/3c990img.h @@ -1,7 +1,7 @@ /* $OpenBSD: 3c990img.h,v 1.2 2001/06/05 02:15:17 jason Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (C) 1999-2001 3Com, Inc. * All rights reserved. * diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index 2a7221de4f9f..a2805324ea76 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -1,6 +1,6 @@ /* $OpenBSD: if_txp.c,v 1.48 2001/06/27 06:34:50 kjc Exp $ */ -/* +/*- * Copyright (c) 2001 * Jason L. Wright , Theo de Raadt, and * Aaron Campbell . All rights reserved. diff --git a/sys/dev/txp/if_txpreg.h b/sys/dev/txp/if_txpreg.h index 634c29f07f7e..2d88fc9fd053 100644 --- a/sys/dev/txp/if_txpreg.h +++ b/sys/dev/txp/if_txpreg.h @@ -1,7 +1,7 @@ /* $OpenBSD: if_txpreg.h,v 1.30 2001/06/23 04:18:02 jason Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2001 Aaron Campbell . * All rights reserved. * diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h index 5de4d420ac5c..101304ed6871 100644 --- a/sys/dev/uart/uart.h +++ b/sys/dev/uart/uart.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h index cc9ce4df5a75..9fd84e9eca6c 100644 --- a/sys/dev/uart/uart_bus.h +++ b/sys/dev/uart/uart_bus.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_bus_acpi.c b/sys/dev/uart/uart_bus_acpi.c index a26357132d04..042dfef5d219 100644 --- a/sys/dev/uart/uart_bus_acpi.c +++ b/sys/dev/uart/uart_bus_acpi.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/uart/uart_bus_isa.c b/sys/dev/uart/uart_bus_isa.c index e70c3e029ce2..51713ad25a62 100644 --- a/sys/dev/uart/uart_bus_isa.c +++ b/sys/dev/uart/uart_bus_isa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/uart/uart_bus_pccard.c b/sys/dev/uart/uart_bus_pccard.c index 5f0e02b26bab..a1ca4c2e292c 100644 --- a/sys/dev/uart/uart_bus_pccard.c +++ b/sys/dev/uart/uart_bus_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * Copyright (c) 2003 Norikatsu Shigemura, Takenori Watanabe All rights reserved. * diff --git a/sys/dev/uart/uart_bus_pci.c b/sys/dev/uart/uart_bus_pci.c index 2e4573d4e26b..fb2fc6d1bfe1 100644 --- a/sys/dev/uart/uart_bus_pci.c +++ b/sys/dev/uart/uart_bus_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index ca89c5cfd0e3..00fdf1610a39 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu.h b/sys/dev/uart/uart_cpu.h index 462eb59b1e83..702ee5ec5d93 100644 --- a/sys/dev/uart/uart_cpu.h +++ b/sys/dev/uart/uart_cpu.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_alpha.c b/sys/dev/uart/uart_cpu_alpha.c index a3a132f6aa2b..438bc3c691c9 100644 --- a/sys/dev/uart/uart_cpu_alpha.c +++ b/sys/dev/uart/uart_cpu_alpha.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_amd64.c b/sys/dev/uart/uart_cpu_amd64.c index c0270ae6a2cb..498496b86b90 100644 --- a/sys/dev/uart/uart_cpu_amd64.c +++ b/sys/dev/uart/uart_cpu_amd64.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_i386.c b/sys/dev/uart/uart_cpu_i386.c index 93ca77079459..673dde54b25a 100644 --- a/sys/dev/uart/uart_cpu_i386.c +++ b/sys/dev/uart/uart_cpu_i386.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_ia64.c b/sys/dev/uart/uart_cpu_ia64.c index 74a9300663ea..cf1e7e178e98 100644 --- a/sys/dev/uart/uart_cpu_ia64.c +++ b/sys/dev/uart/uart_cpu_ia64.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_pc98.c b/sys/dev/uart/uart_cpu_pc98.c index 3664096b6c93..0ae255967727 100644 --- a/sys/dev/uart/uart_cpu_pc98.c +++ b/sys/dev/uart/uart_cpu_pc98.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 M. Warner Losh, Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c index fcc2f1d24fcc..efb8ba7dea2b 100644 --- a/sys/dev/uart/uart_cpu_sparc64.c +++ b/sys/dev/uart/uart_cpu_sparc64.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003, 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_dbg.c b/sys/dev/uart/uart_dbg.c index 71938b961827..51d9ec59bdde 100644 --- a/sys/dev/uart/uart_dbg.c +++ b/sys/dev/uart/uart_dbg.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index f39d29cce482..5b53a8999fd1 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_dev_sab82532.c b/sys/dev/uart/uart_dev_sab82532.c index 04dbe8c10afa..0da08911f1d7 100644 --- a/sys/dev/uart/uart_dev_sab82532.c +++ b/sys/dev/uart/uart_dev_sab82532.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c index 8da64d7caa63..4454bf5c9064 100644 --- a/sys/dev/uart/uart_dev_z8530.c +++ b/sys/dev/uart/uart_dev_z8530.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_if.m b/sys/dev/uart/uart_if.m index 762c16eaa143..0bb145490ed4 100644 --- a/sys/dev/uart/uart_if.m +++ b/sys/dev/uart/uart_if.m @@ -1,3 +1,4 @@ +#- # Copyright (c) 2003 Marcel Moolenaar # All rights reserved. # diff --git a/sys/dev/uart/uart_kbd_sun.h b/sys/dev/uart/uart_kbd_sun.h index 574e966b7040..603d257432df 100644 --- a/sys/dev/uart/uart_kbd_sun.h +++ b/sys/dev/uart/uart_kbd_sun.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Jason L. Wright (jason@thought.net) * All rights reserved. * diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c index 27dfd41b0735..14ce64b1b84f 100644 --- a/sys/dev/uart/uart_subr.c +++ b/sys/dev/uart/uart_subr.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 73ff7f292289..8f3c3c5d64fe 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Marcel Moolenaar * All rights reserved. * diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index db3e96c0b2c2..39da78c9f3c8 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -1,6 +1,6 @@ /* $OpenBSD: ubsec.c,v 1.115 2002/09/24 18:33:26 jason Exp $ */ -/* +/*- * Copyright (c) 2000 Jason L. Wright (jason@thought.net) * Copyright (c) 2000 Theo de Raadt (deraadt@openbsd.org) * Copyright (c) 2001 Patrik Lindergren (patrik@ipunplugged.com) diff --git a/sys/dev/ubsec/ubsecreg.h b/sys/dev/ubsec/ubsecreg.h index 4be530a02296..2ba1f937d06e 100644 --- a/sys/dev/ubsec/ubsecreg.h +++ b/sys/dev/ubsec/ubsecreg.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD: ubsecreg.h,v 1.27 2002/09/11 22:40:31 jason Exp $ */ -/* +/*- * Copyright (c) 2000 Theo de Raadt * Copyright (c) 2001 Patrik Lindergren (patrik@ipunplugged.com) * diff --git a/sys/dev/ubsec/ubsecvar.h b/sys/dev/ubsec/ubsecvar.h index 965a0d90181d..448403b14c01 100644 --- a/sys/dev/ubsec/ubsecvar.h +++ b/sys/dev/ubsec/ubsecvar.h @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* $OpenBSD: ubsecvar.h,v 1.35 2002/09/24 18:33:26 jason Exp $ */ -/* +/*- * Copyright (c) 2000 Theo de Raadt * Copyright (c) 2001 Patrik Lindergren (patrik@ipunplugged.com) * diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index b8d26a450fcd..31d60dc77fb4 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,6 +1,6 @@ /* $NetBSD: ehci.c,v 1.89 2004/12/03 08:51:31 augustss Exp $ */ -/* +/*- * Copyright (c) 2004 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ehcireg.h b/sys/dev/usb/ehcireg.h index 2aaa4c8107ad..304b4ae2d92a 100644 --- a/sys/dev/usb/ehcireg.h +++ b/sys/dev/usb/ehcireg.h @@ -1,7 +1,7 @@ /* $NetBSD: ehcireg.h,v 1.17 2004/06/23 06:45:56 mycroft Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h index 0fec5a761cd7..7859646080c8 100644 --- a/sys/dev/usb/ehcivar.h +++ b/sys/dev/usb/ehcivar.h @@ -1,7 +1,7 @@ /* $NetBSD: ehcivar.h,v 1.12 2001/12/31 12:16:57 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c index f083a17cf681..1c1fcbdbbc9d 100644 --- a/sys/dev/usb/hid.c +++ b/sys/dev/usb/hid.c @@ -3,7 +3,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/hid.h b/sys/dev/usb/hid.h index 590e7cb585c6..a4ab7d2b2969 100644 --- a/sys/dev/usb/hid.h +++ b/sys/dev/usb/hid.h @@ -1,7 +1,7 @@ /* $NetBSD: hid.h,v 1.6 2000/06/01 14:28:57 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h index 478ceced0c22..eaa587a6fefc 100644 --- a/sys/dev/usb/if_auereg.h +++ b/sys/dev/usb/if_auereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index ef477d8cc7c4..ad9fdea16e60 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000-2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_axereg.h b/sys/dev/usb/if_axereg.h index 04fa92df8e51..cea2f46f5b44 100644 --- a/sys/dev/usb/if_axereg.h +++ b/sys/dev/usb/if_axereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000-2003 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index b7e715a25539..e379428519a0 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_cuereg.h b/sys/dev/usb/if_cuereg.h index beaf1d5a39d1..85fc71e8b45c 100644 --- a/sys/dev/usb/if_cuereg.h +++ b/sys/dev/usb/if_cuereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 1e21d9cc66bf..9a4258bd72c1 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_kuereg.h b/sys/dev/usb/if_kuereg.h index 4fa829516fb9..5ea0226518cd 100644 --- a/sys/dev/usb/if_kuereg.h +++ b/sys/dev/usb/if_kuereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index c7d3c45c784d..96ef08ffa762 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,7 +1,7 @@ /* $NetBSD: if_udav.c,v 1.2 2003/09/04 15:17:38 tsutsui Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2003 * Shingo WATANABE . All rights reserved. * diff --git a/sys/dev/usb/if_udavreg.h b/sys/dev/usb/if_udavreg.h index 7680422a65e3..965cbdc7cb57 100644 --- a/sys/dev/usb/if_udavreg.h +++ b/sys/dev/usb/if_udavreg.h @@ -1,7 +1,7 @@ /* $NetBSD: if_udavreg.h,v 1.2 2003/09/04 15:17:39 tsutsui Exp $ */ /* $nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2003 * Shingo WATANABE . All rights reserved. * diff --git a/sys/dev/usb/kue_fw.h b/sys/dev/usb/kue_fw.h index 8d8c1e1f2f0c..659dc6bb78f3 100644 --- a/sys/dev/usb/kue_fw.h +++ b/sys/dev/usb/kue_fw.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 3cafad713ef1..47e8b3fa01dd 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -15,7 +15,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ohcireg.h b/sys/dev/usb/ohcireg.h index 4c0a6c260703..c255a4b28f34 100644 --- a/sys/dev/usb/ohcireg.h +++ b/sys/dev/usb/ohcireg.h @@ -2,7 +2,7 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h index 19ec182009c2..f9b05176e0f0 100644 --- a/sys/dev/usb/ohcivar.h +++ b/sys/dev/usb/ohcivar.h @@ -1,7 +1,7 @@ /* $NetBSD: ohcivar.h,v 1.30 2001/12/31 12:20:35 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/rio500_usb.h b/sys/dev/usb/rio500_usb.h index c2da72e91b11..f2c2081ccc9d 100644 --- a/sys/dev/usb/rio500_usb.h +++ b/sys/dev/usb/rio500_usb.h @@ -1,4 +1,5 @@ -/* ---------------------------------------------------------------------- +/*- + ---------------------------------------------------------------------- Copyright (C) 2000 Cesar Miquel (miquel@df.uba.ar) diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index 0efc57773712..271c1729b511 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -26,7 +26,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 601af2a0e125..ab2017be1b10 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 Bernd Walter * * $URL: https://devel.bwct.de/svn/projects/ubser/ubser.c $ @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ubser.h b/sys/dev/usb/ubser.h index d1cc2c6b5969..45c7ec558eaa 100644 --- a/sys/dev/usb/ubser.h +++ b/sys/dev/usb/ubser.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 Bernd Walter * * $URL: https://devel.bwct.de/svn/projects/ubser/ubser.h $ diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 98856b5add29..30cf93059eb3 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -29,7 +29,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ucomvar.h b/sys/dev/usb/ucomvar.h index 3c6a487f18fc..e8a51fe3fd21 100644 --- a/sys/dev/usb/ucomvar.h +++ b/sys/dev/usb/ucomvar.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/udbp.c b/sys/dev/usb/udbp.c index 2bedbbe092d8..1ad11bccfb56 100644 --- a/sys/dev/usb/udbp.c +++ b/sys/dev/usb/udbp.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-2000 Whistle Communications, Inc. * All rights reserved. * diff --git a/sys/dev/usb/udbp.h b/sys/dev/usb/udbp.h index 0b7b4eeae7e0..97ef9455b664 100644 --- a/sys/dev/usb/udbp.h +++ b/sys/dev/usb/udbp.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1996-2000 Whistle Communications, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c index 66b7376c43f3..8439abb2cad2 100644 --- a/sys/dev/usb/ufm.c +++ b/sys/dev/usb/ufm.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2001 M. Warner Losh * All rights reserved. * diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c index a053a4d2c05d..5532e72b5a11 100644 --- a/sys/dev/usb/uftdi.c +++ b/sys/dev/usb/uftdi.c @@ -1,6 +1,6 @@ /* $NetBSD: uftdi.c,v 1.13 2002/09/23 05:51:23 simonb Exp $ */ -/* +/*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 2606d8e1bbcd..7d0131b8c410 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -10,7 +10,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ugraphire_rdesc.h b/sys/dev/usb/ugraphire_rdesc.h index 9dd6988ab907..295f2a0db785 100644 --- a/sys/dev/usb/ugraphire_rdesc.h +++ b/sys/dev/usb/ugraphire_rdesc.h @@ -1,6 +1,6 @@ /* $NetBSD: usb/ugraphire_rdesc.h,v 1.1 2000/12/29 01:47:49 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2000 Nick Hibma * All rights reserved. * diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index bc424d7fcf28..213c6b3d2a67 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -14,7 +14,7 @@ __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uhcireg.h b/sys/dev/usb/uhcireg.h index b640e9f9e8aa..512dd2d7d3c0 100644 --- a/sys/dev/usb/uhcireg.h +++ b/sys/dev/usb/uhcireg.h @@ -1,7 +1,7 @@ /* $NetBSD: uhcireg.h,v 1.15 2002/02/11 11:41:30 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h index 56709803c788..2ba9d6f06464 100644 --- a/sys/dev/usb/uhcivar.h +++ b/sys/dev/usb/uhcivar.h @@ -1,7 +1,7 @@ /* $NetBSD: uhcivar.h,v 1.33 2002/02/11 11:41:30 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 705fd9b68423..634d0e0f5efe 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -7,7 +7,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 0c07211a659b..88927568362a 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,6 +1,6 @@ /* $NetBSD: uhub.c,v 1.68 2004/06/29 06:30:05 mycroft Exp $ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index be072f8123ac..599370ca02ea 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1,5 +1,4 @@ - -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 4be53b3dae8d..9716b65ea9ff 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,6 +1,6 @@ /* $NetBSD: ulpt.c,v 1.60 2003/10/04 21:19:50 augustss Exp $ */ -/* +/*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 4aa7d915ff7d..7b8e12f5b857 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); * SUCH DAMAGE. */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 98f7543704e1..3e4c47beb091 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -1,5 +1,4 @@ - -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index 6e978a8a99f6..246c394bba0c 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -29,7 +29,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 33e04e9194d6..68efc9c19e54 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000 Iwasa Kazmi * All rights reserved. * diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 640ac7250ad5..d10eb4accc53 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -10,7 +10,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index e5278596f3ce..f4559c1ea633 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,7 +1,7 @@ /* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_ethersubr.c b/sys/dev/usb/usb_ethersubr.c index 325f3db48eea..642f94a24119 100644 --- a/sys/dev/usb/usb_ethersubr.c +++ b/sys/dev/usb/usb_ethersubr.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/usb_ethersubr.h b/sys/dev/usb/usb_ethersubr.h index c8a40108ef5c..9cd6c7915e7b 100644 --- a/sys/dev/usb/usb_ethersubr.h +++ b/sys/dev/usb/usb_ethersubr.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * diff --git a/sys/dev/usb/usb_if.m b/sys/dev/usb/usb_if.m index c1b27c8a4bec..b04c8a45a4c4 100644 --- a/sys/dev/usb/usb_if.m +++ b/sys/dev/usb/usb_if.m @@ -1,4 +1,4 @@ -# +#- # Copyright (c) 1992-1998 Nick Hibma # All rights reserved. # diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c index 82b678e82b5c..f9a59eb3c6d9 100644 --- a/sys/dev/usb/usb_mem.c +++ b/sys/dev/usb/usb_mem.c @@ -1,7 +1,7 @@ /* $NetBSD: usb_mem.c,v 1.26 2003/02/01 06:23:40 thorpej Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index bba88d582082..6fe63f3e3385 100644 --- a/sys/dev/usb/usb_mem.h +++ b/sys/dev/usb/usb_mem.h @@ -1,7 +1,7 @@ /* $NetBSD: usb_mem.h,v 1.18 2002/05/28 17:45:17 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 38dd65e5aa2e..270a2ad1262d 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -7,7 +7,7 @@ * $NetBSD: usb_port.h,v 1.58 2002/10/01 01:25:26 thorpej Exp $ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index 895d7d6c1be0..01c155f753cb 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -1,6 +1,6 @@ /* $NetBSD: usb_quirks.c,v 1.50 2004/06/23 02:30:52 mycroft Exp $ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h index 2a36a0649bab..4977bf605b40 100644 --- a/sys/dev/usb/usb_quirks.h +++ b/sys/dev/usb/usb_quirks.h @@ -1,7 +1,7 @@ /* $NetBSD: usb_quirks.h,v 1.20 2001/04/15 09:38:01 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index fa21645137a0..e6fa74ac1dd4 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -12,7 +12,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbcdc.h b/sys/dev/usb/usbcdc.h index 45266e44302c..305c53cf634a 100644 --- a/sys/dev/usb/usbcdc.h +++ b/sys/dev/usb/usbcdc.h @@ -1,7 +1,7 @@ /* $NetBSD: usbcdc.h,v 1.6 2000/04/27 15:26:50 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index f55332216bc2..43a73cfa38b3 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,7 +1,7 @@ $FreeBSD$ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ -/* +/*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index b313d8f7c8f8..e5e4fd05c535 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -3,7 +3,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 4bb41829d5ec..d3dac2e987d6 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,7 +1,7 @@ /* $NetBSD: usbdi.h,v 1.64 2004/10/23 13:26:34 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 8fdd1cc8f7a9..e18c6d38e9f9 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,6 +1,6 @@ /* $NetBSD: usbdi_util.c,v 1.36 2001/11/13 06:24:57 lukem Exp $ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h index a6a3646b13a4..51e052f712f8 100644 --- a/sys/dev/usb/usbdi_util.h +++ b/sys/dev/usb/usbdi_util.h @@ -1,7 +1,7 @@ /* $NetBSD: usbdi_util.h,v 1.29 2004/06/23 02:30:52 mycroft Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h index 4be8d648561e..69f236638b1a 100644 --- a/sys/dev/usb/usbdivar.h +++ b/sys/dev/usb/usbdivar.h @@ -1,7 +1,7 @@ /* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/usbhid.h b/sys/dev/usb/usbhid.h index 416aec3f2e56..8e0ecd579907 100644 --- a/sys/dev/usb/usbhid.h +++ b/sys/dev/usb/usbhid.h @@ -1,7 +1,7 @@ /* $NetBSD: usbhid.h,v 1.9 2000/09/03 19:09:14 augustss Exp $ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 0c729262fc3f..aaabaf630a22 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -7,7 +7,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index 68214e775d46..fcce25057543 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -14,7 +14,7 @@ */ -/* +/*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * diff --git a/sys/dev/utopia/idtphy.h b/sys/dev/utopia/idtphy.h index dacb2afedef3..1451d0561fa3 100644 --- a/sys/dev/utopia/idtphy.h +++ b/sys/dev/utopia/idtphy.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/utopia/suni.h b/sys/dev/utopia/suni.h index ac8e9978fc9c..fd1be7e13e39 100644 --- a/sys/dev/utopia/suni.h +++ b/sys/dev/utopia/suni.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c index 263f4b9f20e4..e4a7c01b358f 100644 --- a/sys/dev/utopia/utopia.c +++ b/sys/dev/utopia/utopia.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/utopia/utopia.h b/sys/dev/utopia/utopia.h index ae044f98f08d..0c95aa344d4f 100644 --- a/sys/dev/utopia/utopia.h +++ b/sys/dev/utopia/utopia.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). * All rights reserved. diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 14c5efc620be..0bac802238a0 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Bill Paul . All rights reserved. * diff --git a/sys/dev/vge/if_vgereg.h b/sys/dev/vge/if_vgereg.h index 9b7e5869e107..8d11a9c3e1f6 100644 --- a/sys/dev/vge/if_vgereg.h +++ b/sys/dev/vge/if_vgereg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Bill Paul . All rights reserved. * diff --git a/sys/dev/vge/if_vgevar.h b/sys/dev/vge/if_vgevar.h index ad298c49d850..f8003744a7cb 100644 --- a/sys/dev/vge/if_vgevar.h +++ b/sys/dev/vge/if_vgevar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004 * Bill Paul . All rights reserved. * diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c index b5c0c713f88a..e66aaca4b0c9 100644 --- a/sys/dev/vkbd/vkbd.c +++ b/sys/dev/vkbd/vkbd.c @@ -1,4 +1,4 @@ -/* +/*- * vkbd.c * * Copyright (c) 2004 Maksim Yevmenkin diff --git a/sys/dev/vkbd/vkbd_var.h b/sys/dev/vkbd/vkbd_var.h index 20c5100fcdfa..51e7ff467d17 100644 --- a/sys/dev/vkbd/vkbd_var.h +++ b/sys/dev/vkbd/vkbd_var.h @@ -1,4 +1,4 @@ -/* +/*- * vkbd_var.h * * Copyright (c) 2004 Maksim Yevmenkin diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index e9d8699a4396..5b049bf61c68 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Herb Peyerl * All rights reserved. * diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c index 28c92f095e55..bbccb5ba1077 100644 --- a/sys/dev/vx/if_vx_eisa.c +++ b/sys/dev/vx/if_vx_eisa.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1996 Naoki Hamada * All rights reserved. * diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index f8b716ffba70..220da32e7d51 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (C) 1996 Naoki Hamada * All rights reserved. * diff --git a/sys/dev/vx/if_vxreg.h b/sys/dev/vx/if_vxreg.h index 8a8e5ae43dd2..b876782ca8cb 100644 --- a/sys/dev/vx/if_vxreg.h +++ b/sys/dev/vx/if_vxreg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/vx/if_vxvar.h b/sys/dev/vx/if_vxvar.h index 3607afe50977..8b3a27cdc35a 100644 --- a/sys/dev/vx/if_vxvar.h +++ b/sys/dev/vx/if_vxvar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/wds/wd7000.c b/sys/dev/wds/wd7000.c index cf0ad21bf3fc..384dd08be1c3 100644 --- a/sys/dev/wds/wd7000.c +++ b/sys/dev/wds/wd7000.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * Copyright (c) 2000 Sergey A. Babkin * All rights reserved. diff --git a/sys/dev/wi/if_wavelan_ieee.h b/sys/dev/wi/if_wavelan_ieee.h index d48ba6e6b864..585edaa237fa 100644 --- a/sys/dev/wi/if_wavelan_ieee.h +++ b/sys/dev/wi/if_wavelan_ieee.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 06973d204be2..4c77f9ef7a13 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -1,6 +1,6 @@ /* $NetBSD: wi.c,v 1.109 2003/01/09 08:52:19 dyoung Exp $ */ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c index 549825b72be3..75355a233613 100644 --- a/sys/dev/wi/if_wi_pccard.c +++ b/sys/dev/wi/if_wi_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/wi/if_wi_pci.c b/sys/dev/wi/if_wi_pci.c index 5d11d4d20aa7..932a0c34bec6 100644 --- a/sys/dev/wi/if_wi_pci.c +++ b/sys/dev/wi/if_wi_pci.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/wi/if_wireg.h b/sys/dev/wi/if_wireg.h index 03c6e22de150..7992f891c481 100644 --- a/sys/dev/wi/if_wireg.h +++ b/sys/dev/wi/if_wireg.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. * diff --git a/sys/dev/wi/if_wivar.h b/sys/dev/wi/if_wivar.h index facc42ba38ee..0cb26e959400 100644 --- a/sys/dev/wi/if_wivar.h +++ b/sys/dev/wi/if_wivar.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 * M Warner Losh . All rights reserved. * Copyright (c) 1997, 1998, 1999 diff --git a/sys/dev/wi/spectrum24t_cf.h b/sys/dev/wi/spectrum24t_cf.h index 7f1d2b023272..ce053fa1930c 100644 --- a/sys/dev/wi/spectrum24t_cf.h +++ b/sys/dev/wi/spectrum24t_cf.h @@ -1,7 +1,7 @@ /* $NetBSD$ */ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2001 Symbol Technologies Inc. -- http://www.symbol.com * All rights reserved. * diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index 25296b5968c1..113a985d4a75 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -1,4 +1,4 @@ -/* +/*- * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/dev/wl/if_wl.h b/sys/dev/wl/if_wl.h index 7f9c2270ed0e..e883b782b046 100644 --- a/sys/dev/wl/if_wl.h +++ b/sys/dev/wl/if_wl.h @@ -1,4 +1,4 @@ -/* +/*- * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index c60fa0a60399..a1db1029a61e 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* +/*- * Portions of this software were derived from Werner Koch's xirc2ps driver * for Linux under the terms of the following license (from v1.30 of the * xirc2ps driver): diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index af014b94027f..8d9f7672b7fc 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2002 Takeshi Shibagaki * All rights reserved. * diff --git a/sys/dev/zs/z8530reg.h b/sys/dev/zs/z8530reg.h index 9b191d28ba90..b471c9c4deb5 100644 --- a/sys/dev/zs/z8530reg.h +++ b/sys/dev/zs/z8530reg.h @@ -1,6 +1,6 @@ /* $NetBSD: z8530reg.h,v 1.8 1996/12/13 21:02:39 gwr Exp $ */ -/* +/*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * -- cgit v1.3