]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If we are asked to print the total number of blocks, do so even if we
authordas <das@FreeBSD.org>
Tue, 8 Jun 2004 09:30:10 +0000 (09:30 +0000)
committerdas <das@FreeBSD.org>
Tue, 8 Jun 2004 09:30:10 +0000 (09:30 +0000)
commit89c138dcf08ea624d3c1a707ff03f725d1b76f88
tree0d308a0f1ce5a5cc19a0694658eac588c1f05184
parent03b595604e8ecb0df9c45b98ff40642cb6b3cf93
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
bin/ls/ls.c