Page MenuHomeFreeBSD

df: Fix the header when using the -P option
Needs ReviewPublic

Authored by jlduran on Wed, Dec 17, 4:52 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When both the -k and -P options are specified, the following header line
shall be written (in the POSIX locale):

"Filesystem 1024-blocks Used Available Capacity Mounted on\n"

When the -P option is specified without the -k option, the following
header line shall be written (in the POSIX locale):

"Filesystem 512-blocks Used Available Capacity Mounted on\n"

https://pubs.opengroup.org/onlinepubs/9799919799/utilities/df.html

Spell out "Available" in the header only when using the Portability
(POSIX) "-P" option.

Test Plan
$ kyua test
df_test:Pflag  ->  passed  [0.016s]
df_test:kPflags  ->  passed  [0.011s]
t_df:hflag  ->  passed  [0.009s]
t_df:normal  ->  passed  [0.008s]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69326
Build 66209: arc lint + arc unit