diff options
author | 1996-08-02 12:08:25 +0000 | |
---|---|---|
committer | 1996-08-02 12:08:25 +0000 | |
commit | 5efc5e470c15f7f53ab5a71ad10c2d1eedde8f60 (patch) | |
tree | 75d4f9dc807330a1ca932da9b5e78cda673b7367 | |
parent | extra utmp.h goes away; tom@haven.uniserve.com in freebsd (diff) | |
download | wireguard-openbsd-5efc5e470c15f7f53ab5a71ad10c2d1eedde8f60.tar.xz wireguard-openbsd-5efc5e470c15f7f53ab5a71ad10c2d1eedde8f60.zip |
not a terminal; from freebsd
-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"); |