projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4.2 distribution
[unix-history]
/
usr
/
src
/
sys
/
kern
/
tty_pty.c
diff --git
a/usr/src/sys/kern/tty_pty.c
b/usr/src/sys/kern/tty_pty.c
index
09c7bd6
..
3a9986f
100644
(file)
--- a/
usr/src/sys/kern/tty_pty.c
+++ b/
usr/src/sys/kern/tty_pty.c
@@
-1,4
+1,4
@@
-/* tty_pty.c
4.27 82/10/17
*/
+/* tty_pty.c
6.1 83/07/29
*/
/*
* Pseudo-teletype Driver
/*
* Pseudo-teletype Driver
@@
-9,6
+9,7
@@
#if NPTY > 0
#include "../h/param.h"
#include "../h/systm.h"
#if NPTY > 0
#include "../h/param.h"
#include "../h/systm.h"
+#include "../h/ioctl.h"
#include "../h/tty.h"
#include "../h/dir.h"
#include "../h/user.h"
#include "../h/tty.h"
#include "../h/dir.h"
#include "../h/user.h"
@@
-56,6
+57,7
@@
ptsopen(dev, flag)
tp = &pt_tty[minor(dev)];
if ((tp->t_state & TS_ISOPEN) == 0) {
ttychars(tp); /* Set up default chars */
tp = &pt_tty[minor(dev)];
if ((tp->t_state & TS_ISOPEN) == 0) {
ttychars(tp); /* Set up default chars */
+ tp->t_ispeed = tp->t_ospeed = EXTB;
tp->t_flags = 0; /* No features (nor raw mode) */
} else if (tp->t_state&TS_XCLUDE && u.u_uid != 0)
return (EBUSY);
tp->t_flags = 0; /* No features (nor raw mode) */
} else if (tp->t_state&TS_XCLUDE && u.u_uid != 0)
return (EBUSY);
@@
-206,7
+208,7
@@
ptcclose(dev)
if (tp->t_state & TS_ISOPEN)
gsignal(tp->t_pgrp, SIGHUP);
tp->t_state &= ~TS_CARR_ON; /* virtual carrier gone */
if (tp->t_state & TS_ISOPEN)
gsignal(tp->t_pgrp, SIGHUP);
tp->t_state &= ~TS_CARR_ON; /* virtual carrier gone */
-
flushtty
(tp, FREAD|FWRITE);
+
ttyflush
(tp, FREAD|FWRITE);
tp->t_oproc = 0; /* mark closed */
}
tp->t_oproc = 0; /* mark closed */
}
@@
-219,7
+221,7
@@
ptcread(dev, uio)
int error = 0;
if ((tp->t_state&(TS_CARR_ON|TS_ISOPEN)) == 0)
int error = 0;
if ((tp->t_state&(TS_CARR_ON|TS_ISOPEN)) == 0)
- return;
+ return
(EIO)
;
pti = &pt_ioctl[minor(dev)];
if (pti->pt_flags & PF_PKT) {
if (pti->pt_send) {
pti = &pt_ioctl[minor(dev)];
if (pti->pt_flags & PF_PKT) {
if (pti->pt_send) {
@@
-412,7
+414,7
@@
ptyioctl(dev, cmd, data, flag)
pti->pt_flags |= PF_REMOTE;
else
pti->pt_flags &= ~PF_REMOTE;
pti->pt_flags |= PF_REMOTE;
else
pti->pt_flags &= ~PF_REMOTE;
-
flushtty
(tp, FREAD|FWRITE);
+
ttyflush
(tp, FREAD|FWRITE);
return (0);
case FIONBIO:
return (0);
case FIONBIO:
@@
-430,8
+432,8
@@
ptyioctl(dev, cmd, data, flag)
error = ttioctl(tp, cmd, data, dev);
if (error < 0)
error = ENOTTY;
error = ttioctl(tp, cmd, data, dev);
if (error < 0)
error = ENOTTY;
- { int stop = (tp->t_
un.t_chr.t_
stopc == ('s'&037) &&
- tp->t_
un.t_chr.t_
startc == ('q'&037));
+ { int stop = (tp->t_stopc == ('s'&037) &&
+ tp->t_startc == ('q'&037));
if (pti->pt_flags & PF_NOSTOP) {
if (stop) {
pti->pt_send &= TIOCPKT_NOSTOP;
if (pti->pt_flags & PF_NOSTOP) {
if (stop) {
pti->pt_send &= TIOCPKT_NOSTOP;