summaryrefslogtreecommitdiffstats
path: root/bin/cat
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2012-07-20 08:33:23 +0000
committerjh <jh@FreeBSD.org>2012-07-20 08:33:23 +0000
commitc64014573dea6781e2922166d0d28b5fc45df627 (patch)
tree6fe60615007400c100c6a2cf21581f5a2b33117f /bin/cat
parent0fdc094d92caaeafda40a566b16a806e177d57ba (diff)
downloadFreeBSD-src-c64014573dea6781e2922166d0d28b5fc45df627.zip
FreeBSD-src-c64014573dea6781e2922166d0d28b5fc45df627.tar.gz
Use proper error message when fstat(2) fails on stdout.
PR: bin/159746 Submitted by: Alex K.
Diffstat (limited to 'bin/cat')
-rw-r--r--bin/cat/cat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 8b75a82..69c56c0 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -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)
OpenPOWER on IntegriCloud