diff options
author | Eric Andersen | 2001-04-03 23:14:29 +0000 |
---|---|---|
committer | Eric Andersen | 2001-04-03 23:14:29 +0000 |
commit | 91c9388715182a71173f2da71d74173221460412 (patch) | |
tree | 93fed8e5cfa179b95e937f5a754a3ba1a9587422 /ls.c | |
parent | 24073c76658b93172df8a7a397b84c91a789008a (diff) | |
download | busybox-91c9388715182a71173f2da71d74173221460412.zip busybox-91c9388715182a71173f2da71d74173221460412.tar.gz |
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 'ls.c')
-rw-r--r-- | ls.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -648,15 +648,18 @@ 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>>10, - (ls_disp_hr==TRUE)? 0: 1)); -#else + if (ls_disp_hr==TRUE) { + fprintf(stdout, "%9s ", make_human_readable_str( + dn->dstat.st_size>>10, 0)); + } else +#endif + { #if _FILE_OFFSET_BITS == 64 - printf("%9lld ", dn->dstat.st_size); + printf("%9lld ", dn->dstat.st_size); #else - printf("%9ld ", dn->dstat.st_size); -#endif + printf("%9ld ", dn->dstat.st_size); #endif + } } column += 10; break; |