Torkel BjÃrnson <[EMAIL PROTECTED]> writes: > $ setenv BLOCK_SIZE human-readable > $ df --portability / > Filesystem Size Used Avail Use% Mounted on > /dev/sda1 177M 111M 57M 66% / > > I think the last output is wrong. Since I request an output > format in compability/POSIX mode, it should ignore the > BLOCK_SIZE environment variable and display the blocksize > in whatever blocksize POSIX define.
It is not a POSIX conformance bug, as the POSIX standard reserves all environment variables like BLOCK_SIZE (see the 4th paragraph of <http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html>). Implementations are allowed to place constraints on the values of such variables for users who want conforming behavior. That is why it is OK for df to insist on POSIXLY_CORRECT for full conformance. So this is not a standards-conformance issue. It may desirable to change the behavior here, but I'd like to know more about the context first. > Shouldn't the semantic be that when POSIXLY_CORRECT is set, this should > override conflicting switches No, POSIXLY_CORRECT merely causes "df" to conform to POSIX, typically with the minimum changes to behavior. For example, if the user specifies both POSIXLY_CORRECT=1 and BLOCK_SIZE=human-readable, "df" is allowed to have the latter override the former, because BLOCK_SIZE is reserved to the implementation. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
