Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2004 09:30:10 +0000 (UTC)
From:      David Schultz <das@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/bin/ls ls.c
Message-ID:  <200406080930.i589UAxB011344@repoman.freebsd.org>

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



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