aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index b0c543d28..9daa15470 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1018,7 +1018,15 @@ static void scan_and_display_dirs_recur(struct dnode **dn, int first)
1018 subdnp = scan_one_dir((*dn)->fullname, &nfiles); 1018 subdnp = scan_one_dir((*dn)->fullname, &nfiles);
1019#if ENABLE_DESKTOP 1019#if ENABLE_DESKTOP
1020 if (option_mask32 & (OPT_s|OPT_l)) { 1020 if (option_mask32 & (OPT_s|OPT_l)) {
1021 printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp)); 1021 if (option_mask32 & OPT_h) {
1022 printf("total %-"HUMAN_READABLE_MAX_WIDTH_STR"s\n",
1023 /* print size, no fractions, use suffixes */
1024 make_human_readable_str(calculate_blocks(subdnp) * 1024,
1025 0, 0)
1026 );
1027 } else {
1028 printf("total %"OFF_FMT"u\n", calculate_blocks(subdnp));
1029 }
1022 } 1030 }
1023#endif 1031#endif
1024 if (nfiles > 0) { 1032 if (nfiles > 0) {