aboutsummaryrefslogtreecommitdiff
path: root/coreutils/df.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/df.c')
-rw-r--r--coreutils/df.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index c569dae33..6ae3eed33 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -29,7 +29,7 @@
29#ifndef CONFIG_FEATURE_HUMAN_READABLE 29#ifndef CONFIG_FEATURE_HUMAN_READABLE
30static long kscale(long b, long bs) 30static long kscale(long b, long bs)
31{ 31{
32 return ( b * (long long) bs + KILOBYTE/2 ) / KILOBYTE; 32 return ( b * (long long) bs + 1024/2 ) / 1024;
33} 33}
34#endif 34#endif
35 35
@@ -38,7 +38,7 @@ int df_main(int argc, char **argv)
38 long blocks_used; 38 long blocks_used;
39 long blocks_percent_used; 39 long blocks_percent_used;
40#ifdef CONFIG_FEATURE_HUMAN_READABLE 40#ifdef CONFIG_FEATURE_HUMAN_READABLE
41 unsigned long df_disp_hr = KILOBYTE; 41 unsigned long df_disp_hr = 1024;
42#endif 42#endif
43 int status = EXIT_SUCCESS; 43 int status = EXIT_SUCCESS;
44 unsigned opt; 44 unsigned opt;
@@ -56,7 +56,7 @@ int df_main(int argc, char **argv)
56 disp_units_hdr = " Size"; 56 disp_units_hdr = " Size";
57 } 57 }
58 if (opt & 2) { 58 if (opt & 2) {
59 df_disp_hr = MEGABYTE; 59 df_disp_hr = 1024*1024;
60 disp_units_hdr = "1M-blocks"; 60 disp_units_hdr = "1M-blocks";
61 } 61 }
62#else 62#else