Fix ls so it uses make_human_readable_str() the same way already
authorEric Andersen <andersen@codepoet.org>
Wed, 28 Mar 2001 20:26:51 +0000 (20:26 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 28 Mar 2001 20:26:51 +0000 (20:26 -0000)
used by 'du' and 'df'.  Now we just need to fix make_human_readable_str
so it behaves they way it used to before Matt fixed it.

coreutils/ls.c
ls.c

index 201509210fdaee0033327f38a10631c72017ed2b..86691fdaf4b6d8a7dc7a052095b3758eae5eaf20 100644 (file)
@@ -648,7 +648,7 @@ static int list_single(struct dnode *dn)
                                        printf("%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev));
                                } else {
 #ifdef BB_FEATURE_HUMAN_READABLE
-                                       fprintf(stdout, "%9s ", make_human_readable_str(dn->dstat.st_size,
+                                       fprintf(stdout, "%9s ", make_human_readable_str(dn->dstat.st_size>>10,
                                                                (ls_disp_hr==TRUE)? 0: 1));
 #else
 #if _FILE_OFFSET_BITS == 64
diff --git a/ls.c b/ls.c
index 201509210fdaee0033327f38a10631c72017ed2b..86691fdaf4b6d8a7dc7a052095b3758eae5eaf20 100644 (file)
--- a/ls.c
+++ b/ls.c
@@ -648,7 +648,7 @@ static int list_single(struct dnode *dn)
                                        printf("%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev));
                                } else {
 #ifdef BB_FEATURE_HUMAN_READABLE
-                                       fprintf(stdout, "%9s ", make_human_readable_str(dn->dstat.st_size,
+                                       fprintf(stdout, "%9s ", make_human_readable_str(dn->dstat.st_size>>10,
                                                                (ls_disp_hr==TRUE)? 0: 1));
 #else
 #if _FILE_OFFSET_BITS == 64