patch to fix disk usage numbers on FreeBSD
Doug Porter
dsp at dsp.name
Fri Dec 8 20:24:02 UTC 2006
> -P and -k are mutually exclusive:
[snip]
> So the correct patch should remove one or the other.
They're not really mutually exclusive, and both are required for
a portable solution. If one option is removed you'd have to
remove -k and change MogileFS to adjust. The -P is absolutely
essentially, because that is what asks for a predictable output
format.
Here is a quote from SUSv3 that describes -k and -P being
combined:
STDOUT
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"
It is also worth noting that FreeBSD df was recently modified to
better adhere to the specification. The commit message can be
seen here:
<http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/df/df.c?rev=1.66&content-type=text/x-cvsweb-markup>
The fact that the output for -k alone in FreeBSD is approximately
the POSIX format is irrelevant. Following the spec will make
MogileFS more generally portable.
--
Doug Porter <dsp at dsp.name>
More information about the mogilefs
mailing list