Add an --si option to du(1) to display in terms of powers of 1000 rather
than powers of 1024
Details
- Reviewers
emaste cem - Group Reviewers
manpages - Commits
- rS322291: du(1): Add --si option to display in terms of powers of 1000
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
It looks ok to me. Ideally this matches some kind of existing convention. But if not, it's an ok convention to start, too.
usr.bin/du/du.c | ||
---|---|---|
499 ↗ | (On Diff #31245) | misindent? |
This and its df(1) brother-review follow a kind of convention from their GNU counterparts: df exposes -H/--si, du exposes --si
usr.bin/du/du.c | ||
---|---|---|
499 ↗ | (On Diff #31245) | Whoops, will fix in morning or before commit |
As a side effect, this change allows options and operands to be mixed in GNU style. Either this should be disabled by prepending "+" to the optstring or this should be mentioned in the commit message.
Thanks for that, I was unfortunately unaware of that detail. I haven't personally used getopt{,_long} all that much, and getopt_long(3) doesn't seem to discuss leading optstring possibilities other than to mention that a leading '+'/'-' are ignored with POSIXLY_CORRECT. =(
I have no intention of changing existing behavior here -- that's a discussion for a different day. =)
usr.bin/du/du.1 | ||
---|---|---|
31 ↗ | (On Diff #31743) | Don't forget to update .Dd before commit. |