summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-03 23:14:29 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-03 23:14:29 +0000
commit91c9388715182a71173f2da71d74173221460412 (patch)
tree93fed8e5cfa179b95e937f5a754a3ba1a9587422 /coreutils
parent24073c76658b93172df8a7a397b84c91a789008a (diff)
downloadbusybox-w32-91c9388715182a71173f2da71d74173221460412.tar.gz
busybox-w32-91c9388715182a71173f2da71d74173221460412.tar.bz2
busybox-w32-91c9388715182a71173f2da71d74173221460412.zip
Place a temporary bandaid on the ls/du/df human-readable issue. This method is
not going to scale up as well as I would like, and Matt Kraai and I have discussed a better long term solution. But for now this will at least make all the human-readable apps give correct answers. Please test the human readable/non-human readable options on your systems!!! -Erik
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/ls.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 86691fdaf..49470e9f7 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -648,15 +648,18 @@ static int list_single(struct dnode *dn)
648 printf("%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev)); 648 printf("%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev));
649 } else { 649 } else {
650#ifdef BB_FEATURE_HUMAN_READABLE 650#ifdef BB_FEATURE_HUMAN_READABLE
651 fprintf(stdout, "%9s ", make_human_readable_str(dn->dstat.st_size>>10, 651 if (ls_disp_hr==TRUE) {
652 (ls_disp_hr==TRUE)? 0: 1)); 652 fprintf(stdout, "%9s ", make_human_readable_str(
653#else 653 dn->dstat.st_size>>10, 0));
654 } else
655#endif
656 {
654#if _FILE_OFFSET_BITS == 64 657#if _FILE_OFFSET_BITS == 64
655 printf("%9lld ", dn->dstat.st_size); 658 printf("%9lld ", dn->dstat.st_size);
656#else 659#else
657 printf("%9ld ", dn->dstat.st_size); 660 printf("%9ld ", dn->dstat.st_size);
658#endif
659#endif 661#endif
662 }
660 } 663 }
661 column += 10; 664 column += 10;
662 break; 665 break;