From owner-svn-src-stable-9@FreeBSD.ORG Wed Sep 12 16:01:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 874B0106564A; Wed, 12 Sep 2012 16:01:49 +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 71EA78FC17; Wed, 12 Sep 2012 16:01:49 +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 q8CG1n9r001056; Wed, 12 Sep 2012 16:01:49 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CG1nC3001054; Wed, 12 Sep 2012 16:01:49 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201209121601.q8CG1nC3001054@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 12 Sep 2012 16:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240408 - stable/9/bin/cat X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 16:01:49 -0000 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)