Source-Changes-HG archive

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

[src/gehenna-devsw]: src/sys Add the character device switch.



details:   https://anonhg.NetBSD.org/src/rev/7c1b930243f6
branches:  gehenna-devsw
changeset: 527034:7c1b930243f6
user:      gehenna <gehenna%NetBSD.org@localhost>
date:      Thu May 16 03:54:50 2002 +0000

description:
Add the character device switch.

diffstat:

 sys/net/if_tun.c         |  16 ++++++++++++++--
 sys/netinet/ip_fil.c     |  12 ++++++++++--
 sys/netisdn/i4b_ctl.c    |  11 +++++++++--
 sys/netisdn/i4b_i4bdrv.c |  11 +++++++++--
 sys/netisdn/i4b_rbch.c   |  11 +++++++++--
 sys/netisdn/i4b_tel.c    |  10 ++++++++--
 sys/netisdn/i4b_trace.c  |  11 +++++++++--
 7 files changed, 68 insertions(+), 14 deletions(-)

diffs (244 lines):

diff -r 226e6e2b87fe -r 7c1b930243f6 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Thu May 16 03:52:37 2002 +0000
+++ b/sys/net/if_tun.c  Thu May 16 03:54:50 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.51 2002/03/13 06:43:18 itojun Exp $       */
+/*     $NetBSD: if_tun.c,v 1.51.4.1 2002/05/16 03:57:33 gehenna Exp $  */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -15,7 +15,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.51 2002/03/13 06:43:18 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.51.4.1 2002/05/16 03:57:33 gehenna Exp $");
 
 #include "tun.h"
 
@@ -91,6 +91,18 @@
 #endif
 static struct tun_softc *tun_find_unit __P((dev_t));
 
+dev_type_open(tunopen);
+dev_type_close(tunclose);
+dev_type_read(tunread);
+dev_type_write(tunwrite);
+dev_type_ioctl(tunioctl);
+dev_type_poll(tunpoll);
+
+const struct cdevsw tun_cdevsw = {
+       tunopen, tunclose, tunread, tunwrite, tunioctl,
+       nostop, notty, tunpoll, nommap,
+};
+
 void
 tunattach(unused)
        int unused;
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netinet/ip_fil.c
--- a/sys/netinet/ip_fil.c      Thu May 16 03:52:37 2002 +0000
+++ b/sys/netinet/ip_fil.c      Thu May 16 03:54:50 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_fil.c,v 1.79 2002/05/02 17:13:28 martti Exp $       */
+/*     $NetBSD: ip_fil.c,v 1.79.2.1 2002/05/16 03:55:59 gehenna Exp $  */
 
 /*
  * Copyright (C) 1993-2001 by Darren Reed.
@@ -123,7 +123,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil.c,v 1.79 2002/05/02 17:13:28 martti Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil.c,v 1.79.2.1 2002/05/16 03:55:59 gehenna Exp $");
 #else
 static const char sccsid[] = "@(#)ip_fil.c     2.41 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_fil.c,v 2.42.2.55 2002/03/26 15:54:39 darrenr Exp";
@@ -198,6 +198,14 @@
 toid_t ipfr_slowtimer_ch;
 #endif
 
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105290000)
+#include <sys/conf.h>
+const struct cdevsw ipl_cdevsw = {
+       iplopen, iplclose, iplread, nowrite, iplioctl,
+       nostop, notty, nopoll, nommap,
+};
+#endif
+
 #if (_BSDI_VERSION >= 199510) && defined(_KERNEL)
 # include <sys/device.h>
 # include <sys/conf.h>
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netisdn/i4b_ctl.c
--- a/sys/netisdn/i4b_ctl.c     Thu May 16 03:52:37 2002 +0000
+++ b/sys/netisdn/i4b_ctl.c     Thu May 16 03:54:50 2002 +0000
@@ -27,7 +27,7 @@
  *     i4b_ctl.c - i4b system control port driver
  *     ------------------------------------------
  *
- *     $Id: i4b_ctl.c,v 1.8 2002/03/24 20:35:56 martin Exp $
+ *     $Id: i4b_ctl.c,v 1.8.2.1 2002/05/16 03:54:50 gehenna Exp $
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_ctl.c,v 1.8 2002/03/24 20:35:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_ctl.c,v 1.8.2.1 2002/05/16 03:54:50 gehenna Exp $");
 
 #include "isdnctl.h"
 
@@ -153,6 +153,13 @@
 int isdnctlioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
 #endif /* !FreeBSD */
 
+#ifdef __NetBSD__
+const struct cdevsw isdnctl_cdevsw = {
+       isdnctlopen, isdnctlclose, noread, nowrite, isdnctlioctl,
+       nostop, notty, nopoll, nommap,
+};
+#endif /* __NetBSD__ */
+
 #if BSD > 199306 && defined(__FreeBSD__)
 /*---------------------------------------------------------------------------*
  *     initialization at kernel load time
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netisdn/i4b_i4bdrv.c
--- a/sys/netisdn/i4b_i4bdrv.c  Thu May 16 03:52:37 2002 +0000
+++ b/sys/netisdn/i4b_i4bdrv.c  Thu May 16 03:54:50 2002 +0000
@@ -27,7 +27,7 @@
  *     i4b_i4bdrv.c - i4b userland interface driver
  *     --------------------------------------------
  *
- *     $Id: i4b_i4bdrv.c,v 1.19 2002/04/17 15:23:47 drochner Exp $ 
+ *     $Id: i4b_i4bdrv.c,v 1.19.2.1 2002/05/16 03:54:50 gehenna Exp $ 
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_i4bdrv.c,v 1.19 2002/04/17 15:23:47 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_i4bdrv.c,v 1.19.2.1 2002/05/16 03:54:50 gehenna Exp $");
 
 #include "isdn.h"
 
@@ -193,6 +193,13 @@
 
 #endif /* BSD > 199306 && defined(__FreeBSD__) */
 
+#ifdef __NetBSD__
+const struct cdevsw isdn_cdevsw = {
+       isdnopen, isdnclose, isdnread, nowrite, isdnioctl,
+       nostop, notty, isdnpoll, nommap,
+};
+#endif /* __NetBSD__ */
+
 #ifdef __bsdi__
 #include <sys/device.h>
 int i4bmatch(struct device *parent, struct cfdata *cf, void *aux);
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netisdn/i4b_rbch.c
--- a/sys/netisdn/i4b_rbch.c    Thu May 16 03:52:37 2002 +0000
+++ b/sys/netisdn/i4b_rbch.c    Thu May 16 03:54:50 2002 +0000
@@ -27,7 +27,7 @@
  *     i4b_rbch.c - device driver for raw B channel data
  *     ---------------------------------------------------
  *
- *     $Id: i4b_rbch.c,v 1.9 2002/03/18 23:28:03 martin Exp $
+ *     $Id: i4b_rbch.c,v 1.9.4.1 2002/05/16 03:54:50 gehenna Exp $
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_rbch.c,v 1.9 2002/03/18 23:28:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_rbch.c,v 1.9.4.1 2002/05/16 03:54:50 gehenna Exp $");
 
 #include "isdnbchan.h"
 
@@ -188,6 +188,13 @@
 #endif
 #endif
 
+#ifdef __NetBSD__
+const struct cdevsw isdnbchan_cdevsw = {
+       isdnbchanopen, isdnbchanclose, isdnbchanread, isdnbchanwrite,
+       isdnbchanioctl, nostop, notty, isdnbchanpoll, nommap,
+};
+#endif /* __NetBSD__ */
+
 #if BSD > 199306 && defined(__FreeBSD__)
 #define PDEVSTATIC     static
 #define IOCTL_CMD_T    u_long
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netisdn/i4b_tel.c
--- a/sys/netisdn/i4b_tel.c     Thu May 16 03:52:37 2002 +0000
+++ b/sys/netisdn/i4b_tel.c     Thu May 16 03:54:50 2002 +0000
@@ -27,7 +27,7 @@
  *     i4b_tel.c - device driver for ISDN telephony
  *     --------------------------------------------
  *
- *     $Id: i4b_tel.c,v 1.9 2002/03/17 20:54:05 martin Exp $
+ *     $Id: i4b_tel.c,v 1.9.4.1 2002/05/16 03:54:50 gehenna Exp $
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_tel.c,v 1.9 2002/03/17 20:54:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_tel.c,v 1.9.4.1 2002/05/16 03:54:50 gehenna Exp $");
 
 #include "isdntel.h"
 
@@ -194,6 +194,12 @@
 
 #endif /* __FreeBSD__ */
 
+#ifdef __NetBSD__
+const struct cdevsw isdntel_cdevsw = {
+       isdntelopen, isdntelclose, isdntelread, isdntelwrite, isdntelioctl,
+       nostop, notty, isdntelpoll, nommap,
+};
+#endif /* __NetBSD__ */
 
 #if BSD > 199306 && defined(__FreeBSD__)
 
diff -r 226e6e2b87fe -r 7c1b930243f6 sys/netisdn/i4b_trace.c
--- a/sys/netisdn/i4b_trace.c   Thu May 16 03:52:37 2002 +0000
+++ b/sys/netisdn/i4b_trace.c   Thu May 16 03:54:50 2002 +0000
@@ -27,7 +27,7 @@
  *     i4btrc - device driver for trace data read device
  *     ---------------------------------------------------
  *
- *     $Id: i4b_trace.c,v 1.9 2002/03/24 20:36:03 martin Exp $
+ *     $Id: i4b_trace.c,v 1.9.2.1 2002/05/16 03:54:51 gehenna Exp $
  *
  *     last edit-date: [Fri Jan  5 11:33:47 2001]
  *
@@ -35,7 +35,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_trace.c,v 1.9 2002/03/24 20:36:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_trace.c,v 1.9.2.1 2002/05/16 03:54:51 gehenna Exp $");
 
 #include "isdntrc.h"
 
@@ -87,6 +87,13 @@
 int isdntrcread __P((dev_t dev, struct uio * uio, int ioflag));
 int isdntrcioctl __P((dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p));
 
+#ifdef __NetBSD__
+const struct cdevsw isdntrc_cdevsw = {
+       isdntrcopen, isdntrcclose, isdntrcread, nowrite, isdntrcioctl,
+       nostop, notty, nopoll, nommap,
+};
+#endif /* __NetBSD__ */
+
 /*---------------------------------------------------------------------------*
  *     interface attach routine
  *---------------------------------------------------------------------------*/



Home | Main Index | Thread Index | Old Index