summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/df.c b/src/df.c
index 8bc4a84c9..609787eea 100644
--- a/src/df.c
+++ b/src/df.c
@@ -796,10 +796,7 @@ main (int argc, char **argv)
inode_format = false;
show_all_fs = false;
show_listed_fs = false;
-
- human_output_opts = human_options (getenv ("DF_BLOCK_SIZE"), false,
- &output_block_size);
-
+ human_output_opts = -1;
print_type = false;
file_systems_processed = false;
posix_format = false;
@@ -876,6 +873,18 @@ main (int argc, char **argv)
}
}
+ if (human_output_opts == -1)
+ {
+ if (posix_format)
+ {
+ human_output_opts = 0;
+ output_block_size = (getenv ("POSIXLY_CORRECT") ? 512 : 1024);
+ }
+ else
+ human_output_opts = human_options (getenv ("DF_BLOCK_SIZE"), false,
+ &output_block_size);
+ }
+
/* Fail if the same file system type was both selected and excluded. */
{
bool match = false;