Make pty's always come up in echo mode.

This commit is contained in:
Poul-Henning Kamp 2004-10-15 09:03:07 +00:00
parent e3fbc9ef36
commit 33da4e5bd8
3 changed files with 3 additions and 2 deletions

View File

@ -3374,7 +3374,7 @@ ttyconsolemode(struct tty *tp, int speed)
tp->t_init_in.c_iflag = TTYDEF_IFLAG;
tp->t_init_in.c_oflag = TTYDEF_OFLAG;
tp->t_init_in.c_cflag = TTYDEF_CFLAG | CLOCAL;
tp->t_init_in.c_lflag = TTYDEF_LFLAG | ECHO | ECHOE | ECHOKE | ECHOCTL;
tp->t_init_in.c_lflag = TTYDEF_LFLAG_ECHO;
tp->t_lock_out.c_cflag = tp->t_lock_in.c_cflag = CLOCAL;
if (speed == 0)
speed = TTYDEF_SPEED;

View File

@ -178,7 +178,7 @@ ptsopen(struct cdev *dev, int flag, int devtype, struct thread *td)
ttychars(tp); /* Set up default chars */
tp->t_iflag = TTYDEF_IFLAG;
tp->t_oflag = TTYDEF_OFLAG;
tp->t_lflag = TTYDEF_LFLAG;
tp->t_lflag = TTYDEF_LFLAG_ECHO;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
} else if (tp->t_state & TS_XCLUDE && suser(td))

View File

@ -47,6 +47,7 @@
#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
#define TTYDEF_OFLAG (OPOST | ONLCR)
#define TTYDEF_LFLAG (ICANON | ISIG | IEXTEN)
#define TTYDEF_LFLAG_ECHO (TTYDEF_LFLAG | ECHO | ECHOE | ECHOKE | ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#define TTYDEF_SPEED (B9600)