Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 16:01:49 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r240408 - stable/9/bin/cat
Message-ID:  <201209121601.q8CG1nC3001054@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Wed Sep 12 16:01:48 2012
New Revision: 240408
URL: http://svn.freebsd.org/changeset/base/240408

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

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

Modified: stable/9/bin/cat/cat.c
==============================================================================
--- stable/9/bin/cat/cat.c	Wed Sep 12 15:59:03 2012	(r240407)
+++ stable/9/bin/cat/cat.c	Wed Sep 12 16:01:48 2012	(r240408)
@@ -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?201209121601.q8CG1nC3001054>