DEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 21 Jul 2003 05:50:47 +0000 (05:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 21 Jul 2003 05:50:47 +0000 (05:50 +0000)
and auto-queueing mask.  The mask will tell us which message functions
can be safely queued to another thread and which still need to run in the
context of the caller.   Primary configuration fields (name, cmaj, flags,
port, autoq mask) are now at the head of the structure.  Function vectors,
which may eventually go away, are at the end.  The port and autoq fields
are non-functional in this stage.

The old BDEV device major number support has also been removed from cdevsw,
and code has been added to translate the bootdev passed from the boot code
(the boot code has always passed the now defunct block device major numbers
and we obviously need to keep that compatibility intact).

143 files changed:
sys/boot/i386/libi386/biosdisk.c
sys/boot/pc32/libi386/biosdisk.c
sys/bus/cam/cam_xpt.c
sys/bus/cam/scsi/scsi_cd.c
sys/bus/cam/scsi/scsi_ch.c
sys/bus/cam/scsi/scsi_da.c
sys/bus/cam/scsi/scsi_pass.c
sys/bus/cam/scsi/scsi_pt.c
sys/bus/cam/scsi/scsi_sa.c
sys/bus/cam/scsi/scsi_ses.c
sys/bus/cam/scsi/scsi_target.c
sys/bus/firewire/fwdev.c
sys/bus/iicbus/iic.c
sys/bus/isa/vga_isa.c
sys/bus/pccard/pccard.c
sys/bus/pci/pci.c
sys/bus/smbus/smb.c
sys/bus/usb/usb.c
sys/contrib/dev/fla/fla.c
sys/contrib/ipfilter/netinet/mlfk_ipl.c
sys/dev/agp/agp.c
sys/dev/atm/hfa/fore_load.c
sys/dev/disk/ata/ata-all.c
sys/dev/disk/ata/ata-disk.c
sys/dev/disk/ata/ata-raid.c
sys/dev/disk/ata/atapi-cd.c
sys/dev/disk/ata/atapi-fd.c
sys/dev/disk/ata/atapi-tape.c
sys/dev/disk/ccd/ccd.c
sys/dev/disk/fd/fd.c
sys/dev/disk/isp/isp_freebsd.c
sys/dev/disk/mcd/mcd.c
sys/dev/disk/md/md.c
sys/dev/disk/scd/scd.c
sys/dev/disk/vn/vn.c
sys/dev/disk/wcd/wd_cd.c
sys/dev/disk/wd/wd.c
sys/dev/disk/wfd/wfd.c
sys/dev/disk/wst/wst.c
sys/dev/disk/wt/wt.c
sys/dev/drm/drm_drv.h
sys/dev/misc/gpib/gpib.c
sys/dev/misc/joy/joy.c
sys/dev/misc/kbd/kbd.c
sys/dev/misc/labpc/labpc.c
sys/dev/misc/lpt/lpt.c
sys/dev/misc/mse/mse.c
sys/dev/misc/nmdm/nmdm.c
sys/dev/misc/pcfclock/pcfclock.c
sys/dev/misc/ppi/ppi.c
sys/dev/misc/pps/pps.c
sys/dev/misc/psm/psm.c
sys/dev/misc/snp/snp.c
sys/dev/misc/spic/spic.c
sys/dev/misc/spigot/spigot.c
sys/dev/misc/streams/streams.c
sys/dev/misc/syscons/syscons.c
sys/dev/misc/syscons/sysmouse.c
sys/dev/misc/tw/tw.c
sys/dev/misc/xrpu/xrpu.c
sys/dev/netif/cx/cx.c
sys/dev/raid/aac/aac.c
sys/dev/raid/aac/aac_disk.c
sys/dev/raid/amr/amr.c
sys/dev/raid/amr/amr_disk.c
sys/dev/raid/asr/asr.c
sys/dev/raid/ciss/ciss.c
sys/dev/raid/dpt/dpt_control.c
sys/dev/raid/ida/ida_disk.c
sys/dev/raid/iir/iir_ctrl.c
sys/dev/raid/mlx/mlx.c
sys/dev/raid/mlx/mlx_disk.c
sys/dev/raid/mly/mly.c
sys/dev/raid/pst/pst-raid.c
sys/dev/raid/twe/twe_freebsd.c
sys/dev/raid/vinum/vinum.c
sys/dev/raid/vinum/vinumvar.h
sys/dev/serial/cy/cy.c
sys/dev/serial/dgb/dgm.c
sys/dev/serial/rc/rc.c
sys/dev/serial/rp/rp.c
sys/dev/serial/rp2/rp.c
sys/dev/serial/si/si.c
sys/dev/serial/sio/sio.c
sys/dev/serial/stl/stallion.c
sys/dev/serial/stli/istallion.c
sys/dev/sound/isa/i386/pca/pcaudio.c
sys/dev/sound/isa/i386/soundcard.c
sys/dev/sound/isa/i386/spkr/spkr.c
sys/dev/sound/pcm/dsp.c
sys/dev/sound/pcm/mixer.c
sys/dev/sound/pcm/sndstat.c
sys/dev/usbmisc/ucom/ucom.c
sys/dev/usbmisc/ufm/ufm.c
sys/dev/usbmisc/ugen/ugen.c
sys/dev/usbmisc/uhid/uhid.c
sys/dev/usbmisc/ulpt/ulpt.c
sys/dev/usbmisc/umodem/umodem.c
sys/dev/usbmisc/ums/ums.c
sys/dev/usbmisc/urio/urio.c
sys/dev/usbmisc/uscanner/uscanner.c
sys/dev/video/bktr/bktr_os.c
sys/dev/video/ctx/ctx.c
sys/dev/video/fb/fb.c
sys/dev/video/gsc/gsc.c
sys/dev/video/meteor/meteor.c
sys/dev/video/pcvt/i386/pcvt_drv.c
sys/dev/video/tga/tga_pci.c
sys/i386/apm/apm.c
sys/i386/gnu/isa/dgb.c
sys/i386/i386/autoconf.c
sys/i386/i386/elan-mmcr.c
sys/i386/i386/mem.c
sys/i386/i386/perfmon.c
sys/i386/isa/asc.c
sys/kern/kern_conf.c
sys/kern/kern_descrip.c
sys/kern/kern_memio.c
sys/kern/subr_log.c
sys/kern/tty_cons.c
sys/kern/tty_pty.c
sys/kern/tty_tty.c
sys/net/bpf.c
sys/net/i4b/driver/i4b_ctl.c
sys/net/i4b/driver/i4b_rbch.c
sys/net/i4b/driver/i4b_tel.c
sys/net/i4b/driver/i4b_trace.c
sys/net/i4b/layer4/i4b_i4bdrv.c
sys/net/tap/if_tap.c
sys/net/tun/if_tun.c
sys/netgraph/ng_device.c
sys/netproto/smb/smb_dev.c
sys/opencrypto/cryptodev.c
sys/platform/pc32/apm/apm.c
sys/platform/pc32/gnu/isa/dgb.c
sys/platform/pc32/i386/autoconf.c
sys/platform/pc32/i386/elan-mmcr.c
sys/platform/pc32/i386/mem.c
sys/platform/pc32/i386/perfmon.c
sys/platform/pc32/isa/asc.c
sys/sys/conf.h
sys/vfs/coda/coda_fbsd.c
sys/vfs/mfs/mfs_vfsops.c

index 6de10e7..b728e8d 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.26.2.6 2000/12/28 13:10:47 ps Exp $
- * $DragonFly: src/sys/boot/i386/libi386/Attic/biosdisk.c,v 1.2 2003/06/17 04:28:18 dillon Exp $
+ * $DragonFly: src/sys/boot/i386/libi386/Attic/biosdisk.c,v 1.3 2003/07/21 05:50:22 dillon Exp $
  */
 
 /*
@@ -41,6 +41,7 @@
 
 #include <sys/disklabel.h>
 #include <sys/diskslice.h>
+#include <sys/bootmaj.h>
 #include <sys/reboot.h>
 
 #include <stdarg.h>
 #define BUFSIZE                        (1 * BIOSDISK_SECSIZE)
 #define        MAXBDDEV                MAXDEV
 
-#define DT_ATAPI               0x10            /* disk type for ATAPI floppies */
-#define WDMAJOR                        0               /* major numbers for devices we frontend for */
-#define WFDMAJOR               1
-#define FDMAJOR                        2
-#define DAMAJOR                        4
+#define DT_ATAPI               0x10    /* disk type for ATAPI floppies */
 
 #ifdef DISK_DEBUG
 # define DEBUG(fmt, args...)   printf("%s: " fmt "\n" , __FUNCTION__ , ## args)
index 2268317..3a25fd2 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.26.2.6 2000/12/28 13:10:47 ps Exp $
- * $DragonFly: src/sys/boot/pc32/libi386/biosdisk.c,v 1.2 2003/06/17 04:28:18 dillon Exp $
+ * $DragonFly: src/sys/boot/pc32/libi386/biosdisk.c,v 1.3 2003/07/21 05:50:22 dillon Exp $
  */
 
 /*
@@ -41,6 +41,7 @@
 
 #include <sys/disklabel.h>
 #include <sys/diskslice.h>
+#include <sys/bootmaj.h>
 #include <sys/reboot.h>
 
 #include <stdarg.h>
 #define BUFSIZE                        (1 * BIOSDISK_SECSIZE)
 #define        MAXBDDEV                MAXDEV
 
-#define DT_ATAPI               0x10            /* disk type for ATAPI floppies */
-#define WDMAJOR                        0               /* major numbers for devices we frontend for */
-#define WFDMAJOR               1
-#define FDMAJOR                        2
-#define DAMAJOR                        4
+#define DT_ATAPI               0x10    /* disk type for ATAPI floppies */
 
 #ifdef DISK_DEBUG
 # define DEBUG(fmt, args...)   printf("%s: " fmt "\n" , __FUNCTION__ , ## args)
index c4cc3b6..ecadded 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.80.2.18 2002/12/09 17:31:55 gibbs Exp $
- * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.4 2003/06/29 03:28:39 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.5 2003/07/21 05:50:24 dillon Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -604,6 +604,12 @@ static d_close_t xptclose;
 static d_ioctl_t xptioctl;
 
 static struct cdevsw xpt_cdevsw = {
+       /* name */      "xpt",
+       /* maj */       XPT_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      xptopen,
        /* close */     xptclose,
        /* read */      noread,
@@ -612,12 +618,8 @@ static struct cdevsw xpt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "xpt",
-       /* maj */       XPT_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct intr_config_hook *xpt_config_hook;
index 4c8dfd1..2cc1644 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.31.2.13 2002/11/25 05:30:31 njl Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.5 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.6 2003/07/21 05:50:24 dillon Exp $
  */
 /*
  * Portions of this driver taken from the original FreeBSD cd driver.
@@ -50,6 +50,7 @@
 #include "opt_cd.h"
 
 #include <sys/param.h>
+#include <sys/bootmaj.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/buf.h>
@@ -179,9 +180,6 @@ static struct cd_quirk_entry cd_quirk_table[] =
 #define MIN(x,y) ((x<y) ? x : y)
 #endif
 
-#define CD_CDEV_MAJOR 15
-#define CD_BDEV_MAJOR 6
-
 static d_open_t        cdopen;
 static d_close_t       cdclose;
 static d_ioctl_t       cdioctl;
@@ -258,6 +256,12 @@ DATA_SET(periphdriver_set, cddriver);
 #define D_DISK 0
 #endif
 static struct cdevsw cd_cdevsw = {
+       /* name */      "cd",
+       /* maj */       SCSICD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      cdopen,
        /* close */     cdclose,
        /* read */      physread,
@@ -266,12 +270,8 @@ static struct cdevsw cd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  cdstrategy,
-       /* name */      "cd",
-       /* maj */       CD_CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      CD_BDEV_MAJOR
 };
 static struct cdevsw cddisk_cdevsw;
 
index 7ecf2b1..98e560b 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.20.2.2 2000/10/31 08:09:49 dwmalone Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.4 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.5 2003/07/21 05:50:24 dillon Exp $
  */
 /*
  * Derived from the NetBSD SCSI changer driver.
@@ -216,6 +216,12 @@ static struct periph_driver chdriver =
 DATA_SET(periphdriver_set, chdriver);
 
 static struct cdevsw ch_cdevsw = {
+       /* name */      "ch",
+       /* maj */       CH_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      chopen,
        /* close */     chclose,
        /* read */      noread,
@@ -224,12 +230,8 @@ static struct cdevsw ch_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ch",
-       /* maj */       CH_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct extend_array *chperiphs;
index f9a0072..e05a0ca 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.36 2003/05/17 21:48:30 njl Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.5 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.6 2003/07/21 05:50:24 dillon Exp $
  */
 
 #ifdef _KERNEL
@@ -34,6 +34,7 @@
 #endif /* _KERNEL */
 
 #include <sys/param.h>
+#include <sys/bootmaj.h>
 
 #ifdef _KERNEL
 #include <sys/systm.h>
@@ -564,15 +565,18 @@ static struct periph_driver dadriver =
 
 DATA_SET(periphdriver_set, dadriver);
 
-#define DA_CDEV_MAJOR 13
-#define DA_BDEV_MAJOR 4
-
 /* For 2.2-stable support */
 #ifndef D_DISK
 #define D_DISK 0
 #endif
 
 static struct cdevsw da_cdevsw = {
+       /* name */      "da",
+       /* maj */       DA_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      daopen,
        /* close */     daclose,
        /* read */      physread,
@@ -581,12 +585,8 @@ static struct cdevsw da_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  dastrategy,
-       /* name */      "da",
-       /* maj */       DA_CDEV_MAJOR,
        /* dump */      dadump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      DA_BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 static struct cdevsw dadisk_cdevsw;
index c45b18f..2828537 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.19 2000/01/17 06:27:37 mjacob Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.5 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.6 2003/07/21 05:50:24 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -118,6 +118,12 @@ static struct periph_driver passdriver =
 DATA_SET(periphdriver_set, passdriver);
 
 static struct cdevsw pass_cdevsw = {
+       /* name */      "pass",
+       /* maj */       PASS_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      passopen,
        /* close */     passclose,
        /* read */      physread,
@@ -126,12 +132,8 @@ static struct cdevsw pass_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  passstrategy,
-       /* name */      "pass",
-       /* maj */       PASS_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct extend_array *passperiphs;
index 2b38045..8402d7e 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.17 2000/01/17 06:27:37 mjacob Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.3 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.4 2003/07/21 05:50:24 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -120,6 +120,12 @@ DATA_SET(periphdriver_set, ptdriver);
 #define PT_CDEV_MAJOR 61
 
 static struct cdevsw pt_cdevsw = {
+       /* name */      "pt",
+       /* maj */       PT_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ptopen,
        /* close */     ptclose,
        /* read */      physread,
@@ -128,12 +134,8 @@ static struct cdevsw pt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  ptstrategy,
-       /* name */      "pt",
-       /* maj */       PT_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct extend_array *ptperiphs;
index 6e46265..6f2d308 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * $FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.45.2.13 2002/12/17 17:08:50 trhodes Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.5 2003/07/19 21:14:14 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.6 2003/07/21 05:50:24 dillon Exp $
  *
  * Implementation of SCSI Sequential Access Peripheral driver for CAM.
  *
@@ -430,6 +430,12 @@ DATA_SET(periphdriver_set, sadriver);
 #define SA_CDEV_MAJOR 14
 
 static struct cdevsw sa_cdevsw = {
+       /* name */      "sa",
+       /* maj */       SA_CDEV_MAJOR,
+       /* flags */     D_TAPE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      saopen,
        /* close */     saclose,
        /* read */      physread,
@@ -438,12 +444,8 @@ static struct cdevsw sa_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  sastrategy,
-       /* name */      "sa",
-       /* maj */       SA_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TAPE,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct extend_array *saperiphs;
index f99a631..338dfde 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.8.2.2 2000/08/08 23:19:21 mjacob Exp $ */
-/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.3 2003/07/19 21:14:15 dillon Exp $ */
+/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.4 2003/07/21 05:50:24 dillon Exp $ */
 /*
  * Copyright (c) 2000 Matthew Jacob
  * All rights reserved.
@@ -179,8 +179,13 @@ static struct periph_driver sesdriver = {
 
 DATA_SET(periphdriver_set, sesdriver);
 
-static struct cdevsw ses_cdevsw = 
-{
+static struct cdevsw ses_cdevsw = {
+       /* name */      "ses",
+       /* maj */       SES_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      sesopen,
        /* close */     sesclose,
        /* read */      noread,
@@ -189,12 +194,8 @@ static struct cdevsw ses_cdevsw =
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ses",
-       /* maj */       SES_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 static struct extend_array *sesperiphs;
 
index 2e9c434..47ba243 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.22.2.7 2003/02/18 22:07:10 njl Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.3 2003/07/19 21:14:15 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.4 2003/07/21 05:50:24 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -103,6 +103,12 @@ static struct filterops targread_filtops =
 
 #define TARG_CDEV_MAJOR 65
 static struct cdevsw targ_cdevsw = {
+       /* name */      "targ",
+       /* maj */       TARG_CDEV_MAJOR,
+       /* flags */     D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      targopen,
        /* close */     targclose,
        /* read */      targread,
@@ -111,12 +117,8 @@ static struct cdevsw targ_cdevsw = {
        /* poll */      targpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "targ",
-       /* maj */       TARG_CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_KQFILTER,
-       /* bmaj */      -1,
        /* kqfilter */  targkqfilter
 };
 
index 9ac3d73..f1d6d65 100644 (file)
@@ -32,7 +32,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  * 
  * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.2.4.11 2003/04/28 03:29:18 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.3 2003/06/23 17:55:30 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.4 2003/07/21 05:50:30 dillon Exp $
  *
  */
 
@@ -83,8 +83,9 @@ struct cdevsw firewire_cdevsw =
        .d_maj =        CDEV_MAJOR,
        .d_flags =      D_MEM
 #else
+       "fw", CDEV_MAJOR, D_MEM, NULL, 0,
        fw_open, fw_close, fw_read, fw_write, fw_ioctl,
-       fw_poll, fw_mmap, nostrategy, "fw", CDEV_MAJOR, nodump, nopsize, D_MEM
+       fw_poll, fw_mmap, nostrategy, nodump, nopsize,
 #endif
 };
 
index 24928f2..fdeafc2 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/iicbus/iic.c,v 1.18 1999/11/18 05:43:32 peter Exp $
- * $DragonFly: src/sys/bus/iicbus/iic.c,v 1.2 2003/06/17 04:28:27 dillon Exp $
+ * $DragonFly: src/sys/bus/iicbus/iic.c,v 1.3 2003/07/21 05:50:31 dillon Exp $
  *
  */
 #include <sys/param.h>
@@ -94,6 +94,12 @@ static       d_ioctl_t       iicioctl;
 
 #define CDEV_MAJOR 105
 static struct cdevsw iic_cdevsw = {
+       /* name */      "iic",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      iicopen,
        /* close */     iicclose,
        /* read */      iicread,
@@ -102,12 +108,8 @@ static struct cdevsw iic_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "iic",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /*
index 52b8194..5c051ea 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/vga_isa.c,v 1.17 2000/01/29 15:08:56 peter Exp $
- * $DragonFly: src/sys/bus/isa/vga_isa.c,v 1.2 2003/06/17 04:28:40 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/vga_isa.c,v 1.3 2003/07/21 05:50:42 dillon Exp $
  */
 
 #include "opt_vga.h"
@@ -89,6 +89,12 @@ static d_ioctl_t     isavga_ioctl;
 static d_mmap_t                isavga_mmap;
 
 static struct cdevsw isavga_cdevsw = {
+       /* name */      VGA_DRIVER_NAME,
+       /* maj */       -1,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      isavga_open,
        /* close */     isavga_close,
        /* read */      isavga_read,
@@ -97,12 +103,8 @@ static struct cdevsw isavga_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      isavga_mmap,
        /* strategy */  nostrategy,
-       /* name */      VGA_DRIVER_NAME,
-       /* maj */       -1,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #endif /* FB_INSTALL_CDEV */
index e0e48d7..10b81b6 100644 (file)
@@ -30,7 +30,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pccard/pccard.c,v 1.106.2.15 2003/02/26 18:42:00 imp Exp $
- * $DragonFly: src/sys/bus/pccard/pccard.c,v 1.4 2003/06/25 03:56:09 dillon Exp $
+ * $DragonFly: src/sys/bus/pccard/pccard.c,v 1.5 2003/07/21 05:50:46 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -83,6 +83,12 @@ static       d_poll_t        crdpoll;
 
 #define CDEV_MAJOR 50
 static struct cdevsw crd_cdevsw = {
+       /* name */      "crd",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      crdopen,
        /* close */     crdclose,
        /* read */      crdread,
@@ -91,11 +97,8 @@ static struct cdevsw crd_cdevsw = {
        /* poll */      crdpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "crd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 /*
index e59b979..7d6f4e9 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/pci.c,v 1.141.2.15 2002/04/30 17:48:18 tmm Exp $
- * $DragonFly: src/sys/bus/pci/pci.c,v 1.3 2003/06/23 17:55:49 dillon Exp $
+ * $DragonFly: src/sys/bus/pci/pci.c,v 1.4 2003/07/21 05:50:46 dillon Exp $
  *
  */
 
@@ -1076,6 +1076,12 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
 #define        PCI_CDEV        78
 
 static struct cdevsw pcicdev = {
+       /* name */      "pci",
+       /* maj */       PCI_CDEV,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      pci_open,
        /* close */     pci_close,
        /* read */      noread,
@@ -1084,12 +1090,8 @@ static struct cdevsw pcicdev = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "pci",
-       /* maj */       PCI_CDEV,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #include "pci_if.h"
index be91803..b89ddcb 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/smbus/smb.c,v 1.20 1999/11/18 05:44:56 peter Exp $
- * $DragonFly: src/sys/bus/smbus/smb.c,v 1.2 2003/06/17 04:28:29 dillon Exp $
+ * $DragonFly: src/sys/bus/smbus/smb.c,v 1.3 2003/07/21 05:50:35 dillon Exp $
  *
  */
 #include <sys/param.h>
@@ -95,6 +95,12 @@ static       d_ioctl_t       smbioctl;
 
 #define CDEV_MAJOR 106
 static struct cdevsw smb_cdevsw = {
+       /* name */      "smb",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      smbopen,
        /* close */     smbclose,
        /* read */      smbread,
@@ -103,12 +109,8 @@ static struct cdevsw smb_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "smb",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /*
index 55dfcf0..15c1ccc 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: usb.c,v 1.33 1999/11/22 21:57:09 augustss Exp $        */
 /*     $FreeBSD: src/sys/dev/usb/usb.c,v 1.26.2.9 2002/11/13 15:15:22 joe Exp $        */
-/*     $DragonFly: src/sys/bus/usb/usb.c,v 1.6 2003/07/19 21:14:30 dillon Exp $        */
+/*     $DragonFly: src/sys/bus/usb/usb.c,v 1.7 2003/07/21 05:50:37 dillon Exp $        */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -139,6 +139,12 @@ d_ioctl_t usbioctl;
 int usbpoll(dev_t, int, usb_proc_ptr);
 
 struct cdevsw usb_cdevsw = {
+       /* name */      "usb",
+       /* maj */       USB_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      usbopen,
        /* close */     usbclose,
        /* read */      usbread,
@@ -147,12 +153,8 @@ struct cdevsw usb_cdevsw = {
        /* poll */      usbpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "usb",
-       /* maj */       USB_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index 00a8416..5430001 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/contrib/dev/fla/fla.c,v 1.16 1999/12/08 04:45:16 ken Exp $ 
- * $DragonFly: src/sys/contrib/dev/fla/Attic/fla.c,v 1.2 2003/06/17 04:28:20 dillon Exp $ 
+ * $DragonFly: src/sys/contrib/dev/fla/Attic/fla.c,v 1.3 2003/07/21 05:50:25 dillon Exp $ 
  *
  */
 
@@ -57,6 +57,12 @@ static d_close_t flaclose;
 static d_ioctl_t flaioctl;
 
 static struct cdevsw fla_cdevsw = {
+        /* name */      "fla",
+        /* maj */       CDEV_MAJOR,
+        /* flags */     D_DISK | D_CANFREE,
+       /* port */      NULL,
+       /* autoq */     0,
+
         /* open */      flaopen,
         /* close */     flaclose,
         /* read */      physread,
@@ -65,12 +71,8 @@ static struct cdevsw fla_cdevsw = {
         /* poll */      nopoll,
         /* mmap */      nommap,
         /* strategy */  flastrategy,
-        /* name */      "fla",
-        /* maj */       CDEV_MAJOR,
         /* dump */      nodump,
-        /* psize */     nopsize,
-        /* flags */     D_DISK | D_CANFREE,
-        /* bmaj */      BDEV_MAJOR
+        /* psize */     nopsize
 };
 static struct cdevsw fladisk_cdevsw;
 
index b6c89c7..bd1992b 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.9.2.2 2002/04/27 17:37:12 darrenr Exp $
- * $DragonFly: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.2 2003/06/17 04:28:20 dillon Exp $
+ * $DragonFly: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.3 2003/07/21 05:50:26 dillon Exp $
  */
 
 
@@ -106,6 +106,12 @@ SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW,
 
 #define CDEV_MAJOR 79
 static struct cdevsw ipl_cdevsw = {
+       /* name */      "ipl",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      iplopen,
        /* close */     iplclose,
        /* read */      iplread,
@@ -114,12 +120,8 @@ static struct cdevsw ipl_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ipl",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int
index 3499523..0babd83 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/pci/agp.c,v 1.3.2.4 2002/08/11 19:58:12 alc Exp $
- *     $DragonFly: src/sys/dev/agp/agp.c,v 1.5 2003/07/19 21:14:49 dillon Exp $
+ *     $DragonFly: src/sys/dev/agp/agp.c,v 1.6 2003/07/21 05:50:46 dillon Exp $
  */
 
 #include "opt_bus.h"
@@ -70,6 +70,12 @@ static d_ioctl_t agp_ioctl;
 static d_mmap_t agp_mmap;
 
 static struct cdevsw agp_cdevsw = {
+       /* name */      "agp",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      agp_open,
        /* close */     agp_close,
        /* read */      noread,
@@ -78,12 +84,8 @@ static struct cdevsw agp_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      agp_mmap,
        /* strategy */  nostrategy,
-       /* name */      "agp",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TTY,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static devclass_t agp_devclass;
index c32209b..90f8959 100644 (file)
@@ -24,7 +24,7 @@
  * notice must be reproduced on all copies.
  *
  *     @(#) $FreeBSD: src/sys/dev/hfa/fore_load.c,v 1.13 1999/09/25 18:23:49 phk Exp $
- *     @(#) $DragonFly: src/sys/dev/atm/hfa/fore_load.c,v 1.2 2003/06/17 04:28:27 dillon Exp $
+ *     @(#) $DragonFly: src/sys/dev/atm/hfa/fore_load.c,v 1.3 2003/07/21 05:50:30 dillon Exp $
  */
 
 /*
@@ -1519,6 +1519,12 @@ fore_mod(cmd, vdp, vdi, vds)
  * Driver entry points
  */
 static struct cdevsw fore_cdev = {
+       /* name */      noname,
+       /* maj */       -1,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      noopen,
        /* close */     noclose,
        /* read */      noread,
@@ -1527,12 +1533,8 @@ static struct cdevsw fore_cdev = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      noname,
-       /* maj */       -1,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 429de14..21bb82c 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/ata-all.c,v 1.50.2.45 2003/03/12 14:47:12 sos Exp $
- * $DragonFly: src/sys/dev/disk/ata/ata-all.c,v 1.5 2003/07/19 21:14:18 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/ata-all.c,v 1.6 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include "opt_ata.h"
 /* device structures */
 static d_ioctl_t       ataioctl;
 static struct cdevsw ata_cdevsw = {  
+       /* name */      "ata",
+       /* maj */       159,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      nullopen,
        /* close */     nullclose,
        /* read */      noread,
@@ -72,11 +78,8 @@ static struct cdevsw ata_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ata",
-       /* maj */       159,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 /* prototypes */
index 67507c7..9c35db7 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.60.2.24 2003/01/30 07:19:59 sos Exp $
- * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.4 2003/06/23 17:55:29 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.5 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include "opt_ata.h"
@@ -60,7 +60,14 @@ static d_open_t              adopen;
 static d_close_t       adclose;
 static d_strategy_t    adstrategy;
 static d_dump_t                addump;
+
 static struct cdevsw ad_cdevsw = {
+       /* name */      "ad",
+       /* maj */       116,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      adopen,
        /* close */     adclose,
        /* read */      physread,
@@ -69,12 +76,8 @@ static struct cdevsw ad_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  adstrategy,
-       /* name */      "ad",
-       /* maj */       116,
        /* dump */      addump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      30
+       /* psize */     nopsize
 };
 static struct cdevsw addisk_cdevsw;
 
index ae86a70..bac923b 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.3.2.19 2003/01/30 07:19:59 sos Exp $
- * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.5 2003/07/19 21:14:18 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.6 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include "opt_ata.h"
 /* device structures */
 static d_open_t                aropen;
 static d_strategy_t    arstrategy;
+
 static struct cdevsw ar_cdevsw = {
+       /* name */      "ar",
+       /* maj */       157,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      aropen,
        /* close */     nullclose,
        /* read */      physread,
@@ -61,12 +68,8 @@ static struct cdevsw ar_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  arstrategy,
-       /* name */      "ar",
-       /* maj */       157,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };  
 static struct cdevsw ardisk_cdevsw;
 
index 5a6fbb8..ce76577 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.48.2.20 2002/11/25 05:30:31 njl Exp $
- * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.6 2003/07/19 21:14:18 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.7 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include "opt_ata.h"
@@ -56,7 +56,14 @@ static d_open_t              acdopen;
 static d_close_t       acdclose;
 static d_ioctl_t       acdioctl;
 static d_strategy_t    acdstrategy;
+
 static struct cdevsw acd_cdevsw = {
+       /* name */      "acd",
+       /* maj */       117,
+       /* flags */     D_DISK | D_TRACKCLOSE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      acdopen,
        /* close */     acdclose,
        /* read */      physread,
@@ -65,11 +72,8 @@ static struct cdevsw acd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  acdstrategy,
-       /* name */      "acd",
-       /* maj */       117,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK | D_TRACKCLOSE,
+       /* psize */     nopsize
 };
 
 /* prototypes */
index 039e09b..f925c4f 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.44.2.9 2002/07/31 11:19:26 sos Exp $
- * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.4 2003/06/23 17:55:29 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.5 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -51,7 +51,14 @@ static       d_open_t        afdopen;
 static d_close_t       afdclose;
 static d_ioctl_t       afdioctl;
 static d_strategy_t    afdstrategy;
+
 static struct cdevsw afd_cdevsw = {
+       /* name */      "afd",
+       /* maj */       118,
+       /* flags */     D_DISK | D_TRACKCLOSE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      afdopen,
        /* close */     afdclose,
        /* read */      physread,
@@ -60,11 +67,8 @@ static struct cdevsw afd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  afdstrategy,
-       /* name */      "afd",
-       /* maj */       118,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK | D_TRACKCLOSE,
+       /* psize */     nopsize
 };
 static struct cdevsw afddisk_cdevsw;
 
index 3809511..01fc4d2 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.36.2.12 2002/07/31 11:19:26 sos Exp $
- * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.5 2003/07/19 21:14:18 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.6 2003/07/21 05:50:27 dillon Exp $
  */
 
 #include "opt_ata.h"
@@ -52,7 +52,14 @@ static       d_open_t        astopen;
 static d_close_t       astclose;
 static d_ioctl_t       astioctl;
 static d_strategy_t    aststrategy;
+
 static struct cdevsw ast_cdevsw = {
+       /* name */      "ast",
+       /* maj */       119,
+       /* flags */     D_TAPE | D_TRACKCLOSE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      astopen,
        /* close */     astclose,
        /* read */      physread,
@@ -61,11 +68,8 @@ static struct cdevsw ast_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  aststrategy,
-       /* name */      "ast",
-       /* maj */       119,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TAPE | D_TRACKCLOSE,
+       /* psize */     nopsize
 };
 
 /* prototypes */
index 0beea2f..d88a915 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/ccd/ccd.c,v 1.73.2.1 2001/09/11 09:49:52 kris Exp $ */
-/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.7 2003/07/19 21:14:19 dillon Exp $ */
+/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.8 2003/07/21 05:50:28 dillon Exp $ */
 
 /*     $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
 
@@ -171,9 +171,14 @@ static d_psize_t ccdsize;
 #define NCCDFREEHIWAT  16
 
 #define CDEV_MAJOR 74
-#define BDEV_MAJOR 21
 
 static struct cdevsw ccd_cdevsw = {
+       /* name */      "ccd",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
        /* open */      ccdopen,
        /* close */     ccdclose,
        /* read */      physread,
@@ -182,12 +187,8 @@ static struct cdevsw ccd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  ccdstrategy,
-       /* name */      "ccd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      ccddump,
-       /* psize */     ccdsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     ccdsize
 };
 
 /* called during module initialization */
index 3bf19ea..c23511d 100644 (file)
@@ -51,7 +51,7 @@
  *
  *     from:   @(#)fd.c        7.4 (Berkeley) 5/25/91
  * $FreeBSD: src/sys/isa/fd.c,v 1.176.2.8 2002/05/15 21:56:14 joerg Exp $
- * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.6 2003/07/19 21:14:37 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.7 2003/07/21 05:50:42 dillon Exp $
  *
  */
 
@@ -60,6 +60,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/bootmaj.h>
 #include <sys/kernel.h>
 #include <sys/buf.h>
 #include <sys/bus.h>
@@ -336,10 +337,13 @@ static    d_close_t       fdclose;
 static d_ioctl_t       fdioctl;
 static d_strategy_t    fdstrategy;
 
-#define CDEV_MAJOR 9
-#define BDEV_MAJOR 2
-
 static struct cdevsw fd_cdevsw = {
+       /* name */      "fd",
+       /* maj */       FD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      Fdopen,
        /* close */     fdclose,
        /* read */      physread,
@@ -348,12 +352,8 @@ static struct cdevsw fd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  fdstrategy,
-       /* name */      "fd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 static int
index ab6b516..5597dd6 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.32.2.20 2002/10/11 18:49:25 mjacob Exp $ */
-/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.4 2003/07/19 21:14:23 dillon Exp $ */
+/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.5 2003/07/21 05:50:31 dillon Exp $ */
 /*
  * Platform (FreeBSD) dependent common attachment code for Qlogic adapters.
  *
@@ -46,6 +46,12 @@ static void isp_action(struct cam_sim *, union ccb *);
 
 #define ISP_CDEV_MAJOR 248
 static struct cdevsw isp_cdevsw = {
+       /* name */      "isp",
+       /* maj */       ISP_CDEV_MAJOR,
+       /* flags */     D_TAPE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      nullopen,
        /* close */     nullclose,
        /* read */      noread,
@@ -54,11 +60,8 @@ static struct cdevsw isp_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "isp",
-       /* maj */       ISP_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TAPE,
+       /* psize */     nopsize
 };
 
 static struct ispsoftc *isplist = NULL;
index 64cf91c..550595e 100644 (file)
@@ -41,7 +41,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/mcd.c,v 1.115 2000/01/29 16:17:34 peter Exp $
- * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
 
@@ -203,12 +203,13 @@ static    d_ioctl_t       mcdioctl;
 static d_psize_t       mcdsize;
 static d_strategy_t    mcdstrategy;
 
-#define CDEV_MAJOR 29
-#define BDEV_MAJOR 7
-
-
-
 static struct cdevsw mcd_cdevsw = {
+       /* name */      "mcd",
+       /* maj */       MCD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mcdopen,
        /* close */     mcdclose,
        /* read */      physread,
@@ -217,12 +218,8 @@ static struct cdevsw mcd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  mcdstrategy,
-       /* name */      "mcd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 #define mcd_put(port,byte)     outb(port,byte)
@@ -306,7 +303,7 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
        if ((   (cd->status & (MCDDOOROPEN|MCDDSKCHNG))
             || !(cd->status & MCDDSKIN)
            )
-           && major(dev) == CDEV_MAJOR && part == RAW_PART
+           && major(dev) == MCD_CDEV_MAJOR && part == RAW_PART
           ) {
                cd->openflags |= (1<<part);
                if (phys)
@@ -327,7 +324,7 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
        }
 
        if (mcdsize(dev) < 0) {
-               if (major(dev) == CDEV_MAJOR && part == RAW_PART) {
+               if (major(dev) == MCD_CDEV_MAJOR && part == RAW_PART) {
                        cd->openflags |= (1<<part);
                        if (phys)
                                cd->partflags[part] |= MCDREADRAW;
@@ -545,7 +542,7 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd);
        }
 
        if (!(cd->flags & MCDVALID)) {
-               if (   major(dev) != CDEV_MAJOR
+               if (   major(dev) != MCD_CDEV_MAJOR
                    || part != RAW_PART
                    || !(cd->openflags & (1<<RAW_PART))
                   )
index c8a2a26..5d528d8 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/dev/md/md.c,v 1.8.2.2 2002/08/19 17:43:34 jdp Exp $
- * $DragonFly: src/sys/dev/disk/md/md.c,v 1.4 2003/06/23 17:55:32 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/md/md.c,v 1.5 2003/07/21 05:50:32 dillon Exp $
  *
  */
 
@@ -58,7 +58,6 @@ static int mdrootready;
 static void mdcreate_malloc(void);
 
 #define CDEV_MAJOR     95
-#define BDEV_MAJOR     22
 
 static d_strategy_t mdstrategy;
 static d_strategy_t mdstrategy_preload;
@@ -67,6 +66,12 @@ static d_open_t mdopen;
 static d_ioctl_t mdioctl;
 
 static struct cdevsw md_cdevsw = {
+        /* name */      "md",
+        /* maj */       CDEV_MAJOR,
+        /* flags */     D_DISK | D_CANFREE | D_MEMDISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
         /* open */      mdopen,
         /* close */     nullclose,
         /* read */      physread,
@@ -75,12 +80,8 @@ static struct cdevsw md_cdevsw = {
         /* poll */      nopoll,
         /* mmap */      nommap,
         /* strategy */  mdstrategy,
-        /* name */      "md",
-        /* maj */       CDEV_MAJOR,
         /* dump */      nodump,
         /* psize */     nopsize,
-        /* flags */     D_DISK | D_CANFREE | D_MEMDISK,
-        /* bmaj */      BDEV_MAJOR
 };
 
 static struct cdevsw mddisk_cdevsw;
index ee19873..37cdd0b 100644 (file)
@@ -42,7 +42,7 @@
 
 
 /* $FreeBSD: src/sys/i386/isa/scd.c,v 1.54 2000/01/29 16:00:30 peter Exp $ */
-/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.3 2003/07/19 21:14:34 dillon Exp $ */
+/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.4 2003/07/21 05:50:40 dillon Exp $ */
 
 /* Please send any comments to micke@dynas.se */
 
@@ -180,8 +180,13 @@ static     d_ioctl_t       scdioctl;
 static d_strategy_t    scdstrategy;
 
 #define CDEV_MAJOR 45
-#define BDEV_MAJOR 16
 static struct cdevsw scd_cdevsw = {
+       /* name */      "scd",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      scdopen,
        /* close */     scdclose,
        /* read */      physread,
@@ -190,12 +195,8 @@ static struct cdevsw scd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  scdstrategy,
-       /* name */      "scd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 
index d3567fe..57a029e 100644 (file)
@@ -39,7 +39,7 @@
  *
  *     from: @(#)vn.c  8.6 (Berkeley) 4/1/94
  * $FreeBSD: src/sys/dev/vn/vn.c,v 1.105.2.4 2001/11/18 07:11:00 dillon Exp $
- * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.5 2003/06/26 05:55:11 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.6 2003/07/21 05:50:38 dillon Exp $
  */
 
 /*
@@ -95,7 +95,6 @@ static        d_psize_t       vnsize;
 static d_strategy_t    vnstrategy;
 
 #define CDEV_MAJOR 43
-#define BDEV_MAJOR 15
 
 #define VN_BSIZE_BEST  8192
 
@@ -106,6 +105,12 @@ static     d_strategy_t    vnstrategy;
  */
 
 static struct cdevsw vn_cdevsw = {
+       /* name */      "vn",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_DISK|D_CANFREE,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      vnopen,
        /* close */     vnclose,
        /* read */      physread,
@@ -114,12 +119,8 @@ static struct cdevsw vn_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  vnstrategy,
-       /* name */      "vn",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     vnsize,
-       /* flags */     D_DISK|D_CANFREE,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     vnsize
 };
 
 #define        getvnbuf()      \
index c61d7e0..3511ba7 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/wd_cd.c,v 1.29 2000/01/29 16:00:33 peter Exp $
- * $DragonFly: src/sys/dev/disk/wcd/Attic/wd_cd.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/wcd/Attic/wd_cd.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -51,8 +51,13 @@ static d_ioctl_t     acdioctl;
 static d_strategy_t    acdstrategy;
 
 #define CDEV_MAJOR 69
-#define BDEV_MAJOR 19
 static struct cdevsw acd_cdevsw = {
+       /* name */      "wcd",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      acdopen,
        /* close */     acdclose,
        /* read */      physread,
@@ -61,12 +66,8 @@ static struct cdevsw acd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  acdstrategy,
-       /* name */      "wcd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 #define NUNIT  16              /* Max # of devices */
index f5d8839..fca285c 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)wd.c  7.2 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/isa/wd.c,v 1.219.2.2 2000/08/04 22:31:07 peter Exp $
- * $DragonFly: src/sys/dev/disk/wd/Attic/wd.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/wd/Attic/wd.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 
 /* TODO:
@@ -227,11 +227,13 @@ static    d_ioctl_t       wdioctl;
 static d_dump_t        wddump;
 static d_psize_t       wdsize;
 
-#define CDEV_MAJOR 3
-#define BDEV_MAJOR 0
-
-
 static struct cdevsw wd_cdevsw = {
+       /* name */      "wd",
+       /* maj */       WD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      wdopen,
        /* close */     wdclose,
        /* read */      physread,
@@ -240,12 +242,8 @@ static struct cdevsw wd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  wdstrategy,
-       /* name */      "wd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      wddump,
-       /* psize */     wdsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
+       /* psize */     wdsize
 };
 
 
index 96a2023..31a70bf 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/wfd.c,v 1.35 2000/01/29 16:00:33 peter Exp $
- * $DragonFly: src/sys/dev/disk/wfd/Attic/wfd.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/wfd/Attic/wfd.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 /*
@@ -52,10 +52,13 @@ static      d_close_t       wfdclose;
 static d_ioctl_t       wfdioctl;
 static d_strategy_t    wfdstrategy;
 
-#define CDEV_MAJOR 87
-#define BDEV_MAJOR 1
-
 static struct cdevsw wfd_cdevsw = {
+       /* name */      "wfd",
+       /* maj */       WFD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      wfdopen,
        /* close */     wfdclose,
        /* read */      physread,
@@ -64,12 +67,8 @@ static struct cdevsw wfd_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  wfdstrategy,
-       /* name */      "wfd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      BDEV_MAJOR
 };
 
 int  wfdattach(struct atapi*, int, struct atapi_params*, int);
index 1ba810d..afaaec5 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/wst.c,v 1.28 2000/01/29 16:00:34 peter Exp $
- * $DragonFly: src/sys/dev/disk/wst/Attic/wst.c,v 1.2 2003/06/17 04:28:37 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/wst/Attic/wst.c,v 1.3 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include "wdc.h"
@@ -50,6 +50,12 @@ static  d_strategy_t    wststrategy;
 #define CDEV_MAJOR 90
 
 static struct cdevsw wst_cdevsw = {
+       /* name */      "wst",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      wstopen,
        /* close */     wstclose,
        /* read */      physread,
@@ -58,12 +64,8 @@ static struct cdevsw wst_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  wststrategy,
-       /* name */      "wst",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static unsigned int wst_total = 0;
index 52725d8..56b2b3c 100644 (file)
@@ -21,7 +21,7 @@
  *
  * Version 1.3, Thu Nov 11 12:09:13 MSK 1993
  * $FreeBSD: src/sys/i386/isa/wt.c,v 1.57.2.1 2000/08/08 19:49:53 peter Exp $
- * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -182,6 +182,12 @@ static     d_strategy_t    wtstrategy;
 #define CDEV_MAJOR 10
 
 static struct cdevsw wt_cdevsw = {
+       /* name */      "wt",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      wtopen,
        /* close */     wtclose,
        /* read */      physread,
@@ -190,12 +196,8 @@ static struct cdevsw wt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  wtstrategy,
-       /* name */      "wt",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 12d79ba..9498c44 100644 (file)
@@ -29,7 +29,7 @@
  *    Gareth Hughes <gareth@valinux.com>
  *
  * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.13.2.1 2003/04/26 07:05:28 anholt Exp $
- * $DragonFly: src/sys/dev/drm/Attic/drm_drv.h,v 1.3 2003/07/19 21:14:20 dillon Exp $
+ * $DragonFly: src/sys/dev/drm/Attic/drm_drv.h,v 1.4 2003/07/21 05:50:29 dillon Exp $
  */
 
 /*
@@ -207,18 +207,18 @@ const char *DRM(find_description)(int vendor, int device);
 
 #ifdef __FreeBSD__
 static struct cdevsw DRM(cdevsw) = {
+       .d_name =       DRIVER_NAME,
+       .d_maj =        CDEV_MAJOR,
+       .d_flags =      D_TTY | D_TRACKCLOSE,
+       .d_port =       NULL,
+       .d_autoq =      0,
+
        .d_open =       DRM( open ),
        .d_close =      DRM( close ),
        .d_read =       DRM( read ),
        .d_ioctl =      DRM( ioctl ),
        .d_poll =       DRM( poll ),
-       .d_mmap =       DRM( mmap ),
-       .d_name =       DRIVER_NAME,
-       .d_maj =        CDEV_MAJOR,
-       .d_flags =      D_TTY | D_TRACKCLOSE,
-#if __FreeBSD_version < 500000
-       .d_bmaj =       -1
-#endif
+       .d_mmap =       DRM( mmap )
 };
 
 static int DRM(probe)(device_t dev)
index c946311..29f0947 100644 (file)
@@ -17,7 +17,7 @@
  * all derivative works or modified versions.
  *
  * $FreeBSD: src/sys/i386/isa/gpib.c,v 1.29 2000/01/29 16:17:32 peter Exp $
- * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  *
  */
 /*Please read the README file for usage information*/
@@ -67,6 +67,12 @@ static       d_ioctl_t       gpioctl;
 
 #define CDEV_MAJOR 44
 static struct cdevsw gp_cdevsw = {
+       /* name */      "gp",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      gpopen,
        /* close */     gpclose,
        /* read */      noread,
@@ -75,12 +81,8 @@ static struct cdevsw gp_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "gp",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #define   BUFSIZE      1024
index 3fde275..e93eb04 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/joy.c,v 1.38.2.1 2001/09/01 05:55:31 murray Exp $
- * $DragonFly: src/sys/dev/misc/joy/joy.c,v 1.3 2003/06/23 17:55:40 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/joy/joy.c,v 1.4 2003/07/21 05:50:42 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -81,6 +81,12 @@ static       d_read_t        joyread;
 static d_ioctl_t       joyioctl;
 
 static struct cdevsw joy_cdevsw = {
+       /* name */      "joy",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      joyopen,
        /* close */     joyclose,
        /* read */      joyread,
@@ -89,12 +95,8 @@ static struct cdevsw joy_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "joy",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 devclass_t joy_devclass;
index 3eef94b..7bb342d 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/kbd/kbd.c,v 1.17.2.2 2001/07/30 16:46:43 yokota Exp $
- * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.4 2003/07/19 21:14:23 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.5 2003/07/21 05:50:32 dillon Exp $
  */
 
 #include "opt_kbd.h"
@@ -426,6 +426,12 @@ static d_poll_t            genkbdpoll;
 #define CDEV_MAJOR     112
 
 static struct cdevsw kbd_cdevsw = {
+       /* name */      "kbd",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      genkbdopen,
        /* close */     genkbdclose,
        /* read */      genkbdread,
@@ -434,12 +440,8 @@ static struct cdevsw kbd_cdevsw = {
        /* poll */      genkbdpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "kbd",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 int
index 5a179b9..4016739 100644 (file)
@@ -39,7 +39,7 @@
  * dufault@hda.com
  *
  * $FreeBSD: src/sys/i386/isa/labpc.c,v 1.35 1999/09/25 18:24:08 phk Exp $
- * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.2 2003/06/17 04:28:37 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.3 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -288,6 +288,12 @@ static     d_strategy_t    labpcstrategy;
 
 #define CDEV_MAJOR 66
 static struct cdevsw labpc_cdevsw = {
+       /* name */      "labpc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      labpcopen,
        /* close */     labpcclose,
        /* read */      physread,
@@ -296,12 +302,8 @@ static struct cdevsw labpc_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  labpcstrategy,
-       /* name */      "labpc",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static ointhand2_t labpcintr;
index 3cae9d2..14593e9 100644 (file)
@@ -49,7 +49,7 @@
  *     From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
  *     From Id: nlpt.c,v 1.14 1999/02/08 13:55:43 des Exp
  * $FreeBSD: src/sys/dev/ppbus/lpt.c,v 1.15.2.3 2000/07/07 00:30:40 obrien Exp $
- * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.4 2003/07/19 21:14:25 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.5 2003/07/21 05:50:33 dillon Exp $
  */
 
 /*
@@ -192,6 +192,12 @@ static     d_ioctl_t       lptioctl;
 
 #define CDEV_MAJOR 16
 static struct cdevsw lpt_cdevsw = {
+       /* name */      LPT_NAME,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      lptopen,
        /* close */     lptclose,
        /* read */      lptread,
@@ -200,12 +206,8 @@ static struct cdevsw lpt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      LPT_NAME,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int
index 835d27d..5e25b31 100644 (file)
@@ -12,7 +12,7 @@
  * without express or implied warranty.
  *
  * $FreeBSD: src/sys/i386/isa/mse.c,v 1.49.2.1 2000/03/20 13:58:47 yokota Exp $
- * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 /*
  * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -141,6 +141,12 @@ static     d_poll_t        msepoll;
 
 #define CDEV_MAJOR 27
 static struct cdevsw mse_cdevsw = {
+       /* name */      "mse",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mseopen,
        /* close */     mseclose,
        /* read */      mseread,
@@ -149,12 +155,8 @@ static struct cdevsw mse_cdevsw = {
        /* poll */      msepoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "mse",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static void            mseintr __P((void *));
index 2aaa83b..40b922a 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/nmdm/nmdm.c,v 1.5.2.1 2001/08/11 00:54:14 mp Exp $
- * $DragonFly: src/sys/dev/misc/nmdm/nmdm.c,v 1.5 2003/07/19 21:14:25 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/nmdm/nmdm.c,v 1.6 2003/07/21 05:50:33 dillon Exp $
  */
 
 /*
@@ -68,6 +68,12 @@ static       d_ioctl_t       nmdmioctl;
 
 #define        CDEV_MAJOR      18
 static struct cdevsw nmdm_cdevsw = {
+       /* name */      "pts",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      nmdmopen,
        /* close */     nmdmclose,
        /* read */      nmdmread,
@@ -76,12 +82,8 @@ static struct cdevsw nmdm_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "pts",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TTY,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #define BUFSIZ 100             /* Chunk size iomoved to/from user */
index 5ecf361..0b48cb7 100644 (file)
@@ -22,7 +22,7 @@
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ppbus/pcfclock.c,v 1.3.2.1 2000/05/24 00:20:57 n_hibma Exp $
- * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.2 2003/06/17 04:28:29 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.3 2003/07/21 05:50:33 dillon Exp $
  *
  */
 
@@ -70,6 +70,12 @@ static       d_read_t                pcfclock_read;
 
 #define CDEV_MAJOR 140
 static struct cdevsw pcfclock_cdevsw = {
+       /* name */      PCFCLOCK_NAME,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      pcfclock_open,
        /* close */     pcfclock_close,
        /* read */      pcfclock_read,
@@ -78,12 +84,8 @@ static struct cdevsw pcfclock_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      PCFCLOCK_NAME,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #ifndef PCFCLOCK_MAX_RETRIES
index 042eecf..3a1ea64 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.21.2.3 2000/08/07 18:24:43 peter Exp $
- * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.4 2003/07/19 21:14:25 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.5 2003/07/21 05:50:34 dillon Exp $
  *
  */
 #include "opt_ppb_1284.h"
@@ -92,6 +92,12 @@ static       d_read_t        ppiread;
 
 #define CDEV_MAJOR 82
 static struct cdevsw ppi_cdevsw = {
+       /* name */      "ppi",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ppiopen,
        /* close */     ppiclose,
        /* read */      ppiread,
@@ -100,12 +106,8 @@ static struct cdevsw ppi_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ppi",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #ifdef PERIPH_1284
index 6f5cb7f..ae79843 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/dev/ppbus/pps.c,v 1.24.2.1 2000/05/24 00:20:57 n_hibma Exp $
- * $DragonFly: src/sys/dev/misc/pps/pps.c,v 1.2 2003/06/17 04:28:29 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/pps/pps.c,v 1.3 2003/07/21 05:50:34 dillon Exp $
  *
  * This driver implements a draft-mogul-pps-api-02.txt PPS source.
  *
@@ -60,6 +60,12 @@ static       d_ioctl_t       ppsioctl;
 
 #define CDEV_MAJOR 89
 static struct cdevsw pps_cdevsw = {
+       /* name */      PPS_NAME,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ppsopen,
        /* close */     ppsclose,
        /* read */      noread,
@@ -68,12 +74,8 @@ static struct cdevsw pps_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      PPS_NAME,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static void
index 87b15a7..a0aa45f 100644 (file)
@@ -21,7 +21,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/psm.c,v 1.23.2.6 2002/03/27 16:53:35 pb Exp $
- * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.4 2003/07/19 21:14:37 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.5 2003/07/21 05:50:42 dillon Exp $
  */
 
 /*
@@ -344,6 +344,12 @@ static struct isa_pnp_id psm_ids[] = {
 #define CDEV_MAJOR        21
 
 static struct cdevsw psm_cdevsw = {
+       /* name */      PSM_DRIVER_NAME,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      psmopen,
        /* close */     psmclose,
        /* read */      psmread,
@@ -352,12 +358,8 @@ static struct cdevsw psm_cdevsw = {
        /* poll */      psmpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      PSM_DRIVER_NAME,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /* debug message level */
index ef9e4a7..54ad0c4 100644 (file)
@@ -13,7 +13,7 @@
  * Snoop stuff.
  *
  * $FreeBSD: src/sys/dev/snp/snp.c,v 1.69.2.2 2002/05/06 07:30:02 dd Exp $
- * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.5 2003/07/19 21:14:28 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.6 2003/07/21 05:50:35 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -39,6 +39,12 @@ static       d_poll_t        snppoll;
 
 #define CDEV_MAJOR 53
 static struct cdevsw snp_cdevsw = {
+       /* name */      "snp",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      snpopen,
        /* close */     snpclose,
        /* read */      snpread,
@@ -47,12 +53,8 @@ static struct cdevsw snp_cdevsw = {
        /* poll */      snppoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "snp",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct linesw snpdisc = {
index 51aa6ca..de58a43 100644 (file)
@@ -48,7 +48,7 @@
  * also provided sample code upon which this driver was based.
  *
  * $FreeBSD: src/sys/i386/isa/spic.c,v 1.4.2.1 2002/04/15 00:52:12 will Exp $
- * $DragonFly: src/sys/dev/misc/spic/spic.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/spic/spic.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -87,6 +87,12 @@ static d_ioctl_t     spicioctl;
 static d_poll_t                spicpoll;
 
 static struct cdevsw spic_cdevsw = {
+        /* name */      "spic",
+        /* maj */       CDEV_MAJOR,
+        /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
         /* open */      spicopen,
         /* close */     spicclose,
         /* read */      spicread,
@@ -95,11 +101,8 @@ static struct cdevsw spic_cdevsw = {
         /* poll */      spicpoll,
         /* mmap */      nommap,
         /* strategy */  nostrategy,
-        /* name */      "spic",
-        /* maj */       CDEV_MAJOR,
         /* dump */      nodump,
-        /* psize */     nopsize,
-        /* flags */     0,
+        /* psize */     nopsize
 };
 
 #define SCBUFLEN 128
index df45148..aca5a05 100644 (file)
@@ -43,7 +43,7 @@
  * Version 1.7, December 1995.
  *
  * $FreeBSD: src/sys/i386/isa/spigot.c,v 1.44 2000/01/29 16:17:36 peter Exp $
- * $DragonFly: src/sys/dev/misc/spigot/spigot.c,v 1.3 2003/06/25 03:55:54 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/spigot/spigot.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -97,6 +97,12 @@ static       d_mmap_t        spigot_mmap;
 
 #define CDEV_MAJOR 11
 static struct cdevsw spigot_cdevsw = {
+       /* name */      "spigot",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      spigot_open,
        /* close */     spigot_close,
        /* read */      spigot_read,
@@ -105,12 +111,8 @@ static struct cdevsw spigot_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      spigot_mmap,
        /* strategy */  nostrategy,
-       /* name */      "spigot",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static ointhand2_t     spigintr;
index c4c5a81..165fd76 100644 (file)
@@ -31,7 +31,7 @@
  * in 3.0-980524-SNAP then hacked a bit (but probably not enough :-).
  *
  * $FreeBSD: src/sys/dev/streams/streams.c,v 1.16.2.1 2001/02/26 04:23:07 jlemon Exp $
- * $DragonFly: src/sys/dev/misc/streams/Attic/streams.c,v 1.4 2003/06/25 03:55:49 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/streams/Attic/streams.c,v 1.5 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -106,6 +106,12 @@ static struct fileops svr4_netops = {
  
 #define CDEV_MAJOR 103
 static struct cdevsw streams_cdevsw = {
+       /* name */      "streams",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      streamsopen,
        /* close */     noclose,
        /* read */      noread,
@@ -114,12 +120,8 @@ static struct cdevsw streams_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "streams",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
  
 struct streams_softc {
index a2392ae..0bff6f1 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/syscons/syscons.c,v 1.336.2.15 2002/10/24 00:35:31 kbyanc Exp $
- * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.5 2003/07/19 21:14:29 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.6 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include "splash.h"
@@ -202,6 +202,12 @@ static     d_ioctl_t       scioctl;
 static d_mmap_t        scmmap;
 
 static struct cdevsw sc_cdevsw = {
+       /* name */      "sc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      scopen,
        /* close */     scclose,
        /* read */      scread,
@@ -210,12 +216,8 @@ static struct cdevsw sc_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      scmmap,
        /* strategy */  nostrategy,
-       /* name */      "sc",
-       /* maj */       CDEV_MAJOR,
-       /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
+       /* dump */      nodump,
        /* kqfilter */  ttykqfilter
 };
 
index 08f2d29..71d4306 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/syscons/sysmouse.c,v 1.2.2.2 2001/07/16 05:21:24 yokota Exp $
- * $DragonFly: src/sys/dev/misc/syscons/sysmouse.c,v 1.4 2003/06/25 03:55:50 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/syscons/sysmouse.c,v 1.5 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include "opt_syscons.h"
@@ -51,6 +51,12 @@ static d_close_t     smclose;
 static d_ioctl_t       smioctl;
 
 static struct cdevsw sm_cdevsw = {
+       /* name */      "sysmouse",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      smopen,
        /* close */     smclose,
        /* read */      ttyread,
@@ -59,12 +65,8 @@ static struct cdevsw sm_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "sysmouse",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TTY,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /* local variables */
index 2224887..f0682be 100644 (file)
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/tw.c,v 1.38 2000/01/29 16:00:32 peter Exp $
- * $DragonFly: src/sys/dev/misc/tw/tw.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/tw/tw.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -217,6 +217,12 @@ static     d_poll_t        twpoll;
 
 #define CDEV_MAJOR 19
 static struct cdevsw tw_cdevsw = {
+       /* name */      "tw",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      twopen,
        /* close */     twclose,
        /* read */      twread,
@@ -225,12 +231,8 @@ static struct cdevsw tw_cdevsw = {
        /* poll */      twpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "tw",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /*
index 13ae326..b427296 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/pci/xrpu.c,v 1.19.2.1 2000/08/02 22:19:57 peter Exp $
- * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.2 2003/06/17 04:28:57 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.3 2003/07/21 05:50:46 dillon Exp $
  *
  * A very simple device driver for PCI cards based on Xilinx 6200 series
  * FPGA/RPU devices.  Current Functionality is to allow you to open and
@@ -44,6 +44,12 @@ static d_mmap_t xrpu_mmap;
 
 #define CDEV_MAJOR 100
 static struct cdevsw xrpu_cdevsw = {
+       /* name */      "xrpu",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      xrpu_open,
        /* close */     xrpu_close,
        /* read */      noread,
@@ -52,12 +58,8 @@ static struct cdevsw xrpu_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      xrpu_mmap,
        /* strategy */  nostrategy,
-       /* name */      "xrpu",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static MALLOC_DEFINE(M_XRPU, "xrpu", "XRPU related");
index 9ca6f21..72b7d7d 100644 (file)
@@ -16,7 +16,7 @@
  * Version 1.9, Wed Oct  4 18:58:15 MSK 1995
  *
  * $FreeBSD: src/sys/i386/isa/cx.c,v 1.45.2.1 2001/02/26 04:23:09 jlemon Exp $
- * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  *
  */
 #undef DEBUG
@@ -90,6 +90,12 @@ static       d_ioctl_t       cxioctl;
 #define        CDEV_MAJOR      42
 /* Don't make this static, since if_cx.c uses it. */
 struct cdevsw cx_cdevsw = {
+       /* name */      "cx",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      cxopen,
        /* close */     cxclose,
        /* read */      ttyread,
@@ -98,13 +104,9 @@ struct cdevsw cx_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "cx",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 #else
 struct tty *cx_tty [NCX*NCHAN];         /* tty data */
index c73456f..d382a65 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/aac/aac.c,v 1.9.2.14 2003/04/08 13:22:08 scottl Exp $
- *     $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.5 2003/07/19 21:14:16 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.6 2003/07/21 05:50:26 dillon Exp $
  */
 
 /*
@@ -192,6 +192,12 @@ static int         aac_query_disk(struct aac_softc *sc, caddr_t uptr);
 #define AAC_CDEV_MAJOR 150
 
 static struct cdevsw aac_cdevsw = {
+       "aac",                  /* name */
+       AAC_CDEV_MAJOR,         /* major */
+       0,                      /* flags */
+       NULL,                   /* port */
+       0,                      /* autoq */
+
        aac_open,               /* open */
        aac_close,              /* close */
        noread,                 /* read */
@@ -200,14 +206,8 @@ static struct cdevsw aac_cdevsw = {
        aac_poll,               /* poll */
        nommap,                 /* mmap */
        nostrategy,             /* strategy */
-       "aac",                  /* name */
-       AAC_CDEV_MAJOR,         /* major */
        nodump,                 /* dump */
-       nopsize,                /* psize */
-       0,                      /* flags */
-#if __FreeBSD_version < 500005
-       -1,                     /* bmaj */
-#endif
+       nopsize                 /* psize */
 };
 
 MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver");
index e0c0dc8..129749d 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/aac/aac_disk.c,v 1.3.2.8 2003/01/11 18:39:39 scottl Exp $
- *     $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.2 2003/06/17 04:28:21 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.3 2003/07/21 05:50:26 dillon Exp $
  */
 
 #include "opt_aac.h"
@@ -72,6 +72,12 @@ static       d_dump_t        aac_disk_dump;
 #define AAC_DISK_CDEV_MAJOR    151
 
 static struct cdevsw aac_disk_cdevsw = {
+       /* name */              "aacd",
+       /* maj */               AAC_DISK_CDEV_MAJOR,
+       /* flags */             D_DISK,
+       /* port */              NULL,
+       /* autoq */             0,
+
        /* open */              aac_disk_open,
        /* close */             aac_disk_close,
        /* read */              physread,
@@ -80,14 +86,8 @@ static struct cdevsw aac_disk_cdevsw = {
        /* poll */              nopoll,
        /* mmap */              nommap,
        /* strategy */          aac_disk_strategy,
-       /* name */              "aacd",
-       /* maj */               AAC_DISK_CDEV_MAJOR,
        /* dump */              aac_disk_dump,
-       /* psize */             nopsize,
-       /* flags */             D_DISK,
-#if __FreeBSD_version < 500005
-       /* bmaj */              -1
-#endif
+       /* psize */             nopsize
 };
 
 devclass_t             aac_disk_devclass;
index ad50cc7..62b7c34 100644 (file)
@@ -53,7 +53,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/amr/amr.c,v 1.7.2.13 2003/01/15 13:41:18 emoore Exp $
- *     $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.3 2003/07/19 21:14:17 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.4 2003/07/21 05:50:26 dillon Exp $
  */
 
 /*
@@ -94,6 +94,12 @@ static d_close_t        amr_close;
 static d_ioctl_t        amr_ioctl;
 
 static struct cdevsw amr_cdevsw = {
+               /* name */      "amr",
+               /* maj */       AMR_CDEV_MAJOR,
+               /* flags */     0,
+               /* port */      NULL,
+               /* autoq */     0,
+
                /* open */      amr_open,
                /* close */     amr_close,
                /* read */      noread,
@@ -102,11 +108,8 @@ static struct cdevsw amr_cdevsw = {
                /* poll */      nopoll,
                /* mmap */      nommap,
                /* strategy */  nostrategy,
-               /* name */      "amr",
-               /* maj */       AMR_CDEV_MAJOR,
                /* dump */      nodump,
-               /* psize */     nopsize,
-               /* flags */     0,
+               /* psize */     nopsize
 };
 
 /*
index 0b21612..5506856 100644 (file)
@@ -54,7 +54,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/amr/amr_disk.c,v 1.5.2.5 2002/12/20 15:12:04 emoore Exp $
- * $DragonFly: src/sys/dev/raid/amr/amr_disk.c,v 1.2 2003/06/17 04:28:22 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/amr/amr_disk.c,v 1.3 2003/07/21 05:50:26 dillon Exp $
  */
 
 /*
@@ -92,6 +92,12 @@ static       d_ioctl_t       amrd_ioctl;
 #define AMRD_CDEV_MAJOR        133
 
 static struct cdevsw amrd_cdevsw = {
+               /* name */      "amrd",
+               /* maj */       AMRD_CDEV_MAJOR,
+               /* flags */     D_DISK,
+               /* port */      NULL,
+               /* autoq */     0,
+
                /* open */      amrd_open,
                /* close */     amrd_close,
                /* read */      physread,
@@ -100,14 +106,8 @@ static struct cdevsw amrd_cdevsw = {
                /* poll */      nopoll,
                /* mmap */      nommap,
                /* strategy */  amrd_strategy,
-               /* name */      "amrd",
-               /* maj */       AMRD_CDEV_MAJOR,
                /* dump */      nodump,
-               /* psize */     nopsize,
-               /* flags */     D_DISK,
-#if __FreeBSD_version < 500000
-               /* bmaj */      -1
-#endif
+               /* psize */     nopsize
 };
 
 static devclass_t      amrd_devclass;
index 1a70eda..d049926 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/asr/asr.c,v 1.3.2.2 2001/08/23 05:21:29 scottl Exp $ */
-/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.6 2003/07/19 21:14:17 dillon Exp $ */
+/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.7 2003/07/21 05:50:27 dillon Exp $ */
 /*
  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  * Copyright (c) 2000-2001 Adaptec Corporation
@@ -573,6 +573,12 @@ DATA_SET (mode0_pciset, mode0_pcidev);
  */
 #define CDEV_MAJOR 154   /* prefered default character major */
 STATIC struct cdevsw asr_cdevsw = {
+        "asr",         /* name     */
+        CDEV_MAJOR,     /* maj      */
+        0,              /* flags    */
+       NULL,           /* port     */
+       0,              /* auto     */
+
         asr_open,       /* open     */
         asr_close,      /* close    */
         noread,         /* read     */
@@ -581,12 +587,8 @@ STATIC struct cdevsw asr_cdevsw = {
         nopoll,         /* poll     */
         nommap,         /* mmap     */
         nostrategy,     /* strategy */
-        "asr",  /* name     */
-        CDEV_MAJOR,     /* maj      */
         nodump,         /* dump     */
-        nopsize,        /* psize    */
-        0,              /* flags    */
-        -1              /* bmaj     */
+        nopsize                /* psize    */
 };
 
 #ifdef ASR_MEASURE_PERFORMANCE
index 246d18c..53ecb64 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.2.2.6 2003/02/18 22:27:41 ps Exp $
- *     $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.2 2003/06/17 04:28:23 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.3 2003/07/21 05:50:28 dillon Exp $
  */
 
 /*
@@ -217,9 +217,14 @@ static d_ioctl_t   ciss_ioctl;
 #define CISS_CDEV_MAJOR  166
 
 static struct cdevsw ciss_cdevsw = {
+    /* name */         "ciss",
+    /* cmaj */         CISS_CDEV_MAJOR,
+    /* flags */                0, 
+    /* port */         NULL,
+    /* autoq*/         0,
     ciss_open, ciss_close, noread, nowrite, ciss_ioctl,
-    nopoll, nommap, nostrategy, "ciss", CISS_CDEV_MAJOR,
-    nodump, nopsize, 0, nokqfilter
+    nopoll, nommap, nostrategy,
+    nodump, nopsize, nokqfilter
 };
 
 /************************************************************************
index 975335a..eee6072 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 #ident "$FreeBSD: src/sys/dev/dpt/dpt_control.c,v 1.16 1999/09/25 18:23:48 phk Exp $"
-#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.2 2003/06/17 04:28:23 dillon Exp $"
+#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.3 2003/07/21 05:50:29 dillon Exp $"
 
 #include "opt_dpt.h"
 
@@ -93,6 +93,12 @@ static dpt_sig_t dpt_sig = {
 
 /* Normally, this is a static structure.  But we need it in pci/dpt_pci.c */
 static struct cdevsw dpt_cdevsw = {
+       /* name */      "dpt",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      dpt_open,
        /* close */     dpt_close,
        /* read */      dpt_read,
@@ -101,12 +107,8 @@ static struct cdevsw dpt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "dpt",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct buf *dpt_inbuf[DPT_MAX_ADAPTERS];
index b95ee6a..26a32d4 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ida/ida_disk.c,v 1.12.2.6 2001/11/27 20:21:02 ps Exp $
- * $DragonFly: src/sys/dev/raid/ida/ida_disk.c,v 1.3 2003/06/23 17:55:31 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/ida/ida_disk.c,v 1.4 2003/07/21 05:50:31 dillon Exp $
  */
 
 /*
@@ -72,6 +72,12 @@ static       d_dump_t        idad_dump;
 #define IDAD_CDEV_MAJOR        109
 
 static struct cdevsw id_cdevsw = {
+       /* name */      "idad",
+       /* maj */       IDAD_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      idad_open,
        /* close */     idad_close,
        /* read */      physread,
@@ -80,12 +86,8 @@ static struct cdevsw id_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  idad_strategy,
-       /* name */      "idad",
-       /* maj */       IDAD_CDEV_MAJOR,
        /* dump */      idad_dump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      IDAD_BDEV_MAJOR
+       /* psize */     nopsize
 };
 
 static devclass_t      idad_devclass;
index cf1de3c..e0d54c6 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/iir/iir_ctrl.c,v 1.2.2.4 2002/05/05 08:18:12 asmodai Exp $ */
-/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.3 2003/07/19 21:14:22 dillon Exp $ */
+/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.4 2003/07/21 05:50:31 dillon Exp $ */
 /*
  *       Copyright (c) 2000-01 Intel Corporation
  *       All Rights Reserved
@@ -69,6 +69,12 @@ 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 = {
+        /* name */      "iir",
+        /* maj */       CDEV_MAJOR,
+        /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
         /* open */      iir_open,
         /* close */     iir_close,
         /* read */      iir_read,
@@ -77,12 +83,8 @@ static struct cdevsw iir_cdevsw = {
         /* poll */      nopoll,
         /* mmap */      nommap,
         /* strategy */  nostrategy,
-        /* name */      "iir",
-        /* maj */       CDEV_MAJOR,
         /* dump */      nodump,
-        /* psize */     nopsize,
-        /* flags */     0,
-        /* bmaj */      -1
+        /* psize */     nopsize
 };
 
 static int iir_devsw_installed = 0;
index d51fb57..f9a782d 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/mlx/mlx.c,v 1.14.2.5 2001/09/11 09:49:53 kris Exp $
- *     $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.4 2003/07/19 21:14:24 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.5 2003/07/21 05:50:32 dillon Exp $
  */
 
 /*
 #define MLX_CDEV_MAJOR 130
 
 static struct cdevsw mlx_cdevsw = {
+               /* name */      "mlx",
+               /* maj */       MLX_CDEV_MAJOR,
+               /* flags */     0,
+               /* port */      NULL,
+               /* autoq */     0,
+
                /* open */      mlx_open,
                /* close */     mlx_close,
                /* read */      noread,
@@ -65,11 +71,8 @@ static struct cdevsw mlx_cdevsw = {
                /* poll */      nopoll,
                /* mmap */      nommap,
                /* strategy */  nostrategy,
-               /* name */      "mlx",
-               /* maj */       MLX_CDEV_MAJOR,
                /* dump */      nodump,
-               /* psize */     nopsize,
-               /* flags */     0,
+               /* psize */     nopsize
 };
 
 devclass_t     mlx_devclass;
index 28b1ea4..ec2600d 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/mlx/mlx_disk.c,v 1.8.2.4 2001/06/25 04:37:51 msmith Exp $
- * $DragonFly: src/sys/dev/raid/mlx/mlx_disk.c,v 1.3 2003/06/23 17:55:32 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/mlx/mlx_disk.c,v 1.4 2003/07/21 05:50:32 dillon Exp $
  */
 
 /*
@@ -62,6 +62,12 @@ static       d_ioctl_t       mlxd_ioctl;
 #define MLXD_CDEV_MAJOR        131
 
 static struct cdevsw mlxd_cdevsw = {
+               /* name */      "mlxd",
+               /* maj */       MLXD_CDEV_MAJOR,
+               /* flags */     D_DISK,
+               /* port */      NULL,
+               /* autoq */     0,
+
                /* open */      mlxd_open,
                /* close */     mlxd_close,
                /* read */      physread,
@@ -70,11 +76,8 @@ static struct cdevsw mlxd_cdevsw = {
                /* poll */      nopoll,
                /* mmap */      nommap,
                /* strategy */  mlxd_strategy,
-               /* name */      "mlxd",
-               /* maj */       MLXD_CDEV_MAJOR,
                /* dump */      nodump,
-               /* psize */     nopsize,
-               /* flags */     D_DISK,
+               /* psize */     nopsize
 };
 
 devclass_t             mlxd_devclass;
index 2240833..6cdc5bc 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/mly/mly.c,v 1.3.2.3 2001/03/05 20:17:24 msmith Exp $
- *     $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.4 2003/07/19 21:14:24 dillon Exp $
+ *     $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.5 2003/07/21 05:50:33 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -94,6 +94,12 @@ static int   mly_user_health(struct mly_softc *sc, struct mly_user_health *uh);
 #define MLY_CDEV_MAJOR  158
 
 static struct cdevsw mly_cdevsw = {
+    /* name */ "mly",
+    /* cmaj */ MLY_CDEV_MAJOR,
+    /* flags */        0,
+    /* port */ NULL,
+    /* autoq */        0,
+
     mly_user_open,
     mly_user_close,
     noread,
@@ -102,12 +108,8 @@ static struct cdevsw mly_cdevsw = {
     nopoll,
     nommap,
     nostrategy,
-    "mly",
-    MLY_CDEV_MAJOR,
     nodump,
-    nopsize,
-    0,
-    -1
+    nopsize
 };
 
 /********************************************************************************
index ed69b1b..2322971 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $
- * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.2 2003/06/17 04:28:29 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.3 2003/07/21 05:50:34 dillon Exp $
  */
 
 #include <sys/param.h>
 /* device structures */ 
 static d_strategy_t pststrategy;
 static struct cdevsw pst_cdevsw = {
+    /* name */ "pst",
+    /* maj */  168,
+    /* flags */ D_DISK,
+    /* autoq */ 0,
+
     /* open */ nullopen,
     /* close */ nullclose,
     /* read */ physread,
@@ -63,11 +68,8 @@ static struct cdevsw pst_cdevsw = {
     /* poll */ nopoll,
     /* mmap */ nommap,
     /* strat */ pststrategy,
-    /* name */ "pst",
-    /* maj */  168,
     /* dump */ nodump,
-    /* psize */ nopsize,
-    /* flags */ D_DISK,
+    /* psize */ nopsize
 };
 static struct cdevsw pstdisk_cdevsw;
 
index a2078c7..9ac69e3 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/twe/twe_freebsd.c,v 1.2.2.5 2002/03/07 09:57:02 msmith Exp $
- * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.2 2003/06/17 04:28:32 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.3 2003/07/21 05:50:37 dillon Exp $
  */
 
 /*
@@ -72,6 +72,12 @@ static       d_ioctl_t               twe_ioctl_wrapper;
 #define TWE_CDEV_MAJOR  146
 
 static struct cdevsw twe_cdevsw = {
+    /* name */ "twe",
+    /* cmaj */ TWE_CDEV_MAJOR,
+    /* flags */        0,
+    /* port */ NULL,
+    /* autoq */        0,
+
     twe_open,
     twe_close,
     noread,
@@ -80,11 +86,8 @@ static struct cdevsw twe_cdevsw = {
     nopoll,
     nommap,
     nostrategy,
-    "twe",
-    TWE_CDEV_MAJOR,
     nodump,
     nopsize,
-    0
 };
 
 /********************************************************************************
@@ -593,6 +596,11 @@ static     d_dump_t        twed_dump;
 #define TWED_CDEV_MAJOR        147
 
 static struct cdevsw twed_cdevsw = {
+    "twed",
+    TWED_CDEV_MAJOR,
+    D_DISK,
+    /* port */ NULL,
+    /* autoq */ 0,
     twed_open,
     twed_close,
     physread,
@@ -601,11 +609,8 @@ static struct cdevsw twed_cdevsw = {
     nopoll,
     nommap,
     twed_strategy,
-    "twed",
-    TWED_CDEV_MAJOR,
     twed_dump,
-    nopsize,
-    D_DISK
+    nopsize
 };
 
 static struct cdevsw   tweddisk_cdevsw;
index 6256b93..11f835f 100644 (file)
@@ -37,7 +37,7 @@
  *
  * $Id: vinum.c,v 1.33 2001/01/09 06:19:15 grog Exp grog $
  * $FreeBSD: src/sys/dev/vinum/vinum.c,v 1.38.2.3 2003/01/07 12:14:16 joerg Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.5 2003/07/19 21:14:31 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.6 2003/07/21 05:50:38 dillon Exp $
  */
 
 #define STATIC static                                      /* nothing while we're testing XXX */
@@ -56,10 +56,15 @@ extern struct mc malloced[];
 
 STATIC struct cdevsw vinum_cdevsw =
 {
+    /* name */ "vinum",
+    /* cmaj */ VINUM_CDEV_MAJOR, 
+    /* flags */ D_DISK,
+    /* port */ NULL,
+    /* autoq */        0,
+
     vinumopen, vinumclose, physread, physwrite,
     vinumioctl, seltrue, nommap, vinumstrategy,
-    "vinum", VINUM_CDEV_MAJOR, vinumdump, vinumsize,
-    D_DISK, VINUM_BDEV_MAJOR
+    vinumdump, vinumsize,
 };
 
 /* Called by main() during pseudo-device attachment. */
index 87e8a9e..807e315 100644 (file)
@@ -39,7 +39,7 @@
  *
  * $Id: vinumvar.h,v 1.24 2000/03/01 02:34:57 grog Exp grog $
  * $FreeBSD: src/sys/dev/vinum/vinumvar.h,v 1.32.2.4 2001/05/28 05:56:27 grog Exp $
- * $DragonFly: src/sys/dev/raid/vinum/vinumvar.h,v 1.2 2003/06/17 04:28:33 dillon Exp $
+ * $DragonFly: src/sys/dev/raid/vinum/vinumvar.h,v 1.3 2003/07/21 05:50:38 dillon Exp $
  */
 
 #include <sys/time.h>
@@ -59,7 +59,6 @@ enum constants {
     MINVINUMSLICE = 1048576,                               /* minimum size of a slice */
 
     VINUM_CDEV_MAJOR = 91,                                 /* major number for character device */
-    VINUM_BDEV_MAJOR = 25,                                 /* and legacy major number for block device */
 
     ROUND_ROBIN_READPOL = -1,                              /* round robin read policy */
 
index 9db9c4e..0a8c672 100644 (file)
@@ -28,7 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/cy.c,v 1.97.2.2 2001/08/22 13:04:58 bde Exp $
- * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include "opt_compat.h"
@@ -379,6 +379,12 @@ static     d_ioctl_t       sioioctl;
 
 #define        CDEV_MAJOR      48
 static struct cdevsw sio_cdevsw = {
+       /* name */      driver_name,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      sioopen,
        /* close */     sioclose,
        /* read */      ttyread,
@@ -387,13 +393,9 @@ static struct cdevsw sio_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      driver_name,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static int     comconsole = -1;
index 9dcf2c2..001d913 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * $FreeBSD: src/sys/dev/dgb/dgm.c,v 1.31.2.3 2001/10/07 09:02:25 brian Exp $
- * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.4 2003/07/19 21:14:19 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.5 2003/07/21 05:50:29 dillon Exp $
  *
  *  This driver and the associated header files support the ISA PC/Xem
  *  Digiboards.  Its evolutionary roots are described below.
@@ -235,6 +235,12 @@ static devclass_t dgmdevclass;
 
 #define        CDEV_MAJOR      101
 static struct cdevsw dgm_cdevsw = {
+       /* name */      "dgm",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      dgmopen,
        /* close */     dgmclose,
        /* read */      ttyread,
@@ -243,13 +249,9 @@ static struct cdevsw dgm_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "dgm",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static int
index a13b437..a2c5541 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/rc.c,v 1.53.2.1 2001/02/26 04:23:10 jlemon Exp $
- * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -91,6 +91,12 @@ static       d_ioctl_t       rcioctl;
 
 #define        CDEV_MAJOR      63
 static struct cdevsw rc_cdevsw = {
+       /* name */      "rc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      rcopen,
        /* close */     rcclose,
        /* read */      ttyread,
@@ -99,13 +105,9 @@ static struct cdevsw rc_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "rc",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 /* Per-board structure */
index 596b371..7c37d28 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/rp/rp.c,v 1.45.2.2 2002/11/07 22:26:59 tegge Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.5 2003/07/19 21:14:27 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.6 2003/07/21 05:50:34 dillon Exp $
  */
 
 /* 
@@ -572,6 +572,12 @@ static     d_ioctl_t       rpioctl;
 
 #define        CDEV_MAJOR      81
 struct cdevsw rp_cdevsw = {
+       /* name */      "rp",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      rpopen,
        /* close */     rpclose,
        /* read */      ttyread,
@@ -580,11 +586,8 @@ struct cdevsw rp_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "rp",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TTY,
+       /* psize */     nopsize
 };
 
 static int     rp_num_ports_open = 0;
index bd38510..6191dc8 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/rp.c,v 1.33.2.2 2001/02/26 04:23:10 jlemon Exp $
- * $DragonFly: src/sys/dev/serial/rp2/Attic/rp.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/rp2/Attic/rp.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 /* 
@@ -800,6 +800,12 @@ static     d_ioctl_t       rpioctl;
 
 #define        CDEV_MAJOR      81
 static struct cdevsw rp_cdevsw = {
+       /* name */      driver_name,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      rpopen,
        /* close */     rpclose,
        /* read */      ttyread,
@@ -808,13 +814,9 @@ static struct cdevsw rp_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      driver_name,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static int rp_controller_port = 0;
index bb23c28..fb8c3d6 100644 (file)
@@ -31,7 +31,7 @@
  * NO EVENT SHALL THE AUTHORS BE LIABLE.
  *
  * $FreeBSD: src/sys/dev/si/si.c,v 1.101.2.1 2001/02/26 04:23:06 jlemon Exp $
- * $DragonFly: src/sys/dev/serial/si/si.c,v 1.4 2003/07/19 21:14:27 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/si/si.c,v 1.5 2003/07/21 05:50:35 dillon Exp $
  */
 
 #ifndef lint
@@ -120,6 +120,12 @@ static     d_ioctl_t       siioctl;
 
 #define        CDEV_MAJOR      68
 static struct cdevsw si_cdevsw = {
+       /* name */      "si",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      siopen,
        /* close */     siclose,
        /* read */      ttyread,
@@ -128,13 +134,9 @@ static struct cdevsw si_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "si",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static int si_Nports;
index 960791b..08cb778 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/sio.c,v 1.291.2.35 2003/05/18 08:51:15 murray Exp $
- * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.7 2003/07/19 21:14:37 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.8 2003/07/21 05:50:42 dillon Exp $
  *     from: @(#)com.c 7.5 (Berkeley) 5/16/91
  *     from: i386/isa sio.c,v 1.234
  */
@@ -412,6 +412,12 @@ static     d_ioctl_t       sioioctl;
 
 #define        CDEV_MAJOR      28
 static struct cdevsw sio_cdevsw = {
+       /* name */      driver_name,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      sioopen,
        /* close */     sioclose,
        /* read */      sioread,
@@ -420,13 +426,9 @@ static struct cdevsw sio_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      driver_name,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 int    comconsole = -1;
index 6d375d3..9dbb4de 100644 (file)
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/stallion.c,v 1.39.2.2 2001/08/30 12:29:57 murray Exp $
- * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 /*****************************************************************************/
@@ -746,6 +746,12 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver);
 
 #define        CDEV_MAJOR      72
 static struct cdevsw stl_cdevsw = {
+       /* name */      "stl",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      stlopen,
        /* close */     stlclose,
        /* read */      ttyread,
@@ -754,13 +760,9 @@ static struct cdevsw stl_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "stl",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static void stl_drvinit(void *unused)
index 1c10230..fd5ed82 100644 (file)
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/istallion.c,v 1.36.2.2 2001/08/30 12:29:57 murray Exp $
- * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.4 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.5 2003/07/21 05:50:40 dillon Exp $
  */
 
 /*****************************************************************************/
@@ -641,6 +641,12 @@ struct isa_driver  stlidriver = {
 
 #define        CDEV_MAJOR      75
 static struct cdevsw stli_cdevsw = {
+       /* name */      stli_drvname,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      stliopen,
        /* close */     stliclose,
        /* read */      stliread,
@@ -649,13 +655,9 @@ static struct cdevsw stli_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      stli_drvname,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 #endif
index f6231d3..89ee10e 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/pcaudio.c,v 1.58 2000/01/25 21:58:43 dfr Exp $
- * $DragonFly: src/sys/dev/sound/isa/i386/pca/Attic/pcaudio.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/isa/i386/pca/Attic/pcaudio.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -157,6 +157,12 @@ static     d_poll_t        pcapoll;
 
 #define CDEV_MAJOR 24
 static struct cdevsw pca_cdevsw = {
+       /* name */      "pca",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      pcaopen,
        /* close */     pcaclose,
        /* read */      noread,
@@ -165,12 +171,8 @@ static struct cdevsw pca_cdevsw = {
        /* poll */      pcapoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "pca",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static void pca_continue __P((void));
index 408715a..4c8f7f0 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/sound/soundcard.c,v 1.87 1999/12/20 18:05:01 eivind Exp $
- * $DragonFly: src/sys/dev/sound/isa/i386/Attic/soundcard.c,v 1.2 2003/06/17 04:28:38 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/isa/i386/Attic/soundcard.c,v 1.3 2003/07/21 05:50:41 dillon Exp $
  *
  */
 #include <i386/isa/sound/sound_config.h>
@@ -90,6 +90,12 @@ static char     driver_name[] = "snd";
 
 #define CDEV_MAJOR 30
 static struct cdevsw snd_cdevsw = {
+       /* name */      driver_name,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      sndopen,
        /* close */     sndclose,
        /* read */      sndread,
@@ -98,12 +104,8 @@ static struct cdevsw snd_cdevsw = {
        /* poll */      sndpoll,
        /* mmap */      sndmmap,
        /* strategy */  nostrategy,
-       /* name */      driver_name,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 01c2206..60af4f6 100644 (file)
@@ -5,7 +5,7 @@
  * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
  *
  * $FreeBSD: src/sys/i386/isa/spkr.c,v 1.45 2000/01/29 16:00:32 peter Exp $
- * $DragonFly: src/sys/dev/sound/isa/i386/spkr/Attic/spkr.c,v 1.5 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/isa/i386/spkr/Attic/spkr.c,v 1.6 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -27,6 +27,12 @@ static       d_ioctl_t       spkrioctl;
 
 #define CDEV_MAJOR 26
 static struct cdevsw spkr_cdevsw = {
+       /* name */      "spkr",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      spkropen,
        /* close */     spkrclose,
        /* read */      noread,
@@ -35,12 +41,8 @@ static struct cdevsw spkr_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "spkr",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /**************** MACHINE DEPENDENT PART STARTS HERE *************************
index 3d1ca86..9e84187 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.15.2.13 2002/08/30 13:53:03 orion Exp $
- * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.3 2003/06/23 17:55:34 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.4 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -32,7 +32,7 @@
 
 #include <dev/sound/pcm/sound.h>
 
-SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.3 2003/06/23 17:55:34 dillon Exp $");
+SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.4 2003/07/21 05:50:36 dillon Exp $");
 
 #define OLDPCM_IOCTL
 
@@ -45,6 +45,12 @@ static d_poll_t dsp_poll;
 static d_mmap_t dsp_mmap;
 
 static struct cdevsw dsp_cdevsw = {
+       /* name */      "dsp",
+       /* maj */       SND_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      dsp_open,
        /* close */     dsp_close,
        /* read */      dsp_read,
@@ -53,11 +59,8 @@ static struct cdevsw dsp_cdevsw = {
        /* poll */      dsp_poll,
        /* mmap */      dsp_mmap,
        /* strategy */  nostrategy,
-       /* name */      "dsp",
-       /* maj */       SND_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 #ifdef USING_DEVFS
index 65ef95f..c3052c0 100644 (file)
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.4.2.8 2002/04/22 15:49:36 cg Exp $
- * $DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.3 2003/06/23 17:55:34 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.4 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include <dev/sound/pcm/sound.h>
 
 #include "mixer_if.h"
 
-SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.3 2003/06/23 17:55:34 dillon Exp $");
+SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.4 2003/07/21 05:50:36 dillon Exp $");
 
 MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
 
@@ -76,6 +76,12 @@ static d_open_t mixer_open;
 static d_close_t mixer_close;
 
 static struct cdevsw mixer_cdevsw = {
+       /* name */      "mixer",
+       /* maj */       SND_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mixer_open,
        /* close */     mixer_close,
        /* read */      noread,
@@ -84,11 +90,8 @@ static struct cdevsw mixer_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "mixer",
-       /* maj */       SND_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 #ifdef USING_DEVFS
index 1936eca..37acc19 100644 (file)
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/sound/pcm/sndstat.c,v 1.4.2.2 2002/04/22 15:49:36 cg Exp $
- * $DragonFly: src/sys/dev/sound/pcm/sndstat.c,v 1.3 2003/06/23 17:55:34 dillon Exp $
+ * $DragonFly: src/sys/dev/sound/pcm/sndstat.c,v 1.4 2003/07/21 05:50:36 dillon Exp $
  */
 
 #include <dev/sound/pcm/sound.h>
 #include <dev/sound/pcm/vchan.h>
 
-SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/sndstat.c,v 1.3 2003/06/23 17:55:34 dillon Exp $");
+SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/sndstat.c,v 1.4 2003/07/21 05:50:36 dillon Exp $");
 
 #define        SS_TYPE_MODULE          0
 #define        SS_TYPE_FIRST           1
@@ -44,6 +44,12 @@ static d_close_t sndstat_close;
 static d_read_t sndstat_read;
 
 static struct cdevsw sndstat_cdevsw = {
+       /* name */      "sndstat",
+       /* maj */       SND_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      sndstat_open,
        /* close */     sndstat_close,
        /* read */      sndstat_read,
@@ -52,11 +58,8 @@ static struct cdevsw sndstat_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "sndstat",
-       /* maj */       SND_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 struct sndstat_entry {
index 581bd95..ae83b7a 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: ucom.c,v 1.39 2001/08/16 22:31:24 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/ucom.c,v 1.24.2.2 2003/01/17 17:32:10 joe Exp $       */
-/*     $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.5 2003/07/19 21:14:30 dillon Exp $      */
+/*     $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.6 2003/07/21 05:50:37 dillon Exp $      */
 
 /*-
  * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
@@ -129,6 +129,12 @@ Static d_ioctl_t ucomioctl;
 #define UCOM_CDEV_MAJOR  138
 
 static struct cdevsw ucom_cdevsw = {
+       /* name */      "ucom",
+       /* maj */       UCOM_CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ucomopen,
        /* close */     ucomclose,
        /* read */      ucomread,
@@ -137,15 +143,9 @@ static struct cdevsw ucom_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ucom",
-       /* maj */       UCOM_CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-#if __FreeBSD_version < 500014
-       /* bmaj */      -1,
-#endif
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 Static void ucom_cleanup(struct ucom_softc *);
index cf04cee..50b57e9 100644 (file)
@@ -29,7 +29,7 @@
  */
 
 /* $FreeBSD: src/sys/dev/usb/ufm.c,v 1.1.2.3 2002/11/06 14:41:01 joe Exp $ */
-/* $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.2 2003/06/17 04:28:32 dillon Exp $ */
+/* $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.3 2003/07/21 05:50:37 dillon Exp $ */
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,13 +91,14 @@ d_ioctl_t ufmioctl;
 #define UFM_CDEV_MAJOR 200
 
 Static struct cdevsw ufm_cdevsw = {
+       /* name */      "ufm",  
+       /* cmaj */      UFM_CDEV_MAJOR, 
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
        ufmopen,        ufmclose,       noread,         nowrite,
        ufmioctl,       nopoll,         nommap,         nostrategy,
-       "ufm",          UFM_CDEV_MAJOR, nodump,         nopsize,
-       0,
-#if (__FreeBSD__ < 5)
-       -1
-#endif
+       nodump,         nopsize
 };
 #endif  /*defined(__FreeBSD__)*/
 
index 6b1169c..6af2238 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: ugen.c,v 1.27 1999/10/28 12:08:38 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/ugen.c,v 1.38.2.9 2002/11/06 14:41:01 joe Exp $       */
-/*     $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.5 2003/07/19 21:14:30 dillon Exp $      */
+/*     $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.6 2003/07/21 05:50:37 dillon Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -136,6 +136,12 @@ d_poll_t  ugenpoll;
 #define UGEN_CDEV_MAJOR        114
 
 Static struct cdevsw ugen_cdevsw = {
+       /* name */      "ugen",
+       /* maj */       UGEN_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ugenopen,
        /* close */     ugenclose,
        /* read */      ugenread,
@@ -144,12 +150,8 @@ Static struct cdevsw ugen_cdevsw = {
        /* poll */      ugenpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ugen",
-       /* maj */       UGEN_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index f4520b0..afb34a9 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: uhid.c,v 1.38 2000/04/27 15:26:48 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/uhid.c,v 1.27.2.12 2002/11/06 20:23:50 joe Exp $      */
-/*     $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.4 2003/07/19 21:14:30 dillon Exp $      */
+/*     $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.5 2003/07/21 05:50:37 dillon Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -144,6 +144,12 @@ d_poll_t   uhidpoll;
 #define                UHID_CDEV_MAJOR 122
 
 Static struct cdevsw uhid_cdevsw = {
+       /* name */      "uhid",
+       /* maj */       UHID_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      uhidopen,
        /* close */     uhidclose,
        /* read */      uhidread,
@@ -152,12 +158,8 @@ Static struct cdevsw uhid_cdevsw = {
        /* poll */      uhidpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "uhid",
-       /* maj */       UHID_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index 543eea9..4e166a8 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: ulpt.c,v 1.29 1999/11/17 23:00:50 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.26.2.13 2002/11/06 20:23:50 joe Exp $      */
-/*     $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.3 2003/07/19 21:14:30 dillon Exp $      */
+/*     $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.4 2003/07/21 05:50:37 dillon Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -129,6 +129,12 @@ Static d_ioctl_t ulptioctl;
 #define ULPT_CDEV_MAJOR 113
 
 Static struct cdevsw ulpt_cdevsw = {
+       /* name */      "ulpt",
+       /* maj */       ULPT_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ulptopen,
        /* close */     ulptclose,
        /* read */      noread,
@@ -137,12 +143,8 @@ Static struct cdevsw ulpt_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ulpt",
-       /* maj */       ULPT_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index d440ebb..5e90968 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: umodem.c,v 1.5 1999/01/08 11:58:25 augustss Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/umodem.c,v 1.17.2.9 2002/11/06 20:23:50 joe Exp $     */
-/*     $DragonFly: src/sys/dev/usbmisc/umodem/umodem.c,v 1.4 2003/07/19 21:14:30 dillon Exp $  */
+/*     $DragonFly: src/sys/dev/usbmisc/umodem/umodem.c,v 1.5 2003/07/21 05:50:37 dillon Exp $  */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -160,6 +160,12 @@ d_ioctl_t umodemioctl;
 #define UMODEM_CDEV_MAJOR  124
 
 static struct cdevsw umodem_cdevsw = {
+       /* name */      "umodem",
+       /* maj */       UMODEM_CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      umodemopen,
        /* close */     umodemclose,
        /* read */      umodemread,
@@ -168,13 +174,9 @@ static struct cdevsw umodem_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "umodem",
-       /* maj */       UMODEM_CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 #endif
 
index 2c39890..8493ab1 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/dev/usb/ums.c,v 1.36.2.6 2002/11/06 20:23:50 joe Exp $        */
-/*     $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.3 2003/07/19 21:14:30 dillon Exp $        */
+/*     $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.4 2003/07/21 05:50:37 dillon Exp $        */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -147,6 +147,12 @@ Static d_poll_t  ums_poll;
 #define UMS_CDEV_MAJOR 111
 
 Static struct cdevsw ums_cdevsw = {
+       /* name */      "ums",
+       /* maj */       UMS_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ums_open,
        /* close */     ums_close,
        /* read */      ums_read,
@@ -155,12 +161,8 @@ Static struct cdevsw ums_cdevsw = {
        /* poll */      ums_poll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ums",
-       /* maj */       UMS_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 USB_DECLARE_DRIVER(ums);
index 450b4f4..abb4a2e 100644 (file)
@@ -29,7 +29,7 @@
  */
 
 /* $FreeBSD: src/sys/dev/usb/urio.c,v 1.11.2.4 2002/11/06 14:41:01 joe Exp $ */
-/* $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.4 2003/06/25 03:55:50 dillon Exp $ */
+/* $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.5 2003/07/21 05:50:37 dillon Exp $ */
 
 /*
  * 2000/3/24  added NetBSD/OpenBSD support (from Alex Nemirovsky)
@@ -127,13 +127,14 @@ d_ioctl_t urioioctl;
 
 #if (__FreeBSD__ >= 4)
 Static struct cdevsw urio_cdevsw = {
+       /* name */      "urio",         
+       /* cmaj */      URIO_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
        urioopen,       urioclose,      urioread,       uriowrite,
        urioioctl,      nopoll,         nommap,         nostrategy,
-       "urio",         URIO_CDEV_MAJOR,nodump,         nopsize,
-       0,
-#if (__FreeBSD__ < 5)
-       -1
-#endif
+       nodump,         nopsize
 };
 #define RIO_UE_GET_DIR(p) ((UE_GET_DIR(p) == UE_DIR_IN) ? RIO_IN :\
                          ((UE_GET_DIR(p) == UE_DIR_OUT) ? RIO_OUT :\
index ba86331..820f8f9 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: uscanner.c,v 1.26 2001/12/31 12:15:22 augustss Exp $   */
 /*     $FreeBSD: src/sys/dev/usb/uscanner.c,v 1.2.2.12 2003/01/27 09:48:57 joe Exp $   */
-/*     $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.2 2003/06/17 04:28:32 dillon Exp $      */
+/*     $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.3 2003/07/21 05:50:37 dillon Exp $      */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -247,6 +247,12 @@ d_poll_t  uscannerpoll;
 #define USCANNER_CDEV_MAJOR    156
 
 Static struct cdevsw uscanner_cdevsw = {
+       /* name */      "uscanner",
+       /* maj */       USCANNER_CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      uscanneropen,
        /* close */     uscannerclose,
        /* read */      uscannerread,
@@ -255,12 +261,8 @@ Static struct cdevsw uscanner_cdevsw = {
        /* poll */      uscannerpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "uscanner",
-       /* maj */       USCANNER_CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index 1a989e7..f0bac2d 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.4.2.3 2000/10/27 00:46:09 jhb Exp $ */
-/* $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.3 2003/06/23 17:55:30 dillon Exp $ */
+/* $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.4 2003/07/21 05:50:28 dillon Exp $ */
 
 /*
  * This is part of the Driver for Video Capture Cards (Frame grabbers)
@@ -233,6 +233,12 @@ static     d_poll_t        bktr_poll;
 
 #define CDEV_MAJOR 92 
 static struct cdevsw bktr_cdevsw = {
+       /* name */      "bktr",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      bktr_open,
        /* close */     bktr_close,
        /* read */      bktr_read,
@@ -241,12 +247,8 @@ static struct cdevsw bktr_cdevsw = {
        /* poll */      bktr_poll,
        /* mmap */      bktr_mmap,
        /* strategy */  nostrategy,
-       /* name */      "bktr",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 DRIVER_MODULE(bktr, pci, bktr_driver, bktr_devclass, 0, 0);
index a6938d8..04d6325 100644 (file)
@@ -9,7 +9,7 @@
  *     for damages incurred with its use.
  *
  * $FreeBSD: src/sys/i386/isa/ctx.c,v 1.36 2000/01/29 16:17:31 peter Exp $
- * $DragonFly: src/sys/dev/video/ctx/ctx.c,v 1.2 2003/06/17 04:28:36 dillon Exp $
+ * $DragonFly: src/sys/dev/video/ctx/ctx.c,v 1.3 2003/07/21 05:50:40 dillon Exp $
  */
 
 /*
@@ -141,6 +141,12 @@ static     d_ioctl_t       ctxioctl;
 #define CDEV_MAJOR 40
 
 static struct cdevsw ctx_cdevsw = {
+       /* name */      "ctx",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ctxopen,
        /* close */     ctxclose,
        /* read */      ctxread,
@@ -149,12 +155,8 @@ static struct cdevsw ctx_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ctx",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 857a225..7735a3a 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/fb/fb.c,v 1.11.2.2 2000/08/02 22:35:22 peter Exp $
- * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.2 2003/06/17 04:28:25 dillon Exp $
+ * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.3 2003/07/21 05:50:30 dillon Exp $
  */
 
 #include "opt_fb.h"
@@ -360,6 +360,12 @@ static d_mmap_t            fbmmap;
 #define CDEV_MAJOR     123     /* XXX */
 
 static struct cdevsw fb_cdevsw = {
+       /* name */      FB_DRIVER_NAME,
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      fbopen,
        /* close */     fbclose,
        /* read */      fbread,
@@ -368,12 +374,8 @@ static struct cdevsw fb_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      fbmmap,
        /* strategy */  nostrategy,
-       /* name */      FB_DRIVER_NAME,
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static void
index 26a46ea..56eb5e8 100644 (file)
@@ -32,7 +32,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/gsc.c,v 1.35.2.1 2000/08/08 19:49:53 peter Exp $
- * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  *
  */
 
@@ -185,6 +185,12 @@ static     d_ioctl_t       gscioctl;
 
 #define CDEV_MAJOR 47
 static struct cdevsw gsc_cdevsw = {
+       /* name */      "gsc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      gscopen,
        /* close */     gscclose,
        /* read */      gscread,
@@ -193,12 +199,8 @@ static struct cdevsw gsc_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "gsc",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 1e6ad8e..c80bb7c 100644 (file)
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/meteor.c,v 1.49 1999/09/25 18:24:41 phk Exp $
- * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.3 2003/07/19 21:14:49 dillon Exp $
+ * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.4 2003/07/21 05:50:46 dillon Exp $
  */
 
 /*             Change History:
@@ -222,6 +222,12 @@ static     d_mmap_t        meteor_mmap;
 
 #define CDEV_MAJOR 67
 static struct cdevsw meteor_cdevsw = {
+       /* name */      "meteor",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      meteor_open,
        /* close */     meteor_close,
        /* read */      meteor_read,
@@ -230,12 +236,8 @@ static struct cdevsw meteor_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      meteor_mmap,
        /* strategy */  nostrategy,
-       /* name */      "meteor",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #endif
 
index 770a369..f78c1bf 100644 (file)
@@ -51,7 +51,7 @@
  *     Last Edit-Date: [Mon Dec 27 14:03:36 1999]
  *
  * $FreeBSD: src/sys/i386/isa/pcvt/pcvt_drv.c,v 1.63.2.1 2001/02/26 04:23:13 jlemon Exp $
- * $DragonFly: src/sys/dev/video/pcvt/i386/Attic/pcvt_drv.c,v 1.3 2003/06/25 03:55:54 dillon Exp $
+ * $DragonFly: src/sys/dev/video/pcvt/i386/Attic/pcvt_drv.c,v 1.4 2003/07/21 05:50:41 dillon Exp $
  *
  *---------------------------------------------------------------------------*/
 
@@ -103,6 +103,12 @@ static     d_mmap_t        pcmmap;
 
 #define        CDEV_MAJOR      12
 static struct cdevsw pc_cdevsw = {
+       /* name */      "vt",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      pcopen,
        /* close */     pcclose,
        /* read */      ttyread,
@@ -111,13 +117,9 @@ static struct cdevsw pc_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      pcmmap,
        /* strategy */  nostrategy,
-       /* name */      "vt",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 #if PCVT_NETBSD > 100  /* NetBSD-current Feb 20 1995 */
index 6a22933..885fcfc 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2000 Andrew Miklic, Andrew Gallatin, and Thomas V. Crimi
  *
  * $FreeBSD: src/sys/dev/tga/tga_pci.c,v 1.1.2.1 2001/11/01 08:33:15 obrien Exp $
- * $DragonFly: src/sys/dev/video/tga/Attic/tga_pci.c,v 1.2 2003/06/17 04:28:32 dillon Exp $
+ * $DragonFly: src/sys/dev/video/tga/Attic/tga_pci.c,v 1.3 2003/07/21 05:50:37 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -97,6 +97,12 @@ static struct gfb_type tga_devs[] = {
 #ifdef FB_INSTALL_CDEV
 
 static struct cdevsw tga_cdevsw = {
+       /* name */      "tga",
+       /* maj */       -1,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      pcigfb_open,
        /* close */     pcigfb_close,
        /* read */      pcigfb_read,
@@ -105,12 +111,8 @@ static struct cdevsw tga_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      pcigfb_mmap,
        /* strategy */  nostrategy,
-       /* name */      "tga",
-       /* maj */       -1,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #endif /*FB_INSTALL_CDEV*/
index 4ac842c..c275726 100644 (file)
@@ -16,7 +16,7 @@
  * Sep, 1994   Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
  *
  * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $
- * $DragonFly: src/sys/i386/apm/Attic/apm.c,v 1.4 2003/06/28 04:15:59 dillon Exp $
+ * $DragonFly: src/sys/i386/apm/Attic/apm.c,v 1.5 2003/07/21 05:50:39 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -85,6 +85,12 @@ static d_poll_t apmpoll;
 
 #define CDEV_MAJOR 39
 static struct cdevsw apm_cdevsw = {
+       /* name */      "apm",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      apmopen,
        /* close */     apmclose,
        /* read */      noread,
@@ -93,12 +99,8 @@ static struct cdevsw apm_cdevsw = {
        /* poll */      apmpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "apm",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int apm_suspend_delay = 1;
index a47bf6a..2168bbd 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  *  dgb.c $FreeBSD: src/sys/gnu/i386/isa/dgb.c,v 1.56.2.1 2001/02/26 04:23:09 jlemon Exp $
- *  dgb.c $DragonFly: src/sys/i386/gnu/isa/Attic/dgb.c,v 1.4 2003/07/19 21:14:32 dillon Exp $
+ *  dgb.c $DragonFly: src/sys/i386/gnu/isa/Attic/dgb.c,v 1.5 2003/07/21 05:50:39 dillon Exp $
  *
  *  Digiboard driver.
  *
@@ -207,6 +207,12 @@ static     d_ioctl_t       dgbioctl;
 
 #define        CDEV_MAJOR      58
 static struct cdevsw dgb_cdevsw = {
+       /* name */      "dgb",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      dgbopen,
        /* close */     dgbclose,
        /* read */      ttyread,
@@ -215,13 +221,9 @@ static struct cdevsw dgb_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "dgb",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static speed_t dgbdefaultrate = TTYDEF_SPEED;
index 78f5a8a..243d463 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)autoconf.c    7.1 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $
- * $DragonFly: src/sys/i386/i386/Attic/autoconf.c,v 1.5 2003/07/06 21:23:48 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/autoconf.c,v 1.6 2003/07/21 05:50:39 dillon Exp $
  */
 
 /*
@@ -58,6 +58,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/bootmaj.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/disklabel.h>
@@ -261,6 +262,21 @@ u_long     bootdev = 0;            /* not a dev_t - encoding is different */
 #define FDMAJOR        2
 #define FDUNITSHIFT     6
 
+/*
+ * The boot code uses old block device major numbers to pass bootdev to
+ * us.  We have to translate these to character device majors because
+ * we don't have block devices any more.
+ */
+static int
+boot_translate_majdev(int bmajor)
+{
+       static int conv[] = { BOOTMAJOR_CONVARY };
+
+       if (bmajor >= 0 && bmajor < sizeof(conv)/sizeof(conv[0]))
+               return(conv[bmajor]);
+       return(-1);
+}
+
 /*
  * Attempt to find the device from which we were booted.
  * If we can do so, and not instructed not to do so,
@@ -286,8 +302,8 @@ setroot()
                printf("no B_DEVMAGIC (bootdev=%#lx)\n", bootdev);
                return;
        }
-       majdev = B_TYPE(bootdev);
-       dev = makebdev(majdev, 0);
+       majdev = boot_translate_majdev(B_TYPE(bootdev));
+       dev = makedev(majdev, 0);
        if (devsw(dev) == NULL)
                return;
        unit = B_UNIT(bootdev);
@@ -303,7 +319,7 @@ setroot()
         * XXX kludge for inconsistent unit numbering and lack of slice
         * support for floppies.
         */
-       if (majdev == FDMAJOR) {
+       if (majdev == FD_CDEV_MAJOR) {
                slice = COMPATIBILITY_SLICE;
                part = RAW_PART;
                mindev = unit << FDUNITSHIFT;
@@ -312,7 +328,7 @@ setroot()
                mindev = dkmakeminor(unit, slice, part);
        }
 
-       newrootdev = makebdev(majdev, mindev);
+       newrootdev = makedev(majdev, mindev);
        sname = dsname(newrootdev, unit, slice, part, partname);
        rootdevnames[0] = malloc(strlen(sname) + 6, M_DEVBUF, M_NOWAIT);
        sprintf(rootdevnames[0], "ufs:%s%s", sname, partname);
index bd3038c..bb09b44 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.6.2.1 2002/09/17 22:39:53 sam Exp $
- * $DragonFly: src/sys/i386/i386/Attic/elan-mmcr.c,v 1.2 2003/06/17 04:28:35 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/elan-mmcr.c,v 1.3 2003/07/21 05:50:39 dillon Exp $
  * The AMD Elan sc520 is a system-on-chip gadget which is used in embedded
  * kind of things, see www.soekris.com for instance, and it has a few quirks
  * we need to deal with.
@@ -91,6 +91,12 @@ static d_mmap_t elan_mmap;
 
 #define CDEV_MAJOR 100                 /* Share with xrpu */
 static struct cdevsw elan_cdevsw = {
+       /* name */      "elan",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      elan_open,
        /* close */     elan_close,
        /* read */      noread,
@@ -99,11 +105,8 @@ static struct cdevsw elan_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      elan_mmap,
        /* strategy */  nostrategy,
-       /* name */      "elan",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 static int
index af290ea..cde68fd 100644 (file)
@@ -39,7 +39,7 @@
  *     from: Utah $Hdr: mem.c 1.13 89/10/08$
  *     from: @(#)mem.c 7.2 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.6 2003/07/19 21:14:33 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.7 2003/07/21 05:50:39 dillon Exp $
  */
 
 /*
@@ -81,6 +81,12 @@ static       d_poll_t        mmpoll;
 
 #define CDEV_MAJOR 2
 static struct cdevsw mem_cdevsw = {
+       /* name */      "mem",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_MEM,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mmopen,
        /* close */     mmclose,
        /* read */      mmrw,
@@ -89,12 +95,8 @@ static struct cdevsw mem_cdevsw = {
        /* poll */      mmpoll,
        /* mmap */      memmmap,
        /* strategy */  nostrategy,
-       /* name */      "mem",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_MEM,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int rand_bolt;
index 6fb29a5..775fd39 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/i386/perfmon.c,v 1.21 1999/09/25 18:24:04 phk Exp $
- * $DragonFly: src/sys/i386/i386/Attic/perfmon.c,v 1.5 2003/07/12 16:55:47 dillon Exp $
+ * $DragonFly: src/sys/i386/i386/Attic/perfmon.c,v 1.6 2003/07/21 05:50:39 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -62,6 +62,12 @@ static d_ioctl_t perfmon_ioctl;
 
 #define CDEV_MAJOR 2   /* We're really a minor of mem.c */
 static struct cdevsw perfmon_cdevsw = {
+       /* name */      "perfmon",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      perfmon_open,
        /* close */     perfmon_close,
        /* read */      noread,
@@ -70,12 +76,8 @@ static struct cdevsw perfmon_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "perfmon",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /*
index 346b171..82b9d27 100644 (file)
@@ -35,7 +35,7 @@
  */
 /*
  * $FreeBSD: src/sys/i386/isa/asc.c,v 1.42.2.2 2001/03/01 03:22:39 jlemon Exp $
- * $DragonFly: src/sys/i386/isa/Attic/asc.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/i386/isa/Attic/asc.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include "asc.h"
@@ -187,6 +187,12 @@ static d_poll_t            ascpoll;
 #define CDEV_MAJOR 71
 
 static struct cdevsw asc_cdevsw = {
+       /* name */      "asc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ascopen,
        /* close */     ascclose,
        /* read */      ascread,
@@ -195,12 +201,8 @@ static struct cdevsw asc_cdevsw = {
        /* poll */      ascpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "asc",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #define STATIC static
index feed0c4..b53e66d 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_conf.c,v 1.73.2.3 2003/03/10 02:18:25 imp Exp $
- * $DragonFly: src/sys/kern/kern_conf.c,v 1.2 2003/06/17 04:28:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_conf.c,v 1.3 2003/07/21 05:50:43 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -47,9 +47,7 @@
 
 #define cdevsw_ALLOCSTART      (NUMCDEVSW/2)
 
-struct cdevsw  *cdevsw[NUMCDEVSW];
-
-static int     bmaj2cmaj[NUMCDEVSW];
+static struct cdevsw   *cdevsw[NUMCDEVSW];
 
 MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage");
 
@@ -83,6 +81,10 @@ devsw(dev_t dev)
 static void
 compile_devsw(struct cdevsw *devsw)
 {
+       static lwkt_port devsw_compat_port;
+
+       /* YYY init devsw_compat_port */
+       
        if (devsw->d_open == NULL)
                devsw->d_open = noopen;
        if (devsw->d_close == NULL)
@@ -105,6 +107,8 @@ compile_devsw(struct cdevsw *devsw)
                devsw->d_psize = nopsize;
        if (devsw->d_kqfilter == NULL)
                devsw->d_kqfilter = nokqfilter;
+       if (devsw->d_port == NULL)
+               devsw->d_port = &devsw_compat_port;
 }
 
 /*
@@ -114,49 +118,18 @@ compile_devsw(struct cdevsw *devsw)
 int
 cdevsw_add(struct cdevsw *newentry)
 {
-       int i;
-       static int setup;
-
-       if (!setup) {
-               for (i = 0; i < NUMCDEVSW; i++)
-                       if (!bmaj2cmaj[i])
-                               bmaj2cmaj[i] = 254;
-               setup++;
-       }
-
        compile_devsw(newentry);
        if (newentry->d_maj < 0 || newentry->d_maj >= NUMCDEVSW) {
                printf("%s: ERROR: driver has bogus cdevsw->d_maj = %d\n",
                    newentry->d_name, newentry->d_maj);
                return (EINVAL);
        }
-       if (newentry->d_bmaj >= NUMCDEVSW) {
-               printf("%s: ERROR: driver has bogus cdevsw->d_bmaj = %d\n",
-                   newentry->d_name, newentry->d_bmaj);
-               return (EINVAL);
-       }
-       if (newentry->d_bmaj >= 0 && (newentry->d_flags & D_DISK) == 0) {
-               printf("ERROR: \"%s\" bmaj but is not a disk\n",
-                   newentry->d_name);
-               return (EINVAL);
-       }
-
        if (cdevsw[newentry->d_maj]) {
                printf("WARNING: \"%s\" is usurping \"%s\"'s cdevsw[]\n",
                    newentry->d_name, cdevsw[newentry->d_maj]->d_name);
        }
 
        cdevsw[newentry->d_maj] = newentry;
-
-       if (newentry->d_bmaj < 0)
-               return (0);
-
-       if (bmaj2cmaj[newentry->d_bmaj] != 254) {
-               printf("WARNING: \"%s\" is usurping \"%s\"'s bmaj\n",
-                   newentry->d_name,
-                   cdevsw[bmaj2cmaj[newentry->d_bmaj]]->d_name);
-       }
-       bmaj2cmaj[newentry->d_bmaj] = newentry->d_maj;
        return (0);
 }
 
@@ -175,9 +148,6 @@ cdevsw_remove(struct cdevsw *oldentry)
 
        cdevsw[oldentry->d_maj] = NULL;
 
-       if (oldentry->d_bmaj >= 0 && oldentry->d_bmaj < NUMCDEVSW)
-               bmaj2cmaj[oldentry->d_bmaj] = 254;
-
        return 0;
 }
 
@@ -212,15 +182,6 @@ lminor(dev_t x)
        return ((i & 0xff) | (i >> 8));
 }
 
-dev_t
-makebdev(int x, int y)
-{
-       
-       if (x == umajor(NOUDEV) && y == uminor(NOUDEV))
-               Debugger("makebdev of NOUDEV");
-       return (makedev(bmaj2cmaj[x], y));
-}
-
 dev_t
 makedev(int x, int y)
 {
@@ -292,7 +253,8 @@ udev2dev(udev_t x, int b)
                case 0:
                        return makedev(umajor(x), uminor(x));
                case 1:
-                       return makebdev(umajor(x), uminor(x));
+                       printf("udev2dev: attempt to lookup block dev(%d)", x);
+                       return NODEV;
                default:
                        Debugger("udev2dev(...,X)");
                        return NODEV;
index c1d262b..aa86101 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_descrip.c      8.6 (Berkeley) 4/19/94
  * $FreeBSD: src/sys/kern/kern_descrip.c,v 1.81.2.17 2003/06/06 20:21:32 tegge Exp $
- * $DragonFly: src/sys/kern/kern_descrip.c,v 1.6 2003/07/19 21:14:38 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_descrip.c,v 1.7 2003/07/21 05:50:43 dillon Exp $
  */
 
 #include "opt_compat.h"
@@ -76,6 +76,12 @@ static        d_open_t  fdopen;
 
 #define CDEV_MAJOR 22
 static struct cdevsw fildesc_cdevsw = {
+       /* name */      "FD",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      fdopen,
        /* close */     noclose,
        /* read */      noread,
@@ -84,12 +90,8 @@ static struct cdevsw fildesc_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "FD",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int do_dup __P((struct filedesc *fdp, int old, int new, register_t *retval, struct proc *p));
index 58ea83f..c6ab6dd 100644 (file)
@@ -39,7 +39,7 @@
  *     from: Utah $Hdr: mem.c 1.13 89/10/08$
  *     from: @(#)mem.c 7.2 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/kern/kern_memio.c,v 1.6 2003/07/19 21:14:33 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_memio.c,v 1.7 2003/07/21 05:50:39 dillon Exp $
  */
 
 /*
@@ -81,6 +81,12 @@ static       d_poll_t        mmpoll;
 
 #define CDEV_MAJOR 2
 static struct cdevsw mem_cdevsw = {
+       /* name */      "mem",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_MEM,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mmopen,
        /* close */     mmclose,
        /* read */      mmrw,
@@ -89,12 +95,8 @@ static struct cdevsw mem_cdevsw = {
        /* poll */      mmpoll,
        /* mmap */      memmmap,
        /* strategy */  nostrategy,
-       /* name */      "mem",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_MEM,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int rand_bolt;
index 539c29a..028179c 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)subr_log.c  8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/kern/subr_log.c,v 1.39.2.2 2001/06/02 08:11:25 phk Exp $
- * $DragonFly: src/sys/kern/subr_log.c,v 1.4 2003/07/19 21:14:38 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_log.c,v 1.5 2003/07/21 05:50:43 dillon Exp $
  */
 
 /*
@@ -66,6 +66,12 @@ static       void logtimeout(void *arg);
 
 #define CDEV_MAJOR 7
 static struct cdevsw log_cdevsw = {
+       /* name */      "log",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      logopen,
        /* close */     logclose,
        /* read */      logread,
@@ -74,12 +80,8 @@ static struct cdevsw log_cdevsw = {
        /* poll */      logpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "log",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static struct logsoftc {
index f147413..eee0728 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     from: @(#)cons.c        7.2 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/kern/tty_cons.c,v 1.81.2.4 2001/12/17 18:44:41 guido Exp $
- * $DragonFly: src/sys/kern/tty_cons.c,v 1.4 2003/06/25 03:55:57 dillon Exp $
+ * $DragonFly: src/sys/kern/tty_cons.c,v 1.5 2003/07/21 05:50:43 dillon Exp $
  */
 
 #include "opt_ddb.h"
@@ -67,6 +67,12 @@ static       d_kqfilter_t    cnkqfilter;
 
 #define        CDEV_MAJOR      0
 static struct cdevsw cn_cdevsw = {
+       /* name */      "console",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      cnopen,
        /* close */     cnclose,
        /* read */      cnread,
@@ -75,13 +81,9 @@ static struct cdevsw cn_cdevsw = {
        /* poll */      cnpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "console",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  cnkqfilter,
+       /* kqfilter */  cnkqfilter
 };
 
 static dev_t   cn_dev_t;       /* seems to be never really used */
index b200639..2d89f96 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)tty_pty.c   8.4 (Berkeley) 2/20/95
  * $FreeBSD: src/sys/kern/tty_pty.c,v 1.74.2.4 2002/02/20 19:58:13 dillon Exp $
- * $DragonFly: src/sys/kern/tty_pty.c,v 1.5 2003/07/19 21:14:39 dillon Exp $
+ * $DragonFly: src/sys/kern/tty_pty.c,v 1.6 2003/07/21 05:50:43 dillon Exp $
  */
 
 /*
@@ -76,6 +76,12 @@ static       d_poll_t        ptcpoll;
 
 #define        CDEV_MAJOR_S    5
 static struct cdevsw pts_cdevsw = {
+       /* name */      "pts",
+       /* maj */       CDEV_MAJOR_S,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ptsopen,
        /* close */     ptsclose,
        /* read */      ptsread,
@@ -84,17 +90,19 @@ static struct cdevsw pts_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "pts",
-       /* maj */       CDEV_MAJOR_S,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 #define        CDEV_MAJOR_C    6
 static struct cdevsw ptc_cdevsw = {
+       /* name */      "ptc",
+       /* maj */       CDEV_MAJOR_C,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ptcopen,
        /* close */     ptcclose,
        /* read */      ptcread,
@@ -103,13 +111,9 @@ static struct cdevsw ptc_cdevsw = {
        /* poll */      ptcpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ptc",
-       /* maj */       CDEV_MAJOR_C,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 #define BUFSIZ 100             /* Chunk size iomoved to/from user */
index 0c43526..d3de6ee 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)tty_tty.c   8.2 (Berkeley) 9/23/93
  * $FreeBSD: src/sys/kern/tty_tty.c,v 1.30 1999/09/25 18:24:24 phk Exp $
- * $DragonFly: src/sys/kern/tty_tty.c,v 1.4 2003/06/25 03:55:57 dillon Exp $
+ * $DragonFly: src/sys/kern/tty_tty.c,v 1.5 2003/07/21 05:50:43 dillon Exp $
  */
 
 /*
@@ -57,6 +57,12 @@ static       d_poll_t        cttypoll;
 #define        CDEV_MAJOR      1
 /* Don't make this static, since fdesc_vnops uses it. */
 struct cdevsw ctty_cdevsw = {
+       /* name */      "ctty",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      cttyopen,
        /* close */     nullclose,
        /* read */      cttyread,
@@ -65,12 +71,8 @@ struct cdevsw ctty_cdevsw = {
        /* poll */      cttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "ctty",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_TTY,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL)
index d1106ae..ec7a25c 100644 (file)
@@ -38,7 +38,7 @@
  *      @(#)bpf.c      8.2 (Berkeley) 3/28/94
  *
  * $FreeBSD: src/sys/net/bpf.c,v 1.59.2.12 2002/04/14 21:41:48 luigi Exp $
- * $DragonFly: src/sys/net/bpf.c,v 1.4 2003/07/19 21:14:43 dillon Exp $
+ * $DragonFly: src/sys/net/bpf.c,v 1.5 2003/07/21 05:50:43 dillon Exp $
  */
 
 #include "bpf.h"
@@ -139,6 +139,12 @@ static     d_poll_t        bpfpoll;
 
 #define CDEV_MAJOR 23
 static struct cdevsw bpf_cdevsw = {
+       /* name */      "bpf",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      bpfopen,
        /* close */     bpfclose,
        /* read */      bpfread,
@@ -147,12 +153,8 @@ static struct cdevsw bpf_cdevsw = {
        /* poll */      bpfpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "bpf",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index e60da10..2e021e2 100644 (file)
@@ -30,7 +30,7 @@
  *     $Id: i4b_ctl.c,v 1.37 2000/05/31 08:04:43 hm Exp $
  *
  * $FreeBSD: src/sys/i4b/driver/i4b_ctl.c,v 1.10.2.3 2001/08/12 16:22:48 hm Exp $
- * $DragonFly: src/sys/net/i4b/driver/i4b_ctl.c,v 1.2 2003/06/17 04:28:39 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/driver/i4b_ctl.c,v 1.3 2003/07/21 05:50:42 dillon Exp $
  *
  *     last edit-date: [Sat Aug 11 18:06:38 2001]
  *
@@ -106,6 +106,12 @@ static d_poll_t            i4bctlpoll;
 
 #if defined(__FreeBSD__) && __FreeBSD__ >= 4
 static struct cdevsw i4bctl_cdevsw = {
+       /* name */      "i4bctl",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      i4bctlopen,
        /* close */     i4bctlclose,
        /* read */      noread,
@@ -114,12 +120,8 @@ static struct cdevsw i4bctl_cdevsw = {
        /* poll */      POLLFIELD,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "i4bctl",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #else
 static struct cdevsw i4bctl_cdevsw = 
index f65f85a..412796c 100644 (file)
@@ -28,7 +28,7 @@
  *     ---------------------------------------------------
  *
  * $FreeBSD: src/sys/i4b/driver/i4b_rbch.c,v 1.10.2.3 2001/08/12 16:22:48 hm Exp $
- * $DragonFly: src/sys/net/i4b/driver/i4b_rbch.c,v 1.3 2003/07/19 21:14:36 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/driver/i4b_rbch.c,v 1.4 2003/07/21 05:50:42 dillon Exp $
  *
  *     last edit-date: [Sat Aug 11 18:06:57 2001]
  *
@@ -191,6 +191,12 @@ PDEVSTATIC d_select_t i4brbchselect;
 #define CDEV_MAJOR 57
 
 static struct cdevsw i4brbch_cdevsw = {
+       /* name */      "i4brbch",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      i4brbchopen,
        /* close */     i4brbchclose,
        /* read */      i4brbchread,
@@ -199,12 +205,8 @@ static struct cdevsw i4brbch_cdevsw = {
        /* poll */      POLLFIELD,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "i4brbch",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1      
+       /* psize */     nopsize
 };
 
 static void i4brbchattach(void *);
index f8835c4..c4e1d16 100644 (file)
@@ -28,7 +28,7 @@
  *     --------------------------------------------
  *
  * $FreeBSD: src/sys/i4b/driver/i4b_tel.c,v 1.10.2.4 2001/12/16 15:12:57 hm Exp $
- * $DragonFly: src/sys/net/i4b/driver/i4b_tel.c,v 1.3 2003/07/19 21:14:36 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/driver/i4b_tel.c,v 1.4 2003/07/21 05:50:42 dillon Exp $
  *
  *     last edit-date: [Sat Aug 11 18:07:05 2001]
  *
@@ -154,6 +154,12 @@ PDEVSTATIC d_select_t i4btelsel;
 #define CDEV_MAJOR 56
 
 static struct cdevsw i4btel_cdevsw = {
+       /* name */      "i4btel",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      i4btelopen,
        /* close */     i4btelclose,
        /* read */      i4btelread,
@@ -162,12 +168,8 @@ static struct cdevsw i4btel_cdevsw = {
        /* poll */      POLLFIELD,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "i4btel",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 PDEVSTATIC void i4btelinit(void *unused);
index c43c45a..d25a9ef 100644 (file)
@@ -30,7 +30,7 @@
  *     last edit-date: [Sat Aug 11 18:07:15 2001]
  *
  * $FreeBSD: src/sys/i4b/driver/i4b_trace.c,v 1.9.2.3 2001/08/12 16:22:48 hm Exp $
- * $DragonFly: src/sys/net/i4b/driver/i4b_trace.c,v 1.3 2003/07/19 21:14:37 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/driver/i4b_trace.c,v 1.4 2003/07/21 05:50:42 dillon Exp $
  *
  *     NOTE: the code assumes that SPLI4B >= splimp !
  *
@@ -131,6 +131,12 @@ static d_poll_t i4btrcpoll;
 #define CDEV_MAJOR 59
 
 static struct cdevsw i4btrc_cdevsw = {
+        /* name */      "i4btrc",
+        /* maj */       CDEV_MAJOR,
+        /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      i4btrcopen,
         /* close */     i4btrcclose,
         /* read */      i4btrcread,
@@ -139,12 +145,8 @@ static struct cdevsw i4btrc_cdevsw = {
         /* poll */      POLLFIELD,
         /* mmap */      nommap,
         /* strategy */  nostrategy,
-        /* name */      "i4btrc",
-        /* maj */       CDEV_MAJOR,
         /* dump */      nodump,
-        /* psize */     nopsize,
-        /* flags */     0,
-        /* bmaj */      -1
+        /* psize */     nopsize
 };
 
 /*---------------------------------------------------------------------------*
index 89fa26e..f39a636 100644 (file)
@@ -28,7 +28,7 @@
  *     --------------------------------------------
  *
  * $FreeBSD: src/sys/i4b/layer4/i4b_i4bdrv.c,v 1.11.2.5 2001/12/16 15:12:59 hm Exp $
- * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.3 2003/07/19 21:14:37 dillon Exp $
+ * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.4 2003/07/21 05:50:42 dillon Exp $
  *
  *      last edit-date: [Sat Aug 11 18:08:10 2001]
  *
@@ -172,6 +172,12 @@ PDEVSTATIC d_select_t      i4bselect;
 
 #if defined(__FreeBSD__) && __FreeBSD__ >= 4
 static struct cdevsw i4b_cdevsw = {
+       /* name */      "i4b",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      i4bopen,
        /* close */     i4bclose,
        /* read */      i4bread,
@@ -180,12 +186,8 @@ static struct cdevsw i4b_cdevsw = {
        /* poll */      POLLFIELD,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "i4b",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 #else
 static struct cdevsw i4b_cdevsw = {
index 66bc6b7..d241daa 100644 (file)
@@ -32,7 +32,7 @@
 
 /*
  * $FreeBSD: src/sys/net/if_tap.c,v 1.3.2.3 2002/04/14 21:41:48 luigi Exp $
- * $DragonFly: src/sys/net/tap/if_tap.c,v 1.5 2003/07/19 21:14:43 dillon Exp $
+ * $DragonFly: src/sys/net/tap/if_tap.c,v 1.6 2003/07/21 05:50:43 dillon Exp $
  * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
  */
 
@@ -96,6 +96,12 @@ static d_ioctl_t     tapioctl;
 static d_poll_t                tappoll;
 
 static struct cdevsw   tap_cdevsw = {
+       /* dev name */  CDEV_NAME,
+       /* dev major */ CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      tapopen,
        /* close */     tapclose,
        /* read */      tapread,
@@ -104,12 +110,8 @@ static struct cdevsw       tap_cdevsw = {
        /* poll */      tappoll,
        /* mmap */      nommap,
        /* startegy */  nostrategy,
-       /* dev name */  CDEV_NAME,
-       /* dev major */ CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int             taprefcnt = 0;          /* module ref. counter   */
index 5c8e20b..e643ab0 100644 (file)
@@ -14,7 +14,7 @@
  * operation though.
  *
  * $FreeBSD: src/sys/net/if_tun.c,v 1.74.2.8 2002/02/13 00:43:11 dillon Exp $
- * $DragonFly: src/sys/net/tun/if_tun.c,v 1.5 2003/07/19 21:14:43 dillon Exp $
+ * $DragonFly: src/sys/net/tun/if_tun.c,v 1.6 2003/07/21 05:50:43 dillon Exp $
  */
 
 #include "opt_inet.h"
@@ -76,6 +76,12 @@ static       d_poll_t        tunpoll;
 
 #define CDEV_MAJOR 52
 static struct cdevsw tun_cdevsw = {
+       /* name */      "tun",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      tunopen,
        /* close */     tunclose,
        /* read */      tunread,
@@ -84,12 +90,8 @@ static struct cdevsw tun_cdevsw = {
        /* poll */      tunpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "tun",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static void
index 5aa91a1..ed83ae5 100644 (file)
@@ -29,7 +29,7 @@
  * netgraph node.
  *
  * $FreeBSD: src/sys/netgraph/ng_device.c,v 1.1.2.1 2002/08/23 07:15:44 julian Exp $
- * $DragonFly: src/sys/netgraph/ng_device.c,v 1.2 2003/06/17 04:28:49 dillon Exp $
+ * $DragonFly: src/sys/netgraph/ng_device.c,v 1.3 2003/07/21 05:50:44 dillon Exp $
  *
  */
 
@@ -119,6 +119,12 @@ static d_poll_t ngdpoll;
 
 #define NGD_CDEV_MAJOR 20
 static struct cdevsw ngd_cdevsw = {
+        /* name */      "ngd",
+        /* maj */       NGD_CDEV_MAJOR,
+        /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
         /* open */      ngdopen,
         /* close */     ngdclose,
         /* read */      ngdread,
@@ -127,12 +133,8 @@ static struct cdevsw ngd_cdevsw = {
         /* poll */      ngdpoll,
         /* mmap */      nommap,
         /* strategy */  nostrategy,
-        /* name */      "ngd",
-        /* maj */       NGD_CDEV_MAJOR,
         /* dump */      nodump,
-        /* psize */     nopsize,
-        /* flags */     0,
-       /* bmaj */      -1
+        /* psize */     nopsize
 };
 
 /* 
index b736103..9840a5e 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/netsmb/smb_dev.c,v 1.2.2.1 2001/05/22 08:32:33 bp Exp $
- * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.4 2003/06/25 03:56:06 dillon Exp $
+ * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.5 2003/07/21 05:50:44 dillon Exp $
  */
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -87,6 +87,12 @@ int smb_dev_queue(struct smb_dev *ndp, struct smb_rq *rqp, int prio);
 */
 
 static struct cdevsw nsmb_cdevsw = {
+       /* name */      NSMB_NAME,
+       /* maj */       NSMB_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      nsmb_dev_open,
        /* close */     nsmb_dev_close,
        /* read */      nsmb_dev_read,
@@ -95,12 +101,8 @@ static struct cdevsw nsmb_cdevsw = {
        /* poll */      nsmb_dev_poll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      NSMB_NAME,
-       /* maj */       NSMB_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 
index 82ed905..2994df0 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
-/*     $DragonFly: src/sys/opencrypto/cryptodev.c,v 1.4 2003/07/19 21:14:47 dillon Exp $       */
+/*     $DragonFly: src/sys/opencrypto/cryptodev.c,v 1.5 2003/07/21 05:50:44 dillon Exp $       */
 /*     $OpenBSD: cryptodev.c,v 1.52 2002/06/19 07:22:46 deraadt Exp $  */
 
 /*
@@ -743,6 +743,12 @@ 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 = {
+       /* dev name */  "crypto",
+       /* dev major */ CRYPTO_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      cryptoopen,
        /* close */     nullclose,
        /* read */      cryptoread,
@@ -751,11 +757,8 @@ static struct cdevsw crypto_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* dev name */  "crypto",
-       /* dev major */ CRYPTO_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     0,
        /* kqfilter */  NULL
 };
 static dev_t crypto_dev;
index 8e054a2..481f3e6 100644 (file)
@@ -16,7 +16,7 @@
  * Sep, 1994   Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
  *
  * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $
- * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.4 2003/06/28 04:15:59 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.5 2003/07/21 05:50:39 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -85,6 +85,12 @@ static d_poll_t apmpoll;
 
 #define CDEV_MAJOR 39
 static struct cdevsw apm_cdevsw = {
+       /* name */      "apm",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      apmopen,
        /* close */     apmclose,
        /* read */      noread,
@@ -93,12 +99,8 @@ static struct cdevsw apm_cdevsw = {
        /* poll */      apmpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "apm",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int apm_suspend_delay = 1;
index de62693..e611dfd 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  *  dgb.c $FreeBSD: src/sys/gnu/i386/isa/dgb.c,v 1.56.2.1 2001/02/26 04:23:09 jlemon Exp $
- *  dgb.c $DragonFly: src/sys/platform/pc32/gnu/isa/dgb.c,v 1.4 2003/07/19 21:14:32 dillon Exp $
+ *  dgb.c $DragonFly: src/sys/platform/pc32/gnu/isa/dgb.c,v 1.5 2003/07/21 05:50:39 dillon Exp $
  *
  *  Digiboard driver.
  *
@@ -207,6 +207,12 @@ static     d_ioctl_t       dgbioctl;
 
 #define        CDEV_MAJOR      58
 static struct cdevsw dgb_cdevsw = {
+       /* name */      "dgb",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_TTY | D_KQFILTER,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      dgbopen,
        /* close */     dgbclose,
        /* read */      ttyread,
@@ -215,13 +221,9 @@ static struct cdevsw dgb_cdevsw = {
        /* poll */      ttypoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "dgb",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
        /* psize */     nopsize,
-       /* flags */     D_TTY | D_KQFILTER,
-       /* bmaj */      -1,
-       /* kqfilter */  ttykqfilter,
+       /* kqfilter */  ttykqfilter
 };
 
 static speed_t dgbdefaultrate = TTYDEF_SPEED;
index be65f35..c539aba 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)autoconf.c    7.1 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $
- * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.5 2003/07/06 21:23:48 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.6 2003/07/21 05:50:39 dillon Exp $
  */
 
 /*
@@ -58,6 +58,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/bootmaj.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/disklabel.h>
@@ -261,6 +262,21 @@ u_long     bootdev = 0;            /* not a dev_t - encoding is different */
 #define FDMAJOR        2
 #define FDUNITSHIFT     6
 
+/*
+ * The boot code uses old block device major numbers to pass bootdev to
+ * us.  We have to translate these to character device majors because
+ * we don't have block devices any more.
+ */
+static int
+boot_translate_majdev(int bmajor)
+{
+       static int conv[] = { BOOTMAJOR_CONVARY };
+
+       if (bmajor >= 0 && bmajor < sizeof(conv)/sizeof(conv[0]))
+               return(conv[bmajor]);
+       return(-1);
+}
+
 /*
  * Attempt to find the device from which we were booted.
  * If we can do so, and not instructed not to do so,
@@ -286,8 +302,8 @@ setroot()
                printf("no B_DEVMAGIC (bootdev=%#lx)\n", bootdev);
                return;
        }
-       majdev = B_TYPE(bootdev);
-       dev = makebdev(majdev, 0);
+       majdev = boot_translate_majdev(B_TYPE(bootdev));
+       dev = makedev(majdev, 0);
        if (devsw(dev) == NULL)
                return;
        unit = B_UNIT(bootdev);
@@ -303,7 +319,7 @@ setroot()
         * XXX kludge for inconsistent unit numbering and lack of slice
         * support for floppies.
         */
-       if (majdev == FDMAJOR) {
+       if (majdev == FD_CDEV_MAJOR) {
                slice = COMPATIBILITY_SLICE;
                part = RAW_PART;
                mindev = unit << FDUNITSHIFT;
@@ -312,7 +328,7 @@ setroot()
                mindev = dkmakeminor(unit, slice, part);
        }
 
-       newrootdev = makebdev(majdev, mindev);
+       newrootdev = makedev(majdev, mindev);
        sname = dsname(newrootdev, unit, slice, part, partname);
        rootdevnames[0] = malloc(strlen(sname) + 6, M_DEVBUF, M_NOWAIT);
        sprintf(rootdevnames[0], "ufs:%s%s", sname, partname);
index b09aa38..362d5f0 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/i386/i386/elan-mmcr.c,v 1.6.2.1 2002/09/17 22:39:53 sam Exp $
- * $DragonFly: src/sys/platform/pc32/i386/elan-mmcr.c,v 1.2 2003/06/17 04:28:35 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/elan-mmcr.c,v 1.3 2003/07/21 05:50:39 dillon Exp $
  * The AMD Elan sc520 is a system-on-chip gadget which is used in embedded
  * kind of things, see www.soekris.com for instance, and it has a few quirks
  * we need to deal with.
@@ -91,6 +91,12 @@ static d_mmap_t elan_mmap;
 
 #define CDEV_MAJOR 100                 /* Share with xrpu */
 static struct cdevsw elan_cdevsw = {
+       /* name */      "elan",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      elan_open,
        /* close */     elan_close,
        /* read */      noread,
@@ -99,11 +105,8 @@ static struct cdevsw elan_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      elan_mmap,
        /* strategy */  nostrategy,
-       /* name */      "elan",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
+       /* psize */     nopsize
 };
 
 static int
index 82bf399..c313326 100644 (file)
@@ -39,7 +39,7 @@
  *     from: Utah $Hdr: mem.c 1.13 89/10/08$
  *     from: @(#)mem.c 7.2 (Berkeley) 5/9/91
  * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $
- * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.6 2003/07/19 21:14:33 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.7 2003/07/21 05:50:39 dillon Exp $
  */
 
 /*
@@ -81,6 +81,12 @@ static       d_poll_t        mmpoll;
 
 #define CDEV_MAJOR 2
 static struct cdevsw mem_cdevsw = {
+       /* name */      "mem",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     D_MEM,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      mmopen,
        /* close */     mmclose,
        /* read */      mmrw,
@@ -89,12 +95,8 @@ static struct cdevsw mem_cdevsw = {
        /* poll */      mmpoll,
        /* mmap */      memmmap,
        /* strategy */  nostrategy,
-       /* name */      "mem",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_MEM,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 static int rand_bolt;
index a705821..e6525f5 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/i386/perfmon.c,v 1.21 1999/09/25 18:24:04 phk Exp $
- * $DragonFly: src/sys/platform/pc32/i386/perfmon.c,v 1.5 2003/07/12 16:55:47 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/i386/perfmon.c,v 1.6 2003/07/21 05:50:39 dillon Exp $
  */
 
 #include <sys/param.h>
@@ -62,6 +62,12 @@ static d_ioctl_t perfmon_ioctl;
 
 #define CDEV_MAJOR 2   /* We're really a minor of mem.c */
 static struct cdevsw perfmon_cdevsw = {
+       /* name */      "perfmon",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      perfmon_open,
        /* close */     perfmon_close,
        /* read */      noread,
@@ -70,12 +76,8 @@ static struct cdevsw perfmon_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "perfmon",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 /*
index 512df07..e763396 100644 (file)
@@ -35,7 +35,7 @@
  */
 /*
  * $FreeBSD: src/sys/i386/isa/asc.c,v 1.42.2.2 2001/03/01 03:22:39 jlemon Exp $
- * $DragonFly: src/sys/platform/pc32/isa/asc.c,v 1.3 2003/07/19 21:14:34 dillon Exp $
+ * $DragonFly: src/sys/platform/pc32/isa/asc.c,v 1.4 2003/07/21 05:50:40 dillon Exp $
  */
 
 #include "asc.h"
@@ -187,6 +187,12 @@ static d_poll_t            ascpoll;
 #define CDEV_MAJOR 71
 
 static struct cdevsw asc_cdevsw = {
+       /* name */      "asc",
+       /* maj */       CDEV_MAJOR,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      ascopen,
        /* close */     ascclose,
        /* read */      ascread,
@@ -195,12 +201,8 @@ static struct cdevsw asc_cdevsw = {
        /* poll */      ascpoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "asc",
-       /* maj */       CDEV_MAJOR,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 #define STATIC static
index e108a33..d8ac9a1 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)conf.h      8.5 (Berkeley) 1/9/95
  * $FreeBSD: src/sys/sys/conf.h,v 1.103.2.6 2002/03/11 01:14:55 dd Exp $
- * $DragonFly: src/sys/sys/conf.h,v 1.3 2003/06/23 17:55:50 dillon Exp $
+ * $DragonFly: src/sys/sys/conf.h,v 1.4 2003/07/21 05:50:47 dillon Exp $
  */
 
 #ifndef _SYS_CONF_H_
@@ -53,13 +53,13 @@ struct vnode;
 
 struct specinfo {
        u_int           si_flags;
-#define SI_STASHED     0x0001  /* created in stashed storage */
        udev_t          si_udev;
        LIST_ENTRY(specinfo)    si_hash;
        SLIST_HEAD(, vnode) si_hlist;
        char            si_name[SPECNAMELEN + 1];
-       void            *si_drv1, *si_drv2;
-       struct cdevsw   *si_devsw;
+       void            *si_drv1;
+       void            *si_drv2;
+       struct cdevsw   *si_devsw;      /* cached */
        int             si_iosize_max;  /* maximum I/O size (for physio &al) */
        union {
                struct {
@@ -74,6 +74,8 @@ struct specinfo {
        } __si_u;
 };
 
+#define SI_STASHED     0x0001  /* created in stashed storage */
+
 #define si_tty         __si_u.__si_tty.__sit_tty
 #define si_disk                __si_u.__si_disk.__sid_disk
 #define si_mountpoint  __si_u.__si_disk.__sid_mountpoint
@@ -118,7 +120,7 @@ struct knote;
  */
 
 struct thread;
-struct lwkt_wait;
+struct lwkt_port;
 
 typedef struct thread d_thread_t;
 typedef int d_open_t __P((dev_t dev, int oflags, int devtype, d_thread_t *td));
@@ -178,6 +180,16 @@ typedef int l_modem_t __P((struct tty *tp, int flag));
  * Character device switch table
  */
 struct cdevsw {
+       const char      *d_name;        /* base device name, e.g. 'vn' */
+       int             d_maj;          /* major (char) device number */
+       u_int           d_flags;        /* D_ flags */
+       struct lwkt_port *d_port;
+       u_int           d_autoq;        /* thread safe (old style) vec mask */
+
+       /*
+        * Old style vectors are used only if d_port is NULL when the cdevsw
+        * is added to the system.
+        */
        d_open_t        *d_open;
        d_close_t       *d_close;
        d_read_t        *d_read;
@@ -186,13 +198,8 @@ struct cdevsw {
        d_poll_t        *d_poll;
        d_mmap_t        *d_mmap;
        d_strategy_t    *d_strategy;
-       const char      *d_name;        /* base device name, e.g. 'vn' */
-       int             d_maj;
        d_dump_t        *d_dump;
        d_psize_t       *d_psize;
-       u_int           d_flags;
-       int             d_bmaj;
-       /* additions below are not binary compatible with 4.2 and below */
        d_kqfilter_t    *d_kqfilter;
 };
 
@@ -286,7 +293,6 @@ struct cdevsw *devsw __P((dev_t dev));
 const char *devtoname __P((dev_t dev));
 void   freedev __P((dev_t dev));
 int    iszerodev __P((dev_t dev));
-dev_t  makebdev __P((int maj, int min));
 dev_t  make_dev __P((struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int perms, const char *fmt, ...)) __printflike(6, 7);
 int    lminor __P((dev_t dev));
 void   setconf __P((void));
index 28ad121..8e4c837 100644 (file)
@@ -28,7 +28,7 @@
  * 
  *     @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
  * $FreeBSD: src/sys/coda/coda_fbsd.c,v 1.18 1999/09/25 18:23:43 phk Exp $
- * $DragonFly: src/sys/vfs/coda/Attic/coda_fbsd.c,v 1.2 2003/06/17 04:28:19 dillon Exp $
+ * $DragonFly: src/sys/vfs/coda/Attic/coda_fbsd.c,v 1.3 2003/07/21 05:50:25 dillon Exp $
  * 
  */
 
 #define VC_DEV_NO      93
 
 static struct cdevsw codadevsw = {
+       /* name */      "Coda",
+       /* maj */       VC_DEV_NO,
+       /* flags */     0,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      vc_nb_open,
        /* close */     vc_nb_close,
        /* read */      vc_nb_read,
@@ -75,12 +81,8 @@ static struct cdevsw codadevsw = {
        /* poll */      vc_nb_poll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "Coda",
-       /* maj */       VC_DEV_NO,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     0,
-       /* bmaj */      -1
+       /* psize */     nopsize
 };
 
 int     vcdebug = 1;
index a7028b5..10a1796 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)mfs_vfsops.c        8.11 (Berkeley) 6/19/95
  * $FreeBSD: src/sys/ufs/mfs/mfs_vfsops.c,v 1.81.2.3 2001/07/04 17:35:21 tegge Exp $
- * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.6 2003/07/19 21:14:52 dillon Exp $
+ * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.7 2003/07/21 05:50:47 dillon Exp $
  */
 
 
@@ -78,7 +78,15 @@ static int   mfs_statfs __P((struct mount *mp, struct statfs *sbp,
                        struct thread *td));
 static int     mfs_init __P((struct vfsconf *));
 
+#define MFS_CDEV_MAJOR 253
+
 static struct cdevsw mfs_cdevsw = {
+       /* name */      "MFS",
+       /* maj */       MFS_CDEV_MAJOR,
+       /* flags */     D_DISK,
+       /* port */      NULL,
+       /* autoq */     0,
+
        /* open */      noopen,
        /* close */     noclose,
        /* read */      physread,
@@ -87,12 +95,8 @@ static struct cdevsw mfs_cdevsw = {
        /* poll */      nopoll,
        /* mmap */      nommap,
        /* strategy */  nostrategy,
-       /* name */      "MFS",
-       /* maj */       253,
        /* dump */      nodump,
-       /* psize */     nopsize,
-       /* flags */     D_DISK,
-       /* bmaj */      253,
+       /* psize */     nopsize
 };
 
 /*