mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 07:11:05 +01:00
Improve the recently changed and an old error message: don't report probe
errors.
This commit is contained in:
parent
04c3f9f7ab
commit
a7a41dba35
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9393
@ -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)
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: util.c,v 1.2 1994/09/24 02:59:05 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -62,5 +62,5 @@ checkredirect()
|
||||
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");
|
||||
warnx("stdout appears redirected, but stdin is the control descriptor");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user