Summary: | df's manpage covers block size env var wrong | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Drew Vogel <dvogel> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Drew Vogel
2005-03-08 16:35:43 UTC
you want to use `BLOCK_SIZE=human` I am guessing we should then either patch it to accept 'HUMAN' as well, or fix the manpage? the source code refers to "BLOCKSIZE" and "BLOCK_SIZE" in diff parts (in shared code too, not just df), so we should figure wtf the intended behavior is first :) but personally, i'd prefer we remove all 'BLOCKSIZE' references and have 'BLOCK_SIZE' work with case-insensitive 'human' ... I had a look, and it seems the only real interface point is lib/human.[ch] which looks at the environmental variable BLOCK_SIZE, and then the stuff that use it(df, du, ls) calls human_options() to check it. They also check DF_BLOCK_SIZE, DU_BLOCK_SIZE, etc, but that is also passed to human_options(). The other BLOCK_SIZE, *_BLOCK_SIZE seems to be internal to whatever tool, and totally unrelated to the output blocksize. Anyhow, I fixed it in -r5 - nothing major, just make it work with BLOCK_SIZE=HUMAN-READABLE (or a shorter version of that), as I do not think its really needed to do case insensitive checking (you do not expect 'df --HuMaN-ReaDaBLe' to work, now do you :)). Bleh, forgot to close. |