+2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
+ * NEWS: With -P, the default block size and output format is not
+ affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
+ * src/df.c (main): Implement this.
+
2007-02-25 Jim Meyering <jim@meyering.net>
* Makefile.maint (announcement): Adjust so that it works with
* Noteworthy changes in release 6.8+ (????-??-??) [not-unstable]
+** Bug fixes
+
+ The default block size and output format for df -P are now unaffected by
+ the DF_BLOCK_SIZE, BLOCK_SIZE, and BLOCKSIZE environment variables. It
+ is still affected by POSIXLY_CORRECT, though.
* Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
+2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * coreutils.texi (df invocation): With -P, the default block size
+ and output format is not affected by DF_BLOCK_SIZE, BLOCK_SIZE, or
+ BLOCKSIZE.
+
2007-01-30 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi
@item
The labels in the header output line are changed to conform to @acronym{POSIX}.
+
+@item
+The default block size and output format are unaffected by the
+@env{DF_BLOCK_SIZE}, @env{BLOCK_SIZE} and @env{BLOCKSIZE} environment
+variables. However, the default block size is still affected by
+@env{POSIXLY_CORRECT}: it is 512 if @env{POSIXLY_CORRECT} is set, 1024
+otherwise. @xref{Block size}.
@end enumerate
@optSi
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;
}
}
+ 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;