svn commit: r238653 - head/bin/cat
Jaakko Heinonen
jh at FreeBSD.org
Fri Jul 20 08:33:24 UTC 2012
Author: jh
Date: Fri Jul 20 08:33:23 2012
New Revision: 238653
URL: http://svn.freebsd.org/changeset/base/238653
Log:
Use proper error message when fstat(2) fails on stdout.
PR: bin/159746
Submitted by: Alex K.
Modified:
head/bin/cat/cat.c
Modified: head/bin/cat/cat.c
==============================================================================
--- head/bin/cat/cat.c Fri Jul 20 08:31:36 2012 (r238652)
+++ head/bin/cat/cat.c Fri Jul 20 08:33:23 2012 (r238653)
@@ -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