From c64014573dea6781e2922166d0d28b5fc45df627 Mon Sep 17 00:00:00 2001 From: jh Date: Fri, 20 Jul 2012 08:33:23 +0000 Subject: [PATCH] Use proper error message when fstat(2) fails on stdout. PR: bin/159746 Submitted by: Alex K. --- bin/cat/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 8b75a825b90f..69c56c0af224 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)