freebsd-src/bin
Ankush Mondal 5395471516 df: Fix -k flag consistency with other BLOCKSIZE flags
This patch resolves inconsistent behavior between the -k option and
other related flags, including -P. Previously, using -k resulted in
output displayed in 1024-byte blocks, which did not align with the
behavior of similar options such as -m and -g, where output is shown in
1M-blocks and 1G-blocks respectively.

The updated implementation ensures that -k now correctly displays sizes
in 1K-blocks. In addition, the patch incorporates the POSIX requirement
that when both -k -P are specified, the block size must be explicitly
forced to 1024-blocks.

Together, these changes make the behavior of -k consistent, predictable,
and compliant with the standard.

Signed-off-by: Ankush Mondal <mondalankush9851@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1906
2026-01-09 13:17:12 -07:00
..
cat bin/cat: add test for reading data from stdin 2025-06-13 08:25:54 -06:00
chflags Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chmod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cp cp: Fix copying the root directory 2025-11-22 13:11:59 +01:00
cpuset libutil: Move cpuset(1) domain policy parsing code into libutil 2025-07-27 18:31:48 +02:00
csh csh: Remove gethost dependency on tc.const.h 2025-02-08 19:30:55 -05:00
date date: Improve nanosecond support 2025-11-11 15:58:35 +01:00
dd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
df df: Fix -k flag consistency with other BLOCKSIZE flags 2026-01-09 13:17:12 -07:00
domainname Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
echo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ed Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
expr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
freebsd-version Fix grammar in freebsd-version(1) 2025-08-27 14:31:01 +00:00
getfacl getfacl: implement --skip-base (-s) 2025-04-20 22:57:45 -05:00
hostname tests: Switch bin/hostname/hostname_test to execenv=jail 2024-10-31 17:44:49 +00:00
kenv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
kill kill: Fix support for kill -0 2025-06-20 22:24:10 +00:00
ln ln: Simplify sameness checks 2025-10-07 18:23:58 +02:00
ls ls: --group-directories requires stat information 2025-01-22 08:29:29 +01:00
mkdir Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mv mv: Add test cases for command-line options. 2024-11-19 10:29:15 +01:00
nproc Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pax pax: Clear arcn in each read function. 2024-07-24 22:07:06 +02:00
pkill pkill: better document ancestor-hiding 2025-06-24 09:49:31 -05:00
ps ps(1): Sort headers 2026-01-09 17:34:51 +01:00
pwait pwait: Add an option to print remaining processes 2025-10-28 12:57:16 +01:00
pwd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
realpath Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rm rm(1): remove whiteouts when forcibly removing directories 2025-11-08 21:47:15 -06:00
rmail Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rmdir manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
setfacl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sh sh.1: Restore missing builtin commands 2026-01-06 12:31:32 -05:00
sleep Update Makefile.depend files 2024-10-14 10:26:17 -07:00
stty Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sync Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
test sh: avoid warnings about too-long initializer strings 2025-12-27 22:58:25 +01:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
timeout timeout(1): add license header to unit test 2025-09-03 11:52:46 +02:00
uuidgen uuidgen.1: Correct SYNOPSIS, alphabetize options 2025-08-27 12:17:42 -04:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00