Re: [PATCH] df: correct BLOCKSIZE handling for -k to use 1K-blocks (290710)
Date: Mon, 24 Nov 2025 16:03:06 UTC
I think this is the wrong direction of the fix. POSIX-2023 states: STDOUT When both the *-k* and *-P* options are specified, the following header line will be written (in the POSIX locale): "Filesystem 1024-blocks Used Available Capacity Mounted on\n" and so this goes from the recommended form to a non-conformant form. While the implementation is free to use 1k instead of 1024 when -P is not specified, I think this change will break that. Also, we generally don't do code reviews in hackers@. Your best bet is likely a github pull request. I'll keep my eyes open there. Warner On Mon, Nov 24, 2025 at 5:38 AM Ankush Mondal <ankushmondal1y2t@gmail.com> wrote: > This patch fixes the inconsistency in df -k header formatting described > in Bug 290710 > <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290710#c0>. > > Before : > root@bsd:~ # df -k > Filesystem 1024-blocks Used Avail Capacity Mounted > on > zroot/ROOT/default 65618056 4716712 60901344 7% / > > After : > root@bsd:~ # df -k > Filesystem 1K-blocks Used Avail Capacity Mounted on > zroot/ROOT/default 65618056 4716712 60901344 7% / >