From 74b0526bbe6326adb72e26dabfe79ab1fe00ca4b Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 4 Jan 2010 20:59:52 +0000 Subject: Make TIOCSTI work again. It looks like I didn't implement this when I imported MPSAFE TTY. Applications like mail(1) still use this. I think it's conceptually bad. Tested by: Pete French MFC after: 2 weeks --- sys/kern/tty_compat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/kern/tty_compat.c') diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index 00764b8..6dce01d 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -180,7 +180,8 @@ ttsetcompat(struct tty *tp, u_long *com, caddr_t data, struct termios *term) /*ARGSUSED*/ int -tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, struct thread *td) +tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, int fflag, + struct thread *td) { switch (com) { case TIOCSETP: @@ -196,7 +197,7 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, struct thread *td) term = tp->t_termios; if ((error = ttsetcompat(tp, &com, data, &term)) != 0) return error; - return tty_ioctl(tp, com, &term, td); + return tty_ioctl(tp, com, &term, fflag, td); } case TIOCGETP: { struct sgttyb *sg = (struct sgttyb *)data; @@ -255,12 +256,13 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, struct thread *td) int ldisczero = 0; return (tty_ioctl(tp, TIOCSETD, - *(int *)data == 2 ? (caddr_t)&ldisczero : data, td)); + *(int *)data == 2 ? (caddr_t)&ldisczero : data, + fflag, td)); } case OTIOCCONS: *(int *)data = 1; - return (tty_ioctl(tp, TIOCCONS, data, td)); + return (tty_ioctl(tp, TIOCCONS, data, fflag, td)); default: return (ENOIOCTL); -- cgit v1.1