summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1995-12-13 15:13:57 +0000
committerJulian Elischer <julian@FreeBSD.org>1995-12-13 15:13:57 +0000
commit6ba9ebce283ead4333eec1c2831e3ca1ed4b57cc (patch)
treef0ebb5173fc54865e90ae9881089258ea9c50611 /sys/kern
parent8300a61f5aa81dd76b22b5a500c91e0411a060fc (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_conf.c12
-rw-r--r--sys/kern/kern_lkm.c6
-rw-r--r--sys/kern/kern_physio.c6
-rw-r--r--sys/kern/tty.c12
-rw-r--r--sys/kern/tty_cons.c12
-rw-r--r--sys/kern/tty_pty.c4
-rw-r--r--sys/kern/tty_snoop.c2
7 files changed, 27 insertions, 27 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 5696ae5ef094..4381f3090c97 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_conf.c,v 1.5 1995/11/30 05:59:09 julian Exp $
+ * $Id: kern_conf.c,v 1.6 1995/12/08 11:16:55 julian Exp $
*/
#include <sys/param.h>
@@ -45,7 +45,7 @@
#define ADDENTRY(TTYPE,NXXXDEV) \
int TTYPE##_add(dev_t *descrip, \
struct TTYPE *newentry, \
- struct TTYPE *oldentry) \
+ struct TTYPE **oldentry) \
{ \
int i ; \
if ( (int)*descrip == -1) { /* auto (0 is valid) */ \
@@ -53,7 +53,7 @@ int TTYPE##_add(dev_t *descrip, \
* Search the table looking for a slot... \
*/ \
for (i = 0; i < NXXXDEV; i++) \
- if (TTYPE[i].d_open == NULL) \
+ if (TTYPE[i] == NULL) \
break; /* found one! */ \
/* out of allocable slots? */ \
if (i == NXXXDEV) { \
@@ -68,13 +68,13 @@ int TTYPE##_add(dev_t *descrip, \
\
/* maybe save old */ \
if (oldentry) { \
- bcopy(&TTYPE[i], oldentry, sizeof(struct TTYPE)); \
+ *oldentry = TTYPE[i]; \
} \
newentry->d_maj = i; \
/* replace with new */ \
- bcopy(newentry, &TTYPE[i], sizeof(struct TTYPE)); \
+ TTYPE[i] = newentry; \
\
- /* done! */ \
+ /* done! let them know where we put it */ \
*descrip = makedev(i,0); \
return 0; \
} \
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c
index 4e1eab85a67c..f1f62cac38fc 100644
--- a/sys/kern/kern_lkm.c
+++ b/sys/kern/kern_lkm.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_lkm.c,v 1.24 1995/12/08 11:17:03 julian Exp $
+ * $Id: kern_lkm.c,v 1.25 1995/12/08 23:21:32 phk Exp $
*/
#include <sys/param.h>
@@ -736,12 +736,12 @@ _lkm_dev(lkmtp, cmd)
case LM_DT_BLOCK:
/* replace current slot contents with old contents */
descrip = makedev(i,0);
- bdevsw_add(&descrip, &(args->lkm_olddev.bdev),NULL);
+ bdevsw_add(&descrip, args->lkm_olddev.bdev,NULL);
break;
case LM_DT_CHAR:
/* replace current slot contents with old contents */
- cdevsw_add(&descrip, &(args->lkm_olddev.cdev),NULL);
+ cdevsw_add(&descrip, args->lkm_olddev.cdev,NULL);
break;
default:
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index 36f1c14033dd..7f8324b36db8 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: kern_physio.c,v 1.14 1995/12/02 18:58:48 bde Exp $
+ * $Id: kern_physio.c,v 1.15 1995/12/07 12:46:46 davidg Exp $
*/
#include <sys/param.h>
@@ -174,14 +174,14 @@ minphys(struct buf *bp)
int
rawread(dev_t dev, struct uio *uio, int ioflag)
{
- return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
+ return (physio(cdevsw[major(dev)]->d_strategy, (struct buf *)NULL,
dev, 1, minphys, uio));
}
int
rawwrite(dev_t dev, struct uio *uio, int ioflag)
{
- return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
+ return (physio(cdevsw[major(dev)]->d_strategy, (struct buf *)NULL,
dev, 0, minphys, uio));
}
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 8756a0b91da8..097ba3523474 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.71 1995/10/31 19:27:50 bde Exp $
+ * $Id: tty.c,v 1.72 1995/12/07 12:46:57 davidg Exp $
*/
/*-
@@ -426,7 +426,7 @@ parmrk:
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)].d_stop)(tp,
+ (*cdevsw[major(tp->t_dev)]->d_stop)(tp,
0);
#endif
return (0);
@@ -965,7 +965,7 @@ ttioctl(tp, cmd, data, flag)
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)].d_stop)(tp, 0);
+ (*cdevsw[major(tp->t_dev)]->d_stop)(tp, 0);
#endif
}
splx(s);
@@ -1066,7 +1066,7 @@ ttselect(dev, rw, p)
int rw;
struct proc *p;
{
- return ttyselect((*cdevsw[major(dev)].d_devtotty)(dev), rw, p);
+ return ttyselect((*cdevsw[major(dev)]->d_devtotty)(dev), rw, p);
}
/*
@@ -1154,7 +1154,7 @@ again:
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, rw);
#else
- (*cdevsw[major(tp->t_dev)].d_stop)(tp, rw);
+ (*cdevsw[major(tp->t_dev)]->d_stop)(tp, rw);
#endif
if (rw & FREAD) {
FLUSHQ(&tp->t_canq);
@@ -1321,7 +1321,7 @@ ttymodem(tp, flag)
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)].d_stop)(tp, 0);
+ (*cdevsw[major(tp->t_dev)]->d_stop)(tp, 0);
#endif
}
} else if (flag == 0) {
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index eeaa5f43fd34..914884a420fd 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.38 1995/12/08 23:20:00 phk Exp $
+ * $Id: cons.c,v 1.39 1995/12/09 20:39:45 phk Exp $
*/
#include <sys/param.h>
@@ -150,7 +150,7 @@ cninit_finish()
/*
* Hook the open and close functions.
*/
- cdp = &cdevsw[major(cn_tab->cn_dev)];
+ cdp = cdevsw[major(cn_tab->cn_dev)];
cn_phys_close = cdp->d_close;
cdp->d_close = cnclose;
cn_phys_open = cdp->d_open;
@@ -224,7 +224,7 @@ cnread(dev, uio, flag)
if (cn_tab == NULL)
return (0);
dev = cn_tab->cn_dev;
- return ((*cdevsw[major(dev)].d_read)(dev, uio, flag));
+ return ((*cdevsw[major(dev)]->d_read)(dev, uio, flag));
}
static int
@@ -239,7 +239,7 @@ cnwrite(dev, uio, flag)
dev = constty->t_dev;
else
dev = cn_tab->cn_dev;
- return ((*cdevsw[major(dev)].d_write)(dev, uio, flag));
+ return ((*cdevsw[major(dev)]->d_write)(dev, uio, flag));
}
static int
@@ -266,7 +266,7 @@ cnioctl(dev, cmd, data, flag, p)
return (0);
}
dev = cn_tab->cn_dev;
- return ((*cdevsw[major(dev)].d_ioctl)(dev, cmd, data, flag, p));
+ return ((*cdevsw[major(dev)]->d_ioctl)(dev, cmd, data, flag, p));
}
static int
@@ -280,7 +280,7 @@ cnselect(dev, rw, p)
dev = cn_tab->cn_dev;
- return ((*cdevsw[major(dev)].d_select)(dev, rw, p));
+ return ((*cdevsw[major(dev)]->d_select)(dev, rw, p));
}
int
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 0a68bf44ad44..593e9caadace 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.2 (Berkeley) 9/23/93
- * $Id: tty_pty.c,v 1.30 1995/12/08 23:21:34 phk Exp $
+ * $Id: tty_pty.c,v 1.31 1995/12/10 15:55:17 bde Exp $
*/
/*
@@ -647,7 +647,7 @@ ptyioctl(dev, cmd, data, flag, p)
}
return(0);
} else
- if (cdevsw[major(dev)].d_open == ptcopen)
+ if (cdevsw[major(dev)]->d_open == ptcopen)
switch (cmd) {
case TIOCGPGRP:
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c
index 8f6a33e1f945..36d08d76e875 100644
--- a/sys/kern/tty_snoop.c
+++ b/sys/kern/tty_snoop.c
@@ -65,7 +65,7 @@ devtotty (dev)
if (major(dev) > nchrdev)
return (NULL); /* no such device available */
- return (*cdevsw[major(dev)].d_devtotty)(dev);
+ return (*cdevsw[major(dev)]->d_devtotty)(dev);
}
#define SNP_INPUT_BUF 5 /* This is even too much,the maximal