diff --git a/bin/stty/stty.c b/bin/stty/stty.c index df7e9a493f7b..5c3e98df376f 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)stty.c 5.28 (Berkeley) 6/5/91";*/ -static char rcsid[] = "$Id: stty.c,v 1.7 1993/08/01 18:57:36 mycroft Exp $"; +static char rcsid[] = "$Id: stty.c,v 1.8 1994/01/18 18:10:56 jtc Exp $"; #endif /* not lint */ #include @@ -99,8 +99,6 @@ args: argc -= optind; if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0) warn("TIOCGWINSZ: %s\n", strerror(errno)); - checkredirect(); /* conversion aid */ - switch(fmt) { case NOTSET: if (*argv) diff --git a/bin/stty/util.c b/bin/stty/util.c index e6984db1895a..58853b6ce39d 100644 --- a/bin/stty/util.c +++ b/bin/stty/util.c @@ -33,7 +33,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)util.c 5.2 (Berkeley) 6/4/91";*/ -static char rcsid[] = "$Id: util.c,v 1.5 1993/08/01 18:57:34 mycroft Exp $"; +static char rcsid[] = "$Id: util.c,v 1.6 1994/01/18 18:10:58 jtc Exp $"; #endif /* not lint */ #include @@ -44,23 +44,6 @@ static char rcsid[] = "$Id: util.c,v 1.5 1993/08/01 18:57:34 mycroft Exp $"; #include "stty.h" #include "extern.h" -/* - * Gross, but since we're changing the control descriptor from 1 to 0, most - * users will be probably be doing "stty > /dev/sometty" by accident. If 1 - * and 2 are both ttys, but not the same, assume that 1 was incorrectly - * redirected. - */ -void -checkredirect() -{ - struct stat sb1, sb2; - - if (isatty(STDOUT_FILENO) && isatty(STDERR_FILENO) && - !fstat(STDOUT_FILENO, &sb1) && !fstat(STDERR_FILENO, &sb2) && - (sb1.st_rdev != sb2.st_rdev)) -warn("stdout appears redirected, but stdin is the control descriptor"); -} - #if __STDC__ #include #else