summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_compat.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-04 20:59:52 +0000
committered <ed@FreeBSD.org>2010-01-04 20:59:52 +0000
commit74b0526bbe6326adb72e26dabfe79ab1fe00ca4b (patch)
tree1eba0ba44627857020e0992392e2861b5b457b44 /sys/kern/tty_compat.c
parent40024ff7c3bf948cb45283aec877bd552ee934d7 (diff)
downloadFreeBSD-src-74b0526bbe6326adb72e26dabfe79ab1fe00ca4b.zip
FreeBSD-src-74b0526bbe6326adb72e26dabfe79ab1fe00ca4b.tar.gz
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 <petefrench ticketswitch com> MFC after: 2 weeks
Diffstat (limited to 'sys/kern/tty_compat.c')
-rw-r--r--sys/kern/tty_compat.c10
1 files changed, 6 insertions, 4 deletions
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);
OpenPOWER on IntegriCloud