aboutsummaryrefslogtreecommitdiff
path: root/du.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-13 08:02:45 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-13 08:02:45 +0000
commit553460f253c025d4b1f319c1513c0259dc4b7934 (patch)
tree64925420925deb361a2024b9b362e5c987334124 /du.c
parent0206172be8940d86e81f52636d2dd9dbcd32388b (diff)
downloadbusybox-w32-553460f253c025d4b1f319c1513c0259dc4b7934.tar.gz
busybox-w32-553460f253c025d4b1f319c1513c0259dc4b7934.tar.bz2
busybox-w32-553460f253c025d4b1f319c1513c0259dc4b7934.zip
I reworked make_human_readable_str so it now has a sane interface,
and then fixed up df, du, and ls to use the new interface. I also fixed up some formatting issues in ls while I was in there. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2826 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'du.c')
-rw-r--r--du.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/du.c b/du.c
index fd19855e1..1966e3559 100644
--- a/du.c
+++ b/du.c
@@ -46,19 +46,8 @@ static Display *print;
46 46
47static void print_normal(long size, char *filename) 47static void print_normal(long size, char *filename)
48{ 48{
49 unsigned long base;
50#ifdef BB_FEATURE_HUMAN_READABLE 49#ifdef BB_FEATURE_HUMAN_READABLE
51 switch (disp_hr) { 50 printf("%s\t%s\n", make_human_readable_str(size<<10, 1, disp_hr), filename);
52 case MEGABYTE:
53 base = KILOBYTE;
54 break;
55 case KILOBYTE:
56 base = 1;
57 break;
58 default:
59 base = 0;
60 }
61 printf("%s\t%s\n", make_human_readable_str(size, base), filename);
62#else 51#else
63 printf("%ld\t%s\n", size, filename); 52 printf("%ld\t%s\n", size, filename);
64#endif 53#endif
@@ -259,7 +248,7 @@ int du_main(int argc, char **argv)
259 return status; 248 return status;
260} 249}
261 250
262/* $Id: du.c,v 1.48 2001/06/01 21:47:15 andersen Exp $ */ 251/* $Id: du.c,v 1.49 2001/06/13 08:02:44 andersen Exp $ */
263/* 252/*
264Local Variables: 253Local Variables:
265c-file-style: "linux" 254c-file-style: "linux"