Change formula from: "Used/Size * 100" to "Used/(Used + Avail) * 100".
This formula also works if "Used" and "Avail" do not add up to "Size",
which is the case if there are reserved disk blocks.
Previously, individual file sizes were used to compute the number width, which
would cause misalignment when the total has a greater number of digits, and is
different from the behavior of GNU wc
```
$ ./target/debug/wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
$ wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
```
"df --output ." was treated as "df --output=." and hence "." was
interpreted as a column name. With this commit, "." is treated as
an argument on its own.
Fixes#3324
Print a usage error when duplicat column names are specified to the
`--output` command-line argument. For example,
$ df --output=source,source
df: option --output: field ‘source’ used more than once
Try 'df --help' for more information.
Implement the "File" column in the `df` output table. Before this
commit, a blank entry appeared in the "File" column for each
row. After this commit, a "-" entry appears when `df` is run with no
positional arguments and the filename appears when run with positional
arguments. For example:
$ touch a b c && df --output=target,file a b c
Mounted on File
/ a
/ b
/ c
Remove the substitution of uutils `timeout` with GNU `timeout` before
running the GNU test suite. Some of these replacements were not
actually operational because the regex was not appropriate (for
example, the test file had `timeout 10` but the regex would only match
`timeout [0-9]`). Others no longer need to be used because the uutils
version of `timeout` works well enough now to terminate a process
within the given period of time.
Move the code for parsing the `ConversionMode` to use up to the
`parseargs` module. This location makes more sense for it because the
conversion mode can be determined entirely from the command-line
arguments at the time of parsing just like the other parameters. Using
an enum for this purpose also eliminates the amount of code we need
later on.
Replace a cascading `if/else if` chain in `conv_block_unblock_helper()`
with a match statement on a new enum, `ConversionMode`, that enumerates
the various modes in which `dd` can operate.