summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_descrip.c27
-rw-r--r--sys/kern/subr_log.c27
-rw-r--r--sys/kern/tty_cons.c28
-rw-r--r--sys/kern/tty_pty.c54
-rw-r--r--sys/kern/tty_snoop.c25
-rw-r--r--sys/kern/tty_tty.c28
6 files changed, 148 insertions, 41 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 2609d15453fd..11d53053b0cf 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
- * $Id: kern_descrip.c,v 1.60 1999/05/03 23:57:20 billf Exp $
+ * $Id: kern_descrip.c,v 1.61 1999/05/11 19:54:28 phk Exp $
*/
#include "opt_compat.h"
@@ -78,10 +78,27 @@ static d_open_t fdopen;
#define NUMFDESC 64
#define CDEV_MAJOR 22
-static struct cdevsw fildesc_cdevsw =
- { fdopen, noclose, noread, nowrite,
- noioc, nostop, nullreset, nodevtotty,
- seltrue, nommap, nostrat, "FD" };
+static struct cdevsw fildesc_cdevsw = {
+ /* open */ fdopen,
+ /* close */ noclose,
+ /* read */ noread,
+ /* write */ nowrite,
+ /* ioctl */ noioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ nopoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "FD",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
+};
static int finishdup __P((struct filedesc *fdp, int old, int new, register_t *retval));
/*
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index c33d6bbbd58f..67a7d6555ccb 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)subr_log.c 8.1 (Berkeley) 6/10/93
- * $Id: subr_log.c,v 1.33 1998/12/07 21:58:29 archie Exp $
+ * $Id: subr_log.c,v 1.34 1999/05/06 18:12:46 peter Exp $
*/
/*
@@ -68,10 +68,27 @@ static d_ioctl_t logioctl;
static d_poll_t logpoll;
#define CDEV_MAJOR 7
-static struct cdevsw log_cdevsw =
- { logopen, logclose, logread, nowrite, /*7*/
- logioctl, nostop, nullreset, nodevtotty,/* klog */
- logpoll, nommap, NULL, "log", NULL, -1 };
+static struct cdevsw log_cdevsw = {
+ /* open */ logopen,
+ /* close */ logclose,
+ /* read */ logread,
+ /* write */ nowrite,
+ /* ioctl */ logioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ logpoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "log",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
+};
static struct logsoftc {
int sc_state; /* see above for possibilities */
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 32b181ddd527..6b7efb4d56f1 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.64 1999/04/28 10:52:04 dt Exp $
+ * $Id: cons.c,v 1.65 1999/05/08 06:39:20 phk Exp $
*/
#include "opt_devfs.h"
@@ -65,12 +65,26 @@ static d_ioctl_t cnioctl;
static d_poll_t cnpoll;
#define CDEV_MAJOR 0
-static struct cdevsw cn_cdevsw = {
- cnopen, cnclose, cnread, cnwrite,
- cnioctl, nullstop, nullreset, nodevtotty,
- cnpoll, nommap, NULL, "console",
- NULL, -1, nodump, nopsize,
- D_TTY,
+static struct cdevsw cn_cdevsw = {
+ /* open */ cnopen,
+ /* close */ cnclose,
+ /* read */ cnread,
+ /* write */ cnwrite,
+ /* ioctl */ cnioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ cnpoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "console",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ D_TTY,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
static dev_t cn_dev_t; /* seems to be never really used */
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 87f21f00de48..535df84a923c 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.4 (Berkeley) 2/20/95
- * $Id: tty_pty.c,v 1.58 1999/05/14 20:44:20 luoqi Exp $
+ * $Id: tty_pty.c,v 1.59 1999/05/18 14:53:52 luoqi Exp $
*/
/*
@@ -80,21 +80,49 @@ static d_write_t ptcwrite;
static d_poll_t ptcpoll;
#define CDEV_MAJOR_S 5
-static struct cdevsw pts_cdevsw = {
- ptsopen, ptsclose, ptsread, ptswrite,
- ptyioctl, ptsstop, nullreset, ptydevtotty,
- ttpoll, nommap, NULL, "pts",
- NULL, -1, nodump, nopsize,
- D_TTY,
+static struct cdevsw pts_cdevsw = {
+ /* open */ ptsopen,
+ /* close */ ptsclose,
+ /* read */ ptsread,
+ /* write */ ptswrite,
+ /* ioctl */ ptyioctl,
+ /* stop */ ptsstop,
+ /* reset */ noreset,
+ /* devtotty */ ptydevtotty,
+ /* poll */ ttpoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "pts",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR_S,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ D_TTY,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
#define CDEV_MAJOR_C 6
-static struct cdevsw ptc_cdevsw = {
- ptcopen, ptcclose, ptcread, ptcwrite,
- ptyioctl, nullstop, nullreset, ptydevtotty,
- ptcpoll, nommap, NULL, "ptc",
- NULL, -1, nodump, nopsize,
- D_TTY,
+static struct cdevsw ptc_cdevsw = {
+ /* open */ ptcopen,
+ /* close */ ptcclose,
+ /* read */ ptcread,
+ /* write */ ptcwrite,
+ /* ioctl */ ptyioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ ptydevtotty,
+ /* poll */ ptcpoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "ptc",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR_C,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ D_TTY,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
#if NPTY == 1
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c
index 1018083b5315..8b45c8aca963 100644
--- a/sys/kern/tty_snoop.c
+++ b/sys/kern/tty_snoop.c
@@ -46,10 +46,27 @@ static d_ioctl_t snpioctl;
static d_poll_t snppoll;
#define CDEV_MAJOR 53
-static struct cdevsw snp_cdevsw =
- { snpopen, snpclose, snpread, snpwrite, /*53*/
- snpioctl, nostop, nullreset, nodevtotty,/* snoop */
- snppoll, nommap, NULL, "snp", NULL, -1 };
+static struct cdevsw snp_cdevsw = {
+ /* open */ snpopen,
+ /* close */ snpclose,
+ /* read */ snpread,
+ /* write */ snpwrite,
+ /* ioctl */ snpioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ snppoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "snp",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
+};
#ifndef MIN
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 889c93503359..693387d55b1e 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_tty.c 8.2 (Berkeley) 9/23/93
- * $Id: tty_tty.c,v 1.24 1998/06/07 17:11:44 dfr Exp $
+ * $Id: tty_tty.c,v 1.25 1998/08/23 08:26:42 bde Exp $
*/
/*
@@ -60,12 +60,26 @@ static d_poll_t cttypoll;
#define CDEV_MAJOR 1
/* Don't make this static, since fdesc_vnops uses it. */
-struct cdevsw ctty_cdevsw = {
- cttyopen, nullclose, cttyread, cttywrite,
- cttyioctl, nullstop, nullreset, nodevtotty,
- cttypoll, nommap, NULL, "ctty",
- NULL, -1, nodump, nopsize,
- D_TTY,
+struct cdevsw ctty_cdevsw = {
+ /* open */ cttyopen,
+ /* close */ nullclose,
+ /* read */ cttyread,
+ /* write */ cttywrite,
+ /* ioctl */ cttyioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ cttypoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "ctty",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ D_TTY,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
#define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL)