Pad the human readable output for 'ls -sh' to 6 chars, since we will
authorEric Andersen <andersen@codepoet.org>
Sat, 30 Jun 2001 18:00:26 +0000 (18:00 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 30 Jun 2001 18:00:26 +0000 (18:00 -0000)
have numbers printed as XXX.YU, so we need 6 digits not 4.
 -Erik

coreutils/ls.c
ls.c

index e51a3bc0bcc86760a312c706ff59817bd2c645f6..bd79cc9404e2749d778d3a64d7f44ef5bbe49104 100644 (file)
@@ -610,7 +610,7 @@ static int list_single(struct dnode *dn)
                                break;
                        case LIST_BLOCKS:
 #ifdef BB_FEATURE_HUMAN_READABLE
-                               fprintf(stdout, "%4s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
+                               fprintf(stdout, "%6s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
                                                        KILOBYTE, (ls_disp_hr==TRUE)? 0: KILOBYTE));
 #else
 #if _FILE_OFFSET_BITS == 64
diff --git a/ls.c b/ls.c
index e51a3bc0bcc86760a312c706ff59817bd2c645f6..bd79cc9404e2749d778d3a64d7f44ef5bbe49104 100644 (file)
--- a/ls.c
+++ b/ls.c
@@ -610,7 +610,7 @@ static int list_single(struct dnode *dn)
                                break;
                        case LIST_BLOCKS:
 #ifdef BB_FEATURE_HUMAN_READABLE
-                               fprintf(stdout, "%4s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
+                               fprintf(stdout, "%6s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
                                                        KILOBYTE, (ls_disp_hr==TRUE)? 0: KILOBYTE));
 #else
 #if _FILE_OFFSET_BITS == 64