summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_tty.c
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/kern/tty_tty.c
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/kern/tty_tty.c')
-rw-r--r--sys/kern/tty_tty.c18
1 files changed, 10 insertions, 8 deletions
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