cvs commit: src/bin/ls ls.c

David Schultz das at
Tue Jun 8 09:30:14 GMT 2004

das         2004-06-08 09:30:10 UTC

  FreeBSD src repository

  Modified files:
    bin/ls               ls.c 
  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

More information about the cvs-src mailing list