diff options
author | bde <bde@FreeBSD.org> | 1997-12-06 13:25:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-12-06 13:25:01 +0000 |
commit | e868842f1180b3e29eff5629c14e3f84e2408cf5 (patch) | |
tree | bbf7b0ee0acd4d019803c4377eb818fb2dde8ec6 /sys/kern | |
parent | 5bdfd4647651209e0cb83448fabf713a337acb1b (diff) | |
download | FreeBSD-src-e868842f1180b3e29eff5629c14e3f84e2408cf5.zip FreeBSD-src-e868842f1180b3e29eff5629c14e3f84e2408cf5.tar.gz |
Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level. This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 4 | ||||
-rw-r--r-- | sys/kern/tty_compat.c | 4 | ||||
-rw-r--r-- | sys/kern/tty_conf.c | 4 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d1b708a..3a58b87 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.97 1997/10/12 20:24:05 phk Exp $ + * $Id: tty.c,v 1.98 1997/11/07 08:53:01 phk Exp $ */ /*- @@ -1027,7 +1027,7 @@ ttioctl(tp, cmd, data, flag) #if defined(COMPAT_43) || defined(COMPAT_SUNOS) return (ttcompat(tp, cmd, data, flag)); #else - return (-1); + return (ENOIOCTL); #endif } return (0); diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index 71959cd..c3b1164 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_compat.c 8.1 (Berkeley) 6/10/93 - * $Id: tty_compat.c,v 1.22 1997/03/24 12:03:03 bde Exp $ + * $Id: tty_compat.c,v 1.23 1997/08/02 14:31:39 bde Exp $ */ /* @@ -263,7 +263,7 @@ ttcompat(tp, com, data, flag) return (ttioctl(tp, TIOCCONS, data, flag)); default: - return (-1); + return (ENOIOCTL); } return (0); } diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 2e765c8..ce9d881 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty_conf.c 8.4 (Berkeley) 1/21/94 - * $Id$ + * $Id: tty_conf.c,v 1.10 1997/02/22 09:39:25 peter Exp $ */ #include <sys/param.h> @@ -204,5 +204,5 @@ l_nullioctl(tp, cmd, data, flags, p) struct proc *p; { - return (-1); + return (ENOIOCTL); } diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index db06962..e60f473 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 - * $Id: tty_pty.c,v 1.46 1997/09/14 02:40:45 peter Exp $ + * $Id: tty_pty.c,v 1.47 1997/09/16 11:43:32 bde Exp $ */ /* @@ -730,9 +730,9 @@ ptyioctl(dev, cmd, data, flag, p) return(0); } error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p); - if (error < 0) + if (error == ENOIOCTL) error = ttioctl(tp, cmd, data, flag); - if (error < 0) { + if (error == ENOIOCTL) { if (pti->pt_flags & PF_UCNTL && (cmd & ~0xff) == UIOCCMD(0)) { if (cmd & 0xff) { |