diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-02 12:08:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-02 12:08:26 +0000 |
commit | 4aa645ce7b61ca45001d029319152934d0bb412a (patch) | |
tree | 445209f04eaa4d41dff8b7b673ce47dca483b704 /bin/stty | |
parent | 717089015fcaed404c80ef0b514b9c2beeb361f5 (diff) |
not a terminal; from freebsd
Diffstat (limited to 'bin/stty')
-rw-r--r-- | bin/stty/stty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c index e8520affe4f..43b2c317897 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stty.c,v 1.2 1996/06/23 14:21:53 deraadt Exp $ */ +/* $OpenBSD: stty.c,v 1.3 1996/08/02 12:08:25 deraadt Exp $ */ /* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: stty.c,v 1.2 1996/06/23 14:21:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: stty.c,v 1.3 1996/08/02 12:08:25 deraadt Exp $"; #endif #endif /* not lint */ @@ -100,10 +100,10 @@ main(argc, argv) args: argc -= optind; argv += optind; - if (ioctl(i.fd, TIOCGETD, &i.ldisc) < 0) - err(1, "TIOCGETD"); if (tcgetattr(i.fd, &i.t) < 0) - err(1, "tcgetattr"); + errx(1, "not a terminal"); + if (ioctl(i.fd, TIOCGETD, &i.ldisc) < 0 ) + err(1, "TIOCGETD"); if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0) warn("TIOCGWINSZ"); |