From owner-cvs-all@FreeBSD.ORG Tue Jun 8 09:30:13 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBDC416A4CE; Tue, 8 Jun 2004 09:30:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF21143D1F; Tue, 8 Jun 2004 09:30:13 +0000 (GMT) (envelope-from das@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i589UAIH011345; Tue, 8 Jun 2004 09:30:10 GMT (envelope-from das@repoman.freebsd.org) Received: (from das@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i589UAxB011344; Tue, 8 Jun 2004 09:30:10 GMT (envelope-from das) Message-Id: <200406080930.i589UAxB011344@repoman.freebsd.org> From: David Schultz Date: Tue, 8 Jun 2004 09:30:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/ls ls.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 09:30:14 -0000 das 2004-06-08 09:30:10 UTC FreeBSD src repository Modified files: bin/ls ls.c Log: If we are asked to print the total number of blocks, do so even if we have no entries to print (either due to an empty directory or an error). This makes the -l and -s options more consistent, like Solaris and (Debian) Linux. To make this happen, tweak two optimizations on the second call to display(): - Don't skip display() altogether, even if list == NULL. - Don't skip the call to the printfn in display() if we need to print the total. PR: 45723 Revision Changes Path 1.78 +14 -12 src/bin/ls/ls.c