[git commit] ls: make "ls -s DIR" show total too. Clases 4946

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 27 14:40:26 UTC 2014


commit: http://git.busybox.net/busybox/commit/?id=fca0ee5959f212e46b9a5bb324a1482899172750
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/ls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index 166473d..1b63be5 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1032,7 +1032,7 @@ static void scan_and_display_dirs_recur(struct dnode **dn, int first)
 		}
 		subdnp = scan_one_dir((*dn)->fullname, &nfiles);
 #if ENABLE_DESKTOP
-		if ((G.all_fmt & STYLE_MASK) == STYLE_LONG)
+		if ((G.all_fmt & STYLE_MASK) == STYLE_LONG || (G.all_fmt & LIST_BLOCKS))
 			printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp));
 #endif
 		if (nfiles > 0) {


More information about the busybox-cvs mailing list