Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2012 08:33:24 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238653 - head/bin/cat
Message-ID:  <201207200833.q6K8XOow073837@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207200833.q6K8XOow073837>