aboutsummaryrefslogtreecommitdiff
path: root/coreutils/df.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--coreutils/df.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index c87c07ee4..01c41db38 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -169,6 +169,9 @@ int df_main(int argc UNUSED_PARAM, char **argv)
169 , &opt_t 169 , &opt_t
170 IF_FEATURE_DF_FANCY(, &chp) 170 IF_FEATURE_DF_FANCY(, &chp)
171 ); 171 );
172 /* -k overrides $POSIXLY_CORRECT: */
173 if (opt & OPT_KILO)
174 df_disp_hr = 1024;
172 if (opt & OPT_MEGA) 175 if (opt & OPT_MEGA)
173 df_disp_hr = 1024*1024; 176 df_disp_hr = 1024*1024;
174 177
@@ -199,8 +202,8 @@ int df_main(int argc UNUSED_PARAM, char **argv)
199 if (disp_units_hdr == NULL) { 202 if (disp_units_hdr == NULL) {
200#if ENABLE_FEATURE_HUMAN_READABLE 203#if ENABLE_FEATURE_HUMAN_READABLE
201 disp_units_hdr = xasprintf("%s-blocks", 204 disp_units_hdr = xasprintf("%s-blocks",
202 /* print df_disp_hr, show no fractionals, 205 /* print df_disp_hr; show no fractionals;
203 * use suffixes if OPT_POSIX is set in opt */ 206 * if -P, unit=1 (print it in full, no KMG suffixes) */
204 make_human_readable_str(df_disp_hr, 0, !!(opt & OPT_POSIX)) 207 make_human_readable_str(df_disp_hr, 0, !!(opt & OPT_POSIX))
205 ); 208 );
206#else 209#else