diff options
| author | Ankush Mondal <mondalankush9851@gmail.com> | 2025-11-29 11:15:30 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-01-09 20:17:12 +0000 |
| commit | 539547151678c63903dddda214b16b177cf418b8 (patch) | |
| tree | 60e2b3a9c36525435e42e6d417db07cecede0876 | |
| parent | 2727bdebb366c3741509eb3553f0fee2453729d3 (diff) | |
| -rw-r--r-- | bin/df/df.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index db5b8b18beae..12478d23a2ea 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -128,11 +128,12 @@ main(int argc, char *argv[]) /* * POSIX specifically discusses the behavior of * both -k and -P. It states that the blocksize should - * be set to 1024. Thus, if this occurs, simply break - * rather than clobbering the old blocksize. + * be set to 1024. */ - if (kflag) + if (kflag) { + setenv("BLOCKSIZE", "1024", 1); break; + } setenv("BLOCKSIZE", "512", 1); hflag = 0; break; @@ -154,7 +155,7 @@ main(int argc, char *argv[]) break; case 'k': kflag++; - setenv("BLOCKSIZE", "1024", 1); + setenv("BLOCKSIZE", "1k", 1); hflag = 0; break; case 'l': |
