summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-23 08:26:42 +0000
committerbde <bde@FreeBSD.org>1998-08-23 08:26:42 +0000
commit35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c (patch)
tree89e7eed7449d834bed22fb54542711e65643ac81 /sys
parenta86ea80a2987ff6a41fbe0c94f9029e6d2b6af5d (diff)
downloadFreeBSD-src-35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c.zip
FreeBSD-src-35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c.tar.gz
Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read(). Cleaned up the cdevswitch initializers for all tty drivers. Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cy/cy.c9
-rw-r--r--sys/dev/cy/cy_isa.c9
-rw-r--r--sys/dev/dgb/dgb.c17
-rw-r--r--sys/dev/dgb/dgm.c17
-rw-r--r--sys/dev/rc/rc.c15
-rw-r--r--sys/dev/rp/rp.c17
-rw-r--r--sys/dev/si/si.c18
-rw-r--r--sys/dev/sio/sio.c9
-rw-r--r--sys/dev/syscons/syscons.c20
-rw-r--r--sys/gnu/i386/isa/dgb.c17
-rw-r--r--sys/gnu/i386/isa/dgm.c17
-rw-r--r--sys/i386/i386/cons.c15
-rw-r--r--sys/i386/isa/cx.c16
-rw-r--r--sys/i386/isa/cy.c9
-rw-r--r--sys/i386/isa/istallion.c16
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c13
-rw-r--r--sys/i386/isa/rc.c15
-rw-r--r--sys/i386/isa/rp.c17
-rw-r--r--sys/i386/isa/si.c18
-rw-r--r--sys/i386/isa/sio.c9
-rw-r--r--sys/i386/isa/stallion.c15
-rw-r--r--sys/i386/isa/syscons.c20
-rw-r--r--sys/isa/sio.c9
-rw-r--r--sys/kern/tty_cons.c15
-rw-r--r--sys/kern/tty_pty.c32
-rw-r--r--sys/kern/tty_tty.c18
26 files changed, 216 insertions, 186 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index d10b911..3f76567 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.69 1998/08/19 04:17:38 bde Exp $
+ * $Id: cy.c,v 1.70 1998/08/20 05:21:50 bde Exp $
*/
#include "opt_compat.h"
@@ -378,12 +378,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 48
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 48
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index d10b911..3f76567 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.69 1998/08/19 04:17:38 bde Exp $
+ * $Id: cy.c,v 1.70 1998/08/20 05:21:50 bde Exp $
*/
#include "opt_compat.h"
@@ -378,12 +378,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 48
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 48
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index 9537c12..aac2725 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.38 1998/08/12 23:44:22 brian Exp $
+ * dgb.c $Id: dgb.c,v 1.39 1998/08/16 01:21:49 bde Exp $
*
* Digiboard driver.
*
@@ -222,11 +222,14 @@ static d_ioctl_t dgbioctl;
static d_stop_t dgbstop;
static d_devtotty_t dgbdevtotty;
-#define CDEV_MAJOR 58
-static struct cdevsw dgb_cdevsw =
- { dgbopen, dgbclose, dgbread, dgbwrite, /*58*/
- dgbioctl, dgbstop, noreset, dgbdevtotty, /* dgb */
- ttpoll, nommap, NULL, "dgb", NULL, -1 };
+#define CDEV_MAJOR 58
+static struct cdevsw dgb_cdevsw = {
+ dgbopen, dgbclose, dgbread, dgbwrite,
+ dgbioctl, dgbstop, noreset, dgbdevtotty,
+ ttpoll, nommap, NULL, "dgb",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static speed_t dgbdefaultrate = TTYDEF_SPEED;
@@ -1071,8 +1074,6 @@ open_top:
goto out;
}
- ttsetwater(tp);
-
/* handle fake DCD for callout devices */
/* and initial DCD */
diff --git a/sys/dev/dgb/dgm.c b/sys/dev/dgb/dgm.c
index 487b1aa..eca931a 100644
--- a/sys/dev/dgb/dgm.c
+++ b/sys/dev/dgb/dgm.c
@@ -1,5 +1,5 @@
/*-
- * $Id: dgm.c,v 1.3 1998/08/12 17:38:09 bde Exp $
+ * $Id: dgm.c,v 1.4 1998/08/16 01:21:49 bde Exp $
*
* This driver and the associated header files support the ISA PC/Xem
* Digiboards. Its evolutionary roots are described below.
@@ -227,11 +227,14 @@ static d_ioctl_t dgmioctl;
static d_stop_t dgmstop;
static d_devtotty_t dgmdevtotty;
-#define CDEV_MAJOR 101
-static struct cdevsw dgm_cdevsw =
- { dgmopen, dgmclose, dgmread, dgmwrite,
- dgmioctl, dgmstop, noreset, dgmdevtotty, /* dgm */
- ttpoll, nommap, NULL, "dgm", NULL, -1 };
+#define CDEV_MAJOR 101
+static struct cdevsw dgm_cdevsw = {
+ dgmopen, dgmclose, dgmread, dgmwrite,
+ dgmioctl, dgmstop, noreset, dgmdevtotty,
+ ttpoll, nommap, NULL, "dgm",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static speed_t dgmdefaultrate = TTYDEF_SPEED;
@@ -876,8 +879,6 @@ open_top:
goto out;
}
- ttsetwater(tp);
-
/* handle fake DCD for callout devices */
/* and initial DCD */
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 021f089..5f845c6 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -98,11 +98,14 @@ static d_ioctl_t rcioctl;
static d_stop_t rcstop;
static d_devtotty_t rcdevtotty;
-#define CDEV_MAJOR 63
-static struct cdevsw rc_cdevsw =
- { rcopen, rcclose, rcread, rcwrite, /*63*/
- rcioctl, rcstop, noreset, rcdevtotty,/* rc */
- ttpoll, nommap, NULL, "rc", NULL, -1 };
+#define CDEV_MAJOR 63
+static struct cdevsw rc_cdevsw = {
+ rcopen, rcclose, rcread, rcwrite,
+ rcioctl, rcstop, noreset, rcdevtotty,
+ ttpoll, nommap, NULL, "rc",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
/* Per-board structure */
static struct rc_softc {
@@ -777,8 +780,6 @@ again:
goto out;
(void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
- ttsetwater(tp);
-
if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
(*linesw[tp->t_line].l_modem)(tp, 1);
}
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index e26c46c..847660e 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -788,8 +788,6 @@ struct isa_driver rpdriver = {
rpprobe, rpattach, "rp"
};
-#define CDEV_MAJOR 81
-
static char driver_name[] = "rp";
static d_open_t rpopen;
@@ -800,11 +798,14 @@ static d_ioctl_t rpioctl;
static d_stop_t rpstop;
static d_devtotty_t rpdevtotty;
-static struct cdevsw rp_cdevsw =
- { rpopen, rpclose, rpread, rpwrite,
- rpioctl, rpstop, noreset, rpdevtotty,
- ttpoll, nommap, NULL, driver_name,
- NULL, -1};
+#define CDEV_MAJOR 81
+static struct cdevsw rp_cdevsw = {
+ rpopen, rpclose, rpread, rpwrite,
+ rpioctl, rpstop, noreset, rpdevtotty,
+ ttpoll, nommap, NULL, driver_name,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static int rp_controller_port = 0;
static int rp_num_ports_open = 0;
@@ -1400,8 +1401,6 @@ open_top:
return(error);
}
- ttsetwater(tp);
-
rp_num_ports_open++;
IntMask = sGetChanIntID(&rp->rp_channel);
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 4b37f61..8b7dc26 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.74 1998/08/16 00:57:07 bde Exp $
+ * $Id: si.c,v 1.75 1998/08/16 01:04:48 bde Exp $
*/
#ifndef lint
@@ -173,12 +173,14 @@ static d_ioctl_t siioctl;
static d_stop_t sistop;
static d_devtotty_t sidevtotty;
-#define CDEV_MAJOR 68
-static struct cdevsw si_cdevsw =
- { siopen, siclose, siread, siwrite, /*68*/
- siioctl, sistop, noreset, sidevtotty,/* si */
- ttpoll, nommap, NULL, "si", NULL, -1 };
-
+#define CDEV_MAJOR 68
+static struct cdevsw si_cdevsw = {
+ siopen, siclose, siread, siwrite,
+ siioctl, sistop, noreset, sidevtotty,
+ ttpoll, nommap, NULL, "si",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
#ifdef SI_DEBUG /* use: ``options "SI_DEBUG"'' in your config file */
@@ -1232,8 +1234,6 @@ open_top:
goto out;
/* XXX: we should goto_top if siparam slept */
- ttsetwater(tp);
-
/* set initial DCD state */
pp->sp_last_hi_ip = ccbp->hi_ip;
if ((pp->sp_last_hi_ip & IP_DCD) || IS_CALLOUT(mynor)) {
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index c36de17..ab21950 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.211 1998/08/19 04:17:37 bde Exp $
+ * $Id: sio.c,v 1.212 1998/08/20 05:12:48 bde Exp $
*/
#include "opt_comconsole.h"
@@ -343,12 +343,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 28
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 28
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 831f56b..d99ed3b 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.274 1998/08/14 06:32:03 sos Exp $
+ * $Id: syscons.c,v 1.275 1998/08/18 07:36:47 sos Exp $
*/
#include "sc.h"
@@ -336,11 +336,14 @@ static d_ioctl_t scioctl;
static d_devtotty_t scdevtotty;
static d_mmap_t scmmap;
-#define CDEV_MAJOR 12
-static struct cdevsw scdevsw = {
+#define CDEV_MAJOR 12
+static struct cdevsw sc_cdevsw = {
scopen, scclose, scread, scwrite,
scioctl, nullstop, noreset, scdevtotty,
- ttpoll, scmmap, nostrategy, "sc", NULL, -1 };
+ ttpoll, scmmap, nostrategy, "sc",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
/*
* These functions need to be before calls to them so they can be inlined.
@@ -833,16 +836,16 @@ scattach(struct isa_device *dev)
at_shutdown(scshutdown, NULL, SHUTDOWN_PRE_SYNC);
- cdevsw_add(&cdev, &scdevsw, NULL);
+ cdevsw_add(&cdev, &sc_cdevsw, NULL);
#ifdef DEVFS
for (vc = 0; vc < MAXCONS; vc++)
- sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc, DV_CHR,
+ sc_devfs_token[vc] = devfs_add_devswf(&sc_cdevsw, vc, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc);
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
- sc_mouse_devfs_token = devfs_add_devswf(&scdevsw, SC_MOUSE, DV_CHR,
+ sc_mouse_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_MOUSE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
- sc_console_devfs_token = devfs_add_devswf(&scdevsw, SC_CONSOLE, DV_CHR,
+ sc_console_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_CONSOLE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "consolectl");
#endif
return 0;
@@ -886,7 +889,6 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
scparam(tp, &tp->t_termios);
- ttsetwater(tp);
(*linesw[tp->t_line].l_modem)(tp, 1);
if (minor(dev) == SC_MOUSE)
mouse_level = 0; /* XXX */
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c
index 9537c12..aac2725 100644
--- a/sys/gnu/i386/isa/dgb.c
+++ b/sys/gnu/i386/isa/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.38 1998/08/12 23:44:22 brian Exp $
+ * dgb.c $Id: dgb.c,v 1.39 1998/08/16 01:21:49 bde Exp $
*
* Digiboard driver.
*
@@ -222,11 +222,14 @@ static d_ioctl_t dgbioctl;
static d_stop_t dgbstop;
static d_devtotty_t dgbdevtotty;
-#define CDEV_MAJOR 58
-static struct cdevsw dgb_cdevsw =
- { dgbopen, dgbclose, dgbread, dgbwrite, /*58*/
- dgbioctl, dgbstop, noreset, dgbdevtotty, /* dgb */
- ttpoll, nommap, NULL, "dgb", NULL, -1 };
+#define CDEV_MAJOR 58
+static struct cdevsw dgb_cdevsw = {
+ dgbopen, dgbclose, dgbread, dgbwrite,
+ dgbioctl, dgbstop, noreset, dgbdevtotty,
+ ttpoll, nommap, NULL, "dgb",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static speed_t dgbdefaultrate = TTYDEF_SPEED;
@@ -1071,8 +1074,6 @@ open_top:
goto out;
}
- ttsetwater(tp);
-
/* handle fake DCD for callout devices */
/* and initial DCD */
diff --git a/sys/gnu/i386/isa/dgm.c b/sys/gnu/i386/isa/dgm.c
index 487b1aa..eca931a 100644
--- a/sys/gnu/i386/isa/dgm.c
+++ b/sys/gnu/i386/isa/dgm.c
@@ -1,5 +1,5 @@
/*-
- * $Id: dgm.c,v 1.3 1998/08/12 17:38:09 bde Exp $
+ * $Id: dgm.c,v 1.4 1998/08/16 01:21:49 bde Exp $
*
* This driver and the associated header files support the ISA PC/Xem
* Digiboards. Its evolutionary roots are described below.
@@ -227,11 +227,14 @@ static d_ioctl_t dgmioctl;
static d_stop_t dgmstop;
static d_devtotty_t dgmdevtotty;
-#define CDEV_MAJOR 101
-static struct cdevsw dgm_cdevsw =
- { dgmopen, dgmclose, dgmread, dgmwrite,
- dgmioctl, dgmstop, noreset, dgmdevtotty, /* dgm */
- ttpoll, nommap, NULL, "dgm", NULL, -1 };
+#define CDEV_MAJOR 101
+static struct cdevsw dgm_cdevsw = {
+ dgmopen, dgmclose, dgmread, dgmwrite,
+ dgmioctl, dgmstop, noreset, dgmdevtotty,
+ ttpoll, nommap, NULL, "dgm",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static speed_t dgmdefaultrate = TTYDEF_SPEED;
@@ -876,8 +879,6 @@ open_top:
goto out;
}
- ttsetwater(tp);
-
/* handle fake DCD for callout devices */
/* and initial DCD */
diff --git a/sys/i386/i386/cons.c b/sys/i386/i386/cons.c
index fceb4dd..1482c61 100644
--- a/sys/i386/i386/cons.c
+++ b/sys/i386/i386/cons.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.57 1998/03/28 10:32:56 bde Exp $
+ * $Id: cons.c,v 1.58 1998/06/07 17:09:58 dfr Exp $
*/
#include "opt_devfs.h"
@@ -81,11 +81,14 @@ static d_write_t cnwrite;
static d_ioctl_t cnioctl;
static d_poll_t cnpoll;
-#define CDEV_MAJOR 0
-static struct cdevsw cn_cdevsw =
- { cnopen, cnclose, cnread, cnwrite, /*0*/
- cnioctl, nullstop, nullreset, nodevtotty,/* console */
- cnpoll, nommap, NULL, "console", NULL, -1 };
+#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 dev_t cn_dev_t; /* seems to be never really used */
SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLTYPE_OPAQUE|CTLFLAG_RD,
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index deadd56..b4fb324 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -88,13 +88,15 @@ static d_ioctl_t cxioctl;
static d_stop_t cxstop;
static d_devtotty_t cxdevtotty;
-# define CDEV_MAJOR 42
-
-/* Don't make this static. if_cx.c uses it. */
-struct cdevsw cx_cdevsw =
- { cxopen, cxclose, cxread, cxwrite, /*42*/
- cxioctl, cxstop, nullreset, cxdevtotty,/* cronyx */
- ttpoll, nommap, NULL, "cx", NULL, -1 };
+#define CDEV_MAJOR 42
+/* Don't make this static, since if_cx.c uses it. */
+struct cdevsw cx_cdevsw = {
+ cxopen, cxclose, cxread, cxwrite,
+ cxioctl, cxstop, nullreset, cxdevtotty,
+ ttpoll, nommap, NULL, "cx",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
#else
struct tty *cx_tty [NCX*NCHAN]; /* tty data */
#endif
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index d10b911..3f76567 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.69 1998/08/19 04:17:38 bde Exp $
+ * $Id: cy.c,v 1.70 1998/08/20 05:21:50 bde Exp $
*/
#include "opt_compat.h"
@@ -378,12 +378,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 48
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 48
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index c11fc16..6dfe7f9 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: istallion.c,v 1.19 1998/06/07 17:10:42 dfr Exp $
+ * $Id: istallion.c,v 1.20 1998/08/16 01:21:49 bde Exp $
*/
/*****************************************************************************/
@@ -641,12 +641,13 @@ struct isa_driver stlidriver = {
*/
#define CDEV_MAJOR 75
-
-static struct cdevsw stli_cdevsw =
- { stliopen, stliclose, stliread, stliwrite,
- stliioctl, stlistop, noreset, stlidevtotty,
- ttpoll, nommap, NULL, stli_drvname,
- NULL, -1 };
+static struct cdevsw stli_cdevsw = {
+ stliopen, stliclose, stliread, stliwrite,
+ stliioctl, stlistop, noreset, stlidevtotty,
+ ttpoll, nommap, NULL, stli_drvname,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static stli_devsw_installed = 0;
@@ -988,7 +989,6 @@ stliopen_restart:
portp->initintios;
stli_initopen(portp);
wakeup(&portp->state);
- ttsetwater(tp);
if ((portp->sigs & TIOCM_CD) || callout)
(*linesw[tp->t_line].l_modem)(tp, 1);
} else {
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 097af1d..90758b2 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -122,11 +122,13 @@ static d_ioctl_t pcioctl;
static d_devtotty_t pcdevtotty;
static d_mmap_t pcmmap;
-#define CDEV_MAJOR 12
-static struct cdevsw pcdevsw = {
+#define CDEV_MAJOR 12
+static struct cdevsw pc_cdevsw = {
pcopen, pcclose, pcread, pcwrite,
pcioctl, nullstop, noreset, pcdevtotty,
- ttpoll, pcmmap, nostrategy, "vt", NULL, -1
+ ttpoll, pcmmap, nostrategy, "vt",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
#if PCVT_FREEBSD > 205
@@ -356,13 +358,13 @@ pcattach(struct isa_device *dev)
{
dev_t dev = makedev(CDEV_MAJOR, 0);
- cdevsw_add(&dev, &pcdevsw, NULL);
+ cdevsw_add(&dev, &pc_cdevsw, NULL);
}
#ifdef DEVFS
for(vt = 0; vt < MAXCONS; vt++) {
pcvt_devfs_token[vt] =
- devfs_add_devswf(&pcdevsw, vt,
+ devfs_add_devswf(&pc_cdevsw, vt,
DV_CHR, 0, 0, 0600, "ttyv%r", vt );
}
#endif DEVFS
@@ -489,7 +491,6 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
pcparam(tp, &tp->t_termios);
- ttsetwater(tp);
(*linesw[tp->t_line].l_modem)(tp, 1); /* fake connection */
winsz = 1; /* set winsize later */
}
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 021f089..5f845c6 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -98,11 +98,14 @@ static d_ioctl_t rcioctl;
static d_stop_t rcstop;
static d_devtotty_t rcdevtotty;
-#define CDEV_MAJOR 63
-static struct cdevsw rc_cdevsw =
- { rcopen, rcclose, rcread, rcwrite, /*63*/
- rcioctl, rcstop, noreset, rcdevtotty,/* rc */
- ttpoll, nommap, NULL, "rc", NULL, -1 };
+#define CDEV_MAJOR 63
+static struct cdevsw rc_cdevsw = {
+ rcopen, rcclose, rcread, rcwrite,
+ rcioctl, rcstop, noreset, rcdevtotty,
+ ttpoll, nommap, NULL, "rc",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
/* Per-board structure */
static struct rc_softc {
@@ -777,8 +780,6 @@ again:
goto out;
(void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
- ttsetwater(tp);
-
if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
(*linesw[tp->t_line].l_modem)(tp, 1);
}
diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c
index e26c46c..847660e 100644
--- a/sys/i386/isa/rp.c
+++ b/sys/i386/isa/rp.c
@@ -788,8 +788,6 @@ struct isa_driver rpdriver = {
rpprobe, rpattach, "rp"
};
-#define CDEV_MAJOR 81
-
static char driver_name[] = "rp";
static d_open_t rpopen;
@@ -800,11 +798,14 @@ static d_ioctl_t rpioctl;
static d_stop_t rpstop;
static d_devtotty_t rpdevtotty;
-static struct cdevsw rp_cdevsw =
- { rpopen, rpclose, rpread, rpwrite,
- rpioctl, rpstop, noreset, rpdevtotty,
- ttpoll, nommap, NULL, driver_name,
- NULL, -1};
+#define CDEV_MAJOR 81
+static struct cdevsw rp_cdevsw = {
+ rpopen, rpclose, rpread, rpwrite,
+ rpioctl, rpstop, noreset, rpdevtotty,
+ ttpoll, nommap, NULL, driver_name,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static int rp_controller_port = 0;
static int rp_num_ports_open = 0;
@@ -1400,8 +1401,6 @@ open_top:
return(error);
}
- ttsetwater(tp);
-
rp_num_ports_open++;
IntMask = sGetChanIntID(&rp->rp_channel);
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index 4b37f61..8b7dc26 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.74 1998/08/16 00:57:07 bde Exp $
+ * $Id: si.c,v 1.75 1998/08/16 01:04:48 bde Exp $
*/
#ifndef lint
@@ -173,12 +173,14 @@ static d_ioctl_t siioctl;
static d_stop_t sistop;
static d_devtotty_t sidevtotty;
-#define CDEV_MAJOR 68
-static struct cdevsw si_cdevsw =
- { siopen, siclose, siread, siwrite, /*68*/
- siioctl, sistop, noreset, sidevtotty,/* si */
- ttpoll, nommap, NULL, "si", NULL, -1 };
-
+#define CDEV_MAJOR 68
+static struct cdevsw si_cdevsw = {
+ siopen, siclose, siread, siwrite,
+ siioctl, sistop, noreset, sidevtotty,
+ ttpoll, nommap, NULL, "si",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
#ifdef SI_DEBUG /* use: ``options "SI_DEBUG"'' in your config file */
@@ -1232,8 +1234,6 @@ open_top:
goto out;
/* XXX: we should goto_top if siparam slept */
- ttsetwater(tp);
-
/* set initial DCD state */
pp->sp_last_hi_ip = ccbp->hi_ip;
if ((pp->sp_last_hi_ip & IP_DCD) || IS_CALLOUT(mynor)) {
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index c36de17..ab21950 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.211 1998/08/19 04:17:37 bde Exp $
+ * $Id: sio.c,v 1.212 1998/08/20 05:12:48 bde Exp $
*/
#include "opt_comconsole.h"
@@ -343,12 +343,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 28
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 28
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index d12befc..8ec866d 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stallion.c,v 1.19 1998/04/15 17:45:50 bde Exp $
+ * $Id: stallion.c,v 1.20 1998/06/07 17:11:00 dfr Exp $
*/
/*****************************************************************************/
@@ -534,11 +534,13 @@ DATA_SET (pcidevice_set, stlpcidriver);
*/
#define CDEV_MAJOR 72
-
-static struct cdevsw stl_cdevsw =
- { stlopen, stlclose, stlread, stlwrite,
- stlioctl, stlstop, noreset, stldevtotty,
- ttpoll, nommap, NULL, "stl", NULL, -1 };
+static struct cdevsw stl_cdevsw = {
+ stlopen, stlclose, stlread, stlwrite,
+ stlioctl, stlstop, noreset, stldevtotty,
+ ttpoll, nommap, NULL, "stl",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
static stl_devsw_installed = 0;
@@ -799,7 +801,6 @@ stlopen_restart:
tp->t_termios = callout ? portp->initouttios :
portp->initintios;
stl_rawopen(portp);
- ttsetwater(tp);
if ((portp->sigs & TIOCM_CD) || callout)
(*linesw[tp->t_line].l_modem)(tp, 1);
} else {
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index 831f56b..d99ed3b 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.274 1998/08/14 06:32:03 sos Exp $
+ * $Id: syscons.c,v 1.275 1998/08/18 07:36:47 sos Exp $
*/
#include "sc.h"
@@ -336,11 +336,14 @@ static d_ioctl_t scioctl;
static d_devtotty_t scdevtotty;
static d_mmap_t scmmap;
-#define CDEV_MAJOR 12
-static struct cdevsw scdevsw = {
+#define CDEV_MAJOR 12
+static struct cdevsw sc_cdevsw = {
scopen, scclose, scread, scwrite,
scioctl, nullstop, noreset, scdevtotty,
- ttpoll, scmmap, nostrategy, "sc", NULL, -1 };
+ ttpoll, scmmap, nostrategy, "sc",
+ NULL, -1, nodump, nopsize,
+ D_TTY,
+};
/*
* These functions need to be before calls to them so they can be inlined.
@@ -833,16 +836,16 @@ scattach(struct isa_device *dev)
at_shutdown(scshutdown, NULL, SHUTDOWN_PRE_SYNC);
- cdevsw_add(&cdev, &scdevsw, NULL);
+ cdevsw_add(&cdev, &sc_cdevsw, NULL);
#ifdef DEVFS
for (vc = 0; vc < MAXCONS; vc++)
- sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc, DV_CHR,
+ sc_devfs_token[vc] = devfs_add_devswf(&sc_cdevsw, vc, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc);
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
- sc_mouse_devfs_token = devfs_add_devswf(&scdevsw, SC_MOUSE, DV_CHR,
+ sc_mouse_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_MOUSE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
- sc_console_devfs_token = devfs_add_devswf(&scdevsw, SC_CONSOLE, DV_CHR,
+ sc_console_devfs_token = devfs_add_devswf(&sc_cdevsw, SC_CONSOLE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "consolectl");
#endif
return 0;
@@ -886,7 +889,6 @@ scopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
scparam(tp, &tp->t_termios);
- ttsetwater(tp);
(*linesw[tp->t_line].l_modem)(tp, 1);
if (minor(dev) == SC_MOUSE)
mouse_level = 0; /* XXX */
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index c36de17..ab21950 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.211 1998/08/19 04:17:37 bde Exp $
+ * $Id: sio.c,v 1.212 1998/08/20 05:12:48 bde Exp $
*/
#include "opt_comconsole.h"
@@ -343,12 +343,13 @@ static d_ioctl_t sioioctl;
static d_stop_t siostop;
static d_devtotty_t siodevtotty;
-#define CDEV_MAJOR 28
-static struct cdevsw sio_cdevsw = {
+#define CDEV_MAJOR 28
+static struct cdevsw sio_cdevsw = {
sioopen, sioclose, sioread, siowrite,
sioioctl, siostop, noreset, siodevtotty,
ttpoll, nommap, NULL, driver_name,
- NULL, -1,
+ NULL, -1, nodump, nopsize,
+ D_TTY,
};
static int comconsole = -1;
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index fceb4dd..1482c61 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.57 1998/03/28 10:32:56 bde Exp $
+ * $Id: cons.c,v 1.58 1998/06/07 17:09:58 dfr Exp $
*/
#include "opt_devfs.h"
@@ -81,11 +81,14 @@ static d_write_t cnwrite;
static d_ioctl_t cnioctl;
static d_poll_t cnpoll;
-#define CDEV_MAJOR 0
-static struct cdevsw cn_cdevsw =
- { cnopen, cnclose, cnread, cnwrite, /*0*/
- cnioctl, nullstop, nullreset, nodevtotty,/* console */
- cnpoll, nommap, NULL, "console", NULL, -1 };
+#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 dev_t cn_dev_t; /* seems to be never really used */
SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLTYPE_OPAQUE|CTLFLAG_RD,
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 1f430e2..214f103 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.52 1998/06/07 17:11:43 dfr Exp $
+ * $Id: tty_pty.c,v 1.53 1998/07/15 12:18:30 bde Exp $
*/
/*
@@ -79,18 +79,23 @@ static d_read_t ptcread;
static d_write_t ptcwrite;
static d_poll_t ptcpoll;
-#define CDEV_MAJOR_S 5
-#define CDEV_MAJOR_C 6
-static struct cdevsw pts_cdevsw =
- { ptsopen, ptsclose, ptsread, ptswrite, /*5*/
- ptyioctl, ptsstop, nullreset, ptydevtotty,/* ttyp */
- ttpoll, nommap, NULL, "pts", NULL, -1 };
-
-static struct cdevsw ptc_cdevsw =
- { ptcopen, ptcclose, ptcread, ptcwrite, /*6*/
- ptyioctl, nullstop, nullreset, ptydevtotty,/* ptyp */
- ptcpoll, nommap, NULL, "ptc", NULL, -1 };
-
+#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,
+};
+
+#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,
+};
#if NPTY == 1
#undef NPTY
@@ -178,7 +183,6 @@ ptsopen(dev, flag, devtype, p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
- ttsetwater(tp); /* would be done in xxparam() */
} else if (tp->t_state&TS_XCLUDE && p->p_ucred->cr_uid != 0)
return (EBUSY);
if (tp->t_oproc) /* Ctrlr still around. */
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 409be70..889c935 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.23 1998/02/20 13:46:56 bde Exp $
+ * $Id: tty_tty.c,v 1.24 1998/06/07 17:11:44 dfr Exp $
*/
/*
@@ -58,13 +58,15 @@ static d_write_t cttywrite;
static d_ioctl_t cttyioctl;
static d_poll_t cttypoll;
-#define CDEV_MAJOR 1
-/* Don't make static, fdesc_vnops uses this. */
-struct cdevsw ctty_cdevsw =
- { cttyopen, nullclose, cttyread, cttywrite, /*1*/
- cttyioctl, nullstop, nullreset, nodevtotty,/* tty */
- cttypoll, nommap, NULL, "ctty", NULL, -1 };
-
+#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,
+};
#define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL)
OpenPOWER on IntegriCloud