From owner-svn-src-all@FreeBSD.ORG Fri Jul 20 08:33:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 995AE106566B; Fri, 20 Jul 2012 08:33:24 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 847038FC14; Fri, 20 Jul 2012 08:33:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6K8XOQw073839; Fri, 20 Jul 2012 08:33:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6K8XOow073837; Fri, 20 Jul 2012 08:33:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201207200833.q6K8XOow073837@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 20 Jul 2012 08:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238653 - head/bin/cat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2012 08:33:24 -0000 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)