Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/gehenna-devsw]: src/sys/dev/vme Add the block/character device switches.



details:   https://anonhg.NetBSD.org/src/rev/65984ce48a09
branches:  gehenna-devsw
changeset: 527063:65984ce48a09
user:      gehenna <gehenna%NetBSD.org@localhost>
date:      Thu May 16 11:27:59 2002 +0000

description:
Add the block/character device switches.

diffstat:

 sys/dev/vme/xd.c |  25 ++++++++++++++++++++-----
 sys/dev/vme/xy.c |  25 ++++++++++++++++++++-----
 2 files changed, 40 insertions(+), 10 deletions(-)

diffs (106 lines):

diff -r 4525b2833ad3 -r 65984ce48a09 sys/dev/vme/xd.c
--- a/sys/dev/vme/xd.c  Thu May 16 04:54:51 2002 +0000
+++ b/sys/dev/vme/xd.c  Thu May 16 11:27:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xd.c,v 1.40 2002/01/14 13:32:48 tsutsui Exp $  */
+/*     $NetBSD: xd.c,v 1.40.8.1 2002/05/16 11:27:59 gehenna Exp $      */
 
 /*
  *
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.40 2002/01/14 13:32:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.40.8.1 2002/05/16 11:27:59 gehenna Exp $");
 
 #undef XDC_DEBUG               /* full debug */
 #define XDC_DIAG               /* extra sanity checks */
@@ -248,9 +248,6 @@
 static void xddummystrat __P((struct buf *));
 int    xdgetdisklabel __P((struct xd_softc *, void *));
 
-bdev_decl(xd);
-cdev_decl(xd);
-
 /* XXX - think about this more.. xd_machdep? */
 void xdc_md_setup __P((void));
 int    XDC_DELAY;
@@ -292,6 +289,24 @@
 
 extern struct cfdriver xd_cd;
 
+dev_type_open(xdopen);
+dev_type_close(xdclose);
+dev_type_read(xdread);
+dev_type_write(xdwrite);
+dev_type_ioctl(xdioctl);
+dev_type_strategy(xdstrategy);
+dev_type_dump(xddump);
+dev_type_size(xdsize);
+
+const struct bdevsw xd_bdevsw = {
+       xdopen, xdclose, xdstrategy, xdioctl, xddump, xdsize, D_DISK
+};
+
+const struct cdevsw xd_cdevsw = {
+       xdopen, xdclose, xdread, xdwrite, xdioctl,
+       nostop, notty, nopoll, nommap, D_DISK
+};
+
 struct xdc_attach_args {       /* this is the "aux" args to xdattach */
        int     driveno;        /* unit number */
        int     fullmode;       /* submit mode */
diff -r 4525b2833ad3 -r 65984ce48a09 sys/dev/vme/xy.c
--- a/sys/dev/vme/xy.c  Thu May 16 04:54:51 2002 +0000
+++ b/sys/dev/vme/xy.c  Thu May 16 11:27:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xy.c,v 1.39 2002/01/14 13:32:48 tsutsui Exp $  */
+/*     $NetBSD: xy.c,v 1.39.8.1 2002/05/16 11:28:00 gehenna Exp $      */
 
 /*
  *
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.39 2002/01/14 13:32:48 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.39.8.1 2002/05/16 11:28:00 gehenna Exp $");
 
 #undef XYC_DEBUG               /* full debug */
 #undef XYC_DIAG                        /* extra sanity checks */
@@ -189,9 +189,6 @@
 static void xydummystrat __P((struct buf *));
 int    xygetdisklabel __P((struct xy_softc *, void *));
 
-bdev_decl(xy);
-cdev_decl(xy);
-
 /*
  * cfattach's: device driver interface to autoconfig
  */
@@ -206,6 +203,24 @@
 
 extern struct cfdriver xy_cd;
 
+dev_type_open(xyopen);
+dev_type_close(xyclose);
+dev_type_read(xyread);
+dev_type_write(xywrite);
+dev_type_ioctl(xyioctl);
+dev_type_strategy(xystrategy);
+dev_type_dump(xydump);
+dev_type_size(xysize);
+
+const struct bdevsw xy_bdevsw = {
+       xyopen, xyclose, xystrategy, xyioctl, xydump, xysize, D_DISK
+};
+
+const struct cdevsw xy_cdevsw = {
+       xyopen, xyclose, xyread, xywrite, xyioctl,
+       nostop, notty, nopoll, nommap, D_DISK
+};
+
 struct xyc_attach_args {       /* this is the "aux" args to xyattach */
        int     driveno;        /* unit number */
        int     fullmode;       /* submit mode */



Home | Main Index | Thread Index | Old Index