svn commit: r242400 - stable/8/bin/cat

Jaakko Heinonen jh at FreeBSD.org
Wed Oct 31 17:01:57 UTC 2012


Author: jh
Date: Wed Oct 31 17:01:56 2012
New Revision: 242400
URL: http://svn.freebsd.org/changeset/base/242400

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

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

Modified: stable/8/bin/cat/cat.c
==============================================================================
--- stable/8/bin/cat/cat.c	Wed Oct 31 17:00:36 2012	(r242399)
+++ stable/8/bin/cat/cat.c	Wed Oct 31 17:01:56 2012	(r242400)
@@ -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-all mailing list