Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2025 19:54:09 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 5ea5220d1788 - stable/14 - du: Fix threshold on non-directory files
Message-ID:  <202506011954.551Js9Qt046323@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ea5220d17881015df67e4f182e337bd269b9f34

commit 5ea5220d17881015df67e4f182e337bd269b9f34
Author:     Michal Scigocki <michal.os@hotmail.com>
AuthorDate: 2025-04-07 11:14:44 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-06-01 19:53:29 +0000

    du: Fix threshold on non-directory files
    
    PR:             265200
    Reviewed by:    markj
    MFC after:      1 month
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1648
    
    (cherry picked from commit 0ae2b9e866d3aea1e9141841488561f12603f879)
---
 usr.bin/du/du.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index ead3e952ce0f..90b95b3d86e9 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -320,7 +320,9 @@ main(int argc, char *argv[])
 			    howmany(p->fts_statp->st_size, cblocksize) :
 			    howmany(p->fts_statp->st_blocks, cblocksize);
 
-			if (aflag || p->fts_level == 0) {
+			if ((aflag || p->fts_level == 0) && threshold <=
+			    threshold_sign * howmany(curblocks * cblocksize,
+			    blocksize)) {
 				if (hflag > 0) {
 					prthumanval(curblocks);
 					(void)printf("\t%s\n", p->fts_path);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506011954.551Js9Qt046323>