svn commit: r240408 - stable/9/bin/cat

Jaakko Heinonen jh at FreeBSD.org
Wed Sep 12 16:01:49 UTC 2012


Author: jh
Date: Wed Sep 12 16:01:48 2012
New Revision: 240408
URL: http://svn.freebsd.org/changeset/base/240408

Log:
  MFC r238653: Use proper error message when fstat(2) fails on stdout.
  
  PR:		bin/159746

Modified:
  stable/9/bin/cat/cat.c
Directory Properties:
  stable/9/bin/cat/   (props changed)

Modified: stable/9/bin/cat/cat.c
==============================================================================
--- stable/9/bin/cat/cat.c	Wed Sep 12 15:59:03 2012	(r240407)
+++ stable/9/bin/cat/cat.c	Wed Sep 12 16:01:48 2012	(r240408)
@@ -260,7 +260,7 @@ raw_cat(int rfd)
 	wfd = fileno(stdout);
 	if (buf == NULL) {
 		if (fstat(wfd, &sbuf))
-			err(1, "%s", filename);
+			err(1, "stdout");
 		if (S_ISREG(sbuf.st_mode)) {
 			/* If there's plenty of RAM, use a large copy buffer */
 			if (sysconf(_SC_PHYS_PAGES) > PHYSPAGES_THRESHOLD)


More information about the svn-src-stable-9 mailing list