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
date and time created 80/07/01 08:20:52 by bill
[unix-history]
/
usr
/
src
/
sys
/
kern
/
tty.c
diff --git
a/usr/src/sys/kern/tty.c
b/usr/src/sys/kern/tty.c
index
7e0c756
..
5afbc56
100644
(file)
--- a/
usr/src/sys/kern/tty.c
+++ b/
usr/src/sys/kern/tty.c
@@
-1,4
+1,4
@@
-/* tty.c 3.
4 %H
% */
+/* tty.c 3.
8 %G
% */
/*
* general TTY subroutines
/*
* general TTY subroutines
@@
-83,7
+83,8
@@
register struct tty *tp;
if(pp->p_pgrp == 0) {
u.u_ttyp = tp;
u.u_ttyd = dev;
if(pp->p_pgrp == 0) {
u.u_ttyp = tp;
u.u_ttyd = dev;
- tp->t_pgrp = pp->p_pid;
+ if (tp->t_pgrp == 0)
+ tp->t_pgrp = pp->p_pid;
pp->p_pgrp = tp->t_pgrp;
}
tp->t_state &= ~WOPEN;
pp->p_pgrp = tp->t_pgrp;
}
tp->t_state &= ~WOPEN;
@@
-107,8
+108,8
@@
register struct tty *tp;
tp->t_erase = CERASE;
tp->t_kill = CKILL;
/* begin local */
tp->t_erase = CERASE;
tp->t_kill = CKILL;
/* begin local */
- tlun.t_suspc =
0377
;
- tlun.t_ds
topc = 0377
;
+ tlun.t_suspc =
CTRL(z)
;
+ tlun.t_ds
uspc = CTRL(y)
;
tlun.t_rprntc = CTRL(r);
tlun.t_flushc = CTRL(o);
tlun.t_werasc = CTRL(w);
tlun.t_rprntc = CTRL(r);
tlun.t_flushc = CTRL(o);
tlun.t_werasc = CTRL(w);
@@
-155,6
+156,7
@@
gtty()
* Do nothing specific version of line
* discipline specific ioctl command.
*/
* Do nothing specific version of line
* discipline specific ioctl command.
*/
+/*ARGSUSED*/
nullioctl(tp, cmd, addr)
register struct tty *tp;
caddr_t addr;
nullioctl(tp, cmd, addr)
register struct tty *tp;
caddr_t addr;
@@
-219,6
+221,7
@@
caddr_t addr;
{
unsigned t;
struct sgttyb iocb;
{
unsigned t;
struct sgttyb iocb;
+ struct clist tq;
extern int nldisp;
switch(com) {
extern int nldisp;
switch(com) {
@@
-269,10
+272,7
@@
caddr_t addr;
* Set new parameters
*/
case TIOCSETP:
* Set new parameters
*/
case TIOCSETP:
- case TIOCSETN: {
- struct clist tq;
- register c;
-
+ case TIOCSETN:
if (copyin(addr, (caddr_t)&iocb, sizeof(iocb))) {
u.u_error = EFAULT;
return(1);
if (copyin(addr, (caddr_t)&iocb, sizeof(iocb))) {
u.u_error = EFAULT;
return(1);
@@
-313,7
+313,6
@@
caddr_t addr;
tp->t_flags = iocb.sg_flags;
(void) spl0();
break;
tp->t_flags = iocb.sg_flags;
(void) spl0();
break;
- }
/*
* send current parameters to user
/*
* send current parameters to user
@@
-415,6
+414,11
@@
caddr_t addr;
u.u_error = EFAULT;
break;
u.u_error = EFAULT;
break;
+ case TIOCOUTQ:
+ if (copyout((caddr_t)&tp->t_outq.c_cc, addr, sizeof(tp->t_outq.c_cc)))
+ u.u_error = EFAULT;
+ break;
+
/* end of locals */
default:
return(0);
/* end of locals */
default:
return(0);
@@
-460,7
+464,7
@@
register struct tty *tp;
;
tp->t_delct = 0;
tp->t_rocount = 0; /* local */
;
tp->t_delct = 0;
tp->t_rocount = 0; /* local */
- tp->t_lstate = 0;
/* reset */
+ tp->t_lstate = 0;
splx(s);
}
splx(s);
}