summaryrefslogtreecommitdiffstats
path: root/bin/stty/stty.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-04 08:16:32 +0000
committerbde <bde@FreeBSD.org>1995-07-04 08:16:32 +0000
commit23f9d789cdea7b4d95a2e3048192baf150c3cf90 (patch)
tree82d95e42c06a89e9501b2d6b84ae10e2889aaf1b /bin/stty/stty.c
parent711bd7d1092171cbc4f7424589d6fd1e9d1abbcd (diff)
downloadFreeBSD-src-23f9d789cdea7b4d95a2e3048192baf150c3cf90.zip
FreeBSD-src-23f9d789cdea7b4d95a2e3048192baf150c3cf90.tar.gz
Improve the recently changed and an old error message: don't report probe
errors.
Diffstat (limited to 'bin/stty/stty.c')
-rw-r--r--bin/stty/stty.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c
index 9d9f679..0f5e925 100644
--- a/bin/stty/stty.c
+++ b/bin/stty/stty.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stty.c,v 1.4 1995/05/30 00:07:28 rgrimes Exp $
+ * $Id: stty.c,v 1.5 1995/07/02 08:54:27 joerg Exp $
*/
#ifndef lint
@@ -95,10 +95,8 @@ main(argc, argv)
args: argc -= optind;
argv += optind;
- if (tcgetattr(i.fd, &i.t) < 0) {
- warn("tcgetattr: not running on a terminal");
- exit(1);
- }
+ if (tcgetattr(i.fd, &i.t) < 0)
+ errx(1, "stdin isn't a terminal");
if (ioctl(i.fd, TIOCGETD, &i.ldisc) < 0)
err(1, "TIOCGETD");
if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0)
OpenPOWER on IntegriCloud