aboutsummaryrefslogtreecommitdiff
path: root/coreutils/df.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/df.c')
-rw-r--r--coreutils/df.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index 03aa78148..fba23246f 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -155,6 +155,9 @@ int df_main(int argc UNUSED_PARAM, char **argv)
155 , &opt_t 155 , &opt_t
156 IF_FEATURE_DF_FANCY(, &chp) 156 IF_FEATURE_DF_FANCY(, &chp)
157 ); 157 );
158 /* -k overrides $POSIXLY_CORRECT: */
159 if (opt & OPT_KILO)
160 df_disp_hr = 1024;
158 if (opt & OPT_MEGA) 161 if (opt & OPT_MEGA)
159 df_disp_hr = 1024*1024; 162 df_disp_hr = 1024*1024;
160 163
@@ -185,8 +188,8 @@ int df_main(int argc UNUSED_PARAM, char **argv)
185 if (disp_units_hdr == NULL) { 188 if (disp_units_hdr == NULL) {
186#if ENABLE_FEATURE_HUMAN_READABLE 189#if ENABLE_FEATURE_HUMAN_READABLE
187 disp_units_hdr = xasprintf("%s-blocks", 190 disp_units_hdr = xasprintf("%s-blocks",
188 /* print df_disp_hr, show no fractionals, 191 /* print df_disp_hr; show no fractionals;
189 * use suffixes if OPT_POSIX is set in opt */ 192 * if -P, unit=1 (print it in full, no KMG suffixes) */
190 make_human_readable_str(df_disp_hr, 0, !!(opt & OPT_POSIX)) 193 make_human_readable_str(df_disp_hr, 0, !!(opt & OPT_POSIX))
191 ); 194 );
192#else 195#else