Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2024 00:39:20 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 19d960cedddd - stable/13 - chflags(1): Fix -f option
Message-ID:  <202402060039.4160dKLW071532@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=19d960cedddd08b59fe193190744a36602e7e8d5

commit 19d960cedddd08b59fe193190744a36602e7e8d5
Author:     Ricardo Branco <rbranco@suse.de>
AuthorDate: 2024-01-29 22:17:47 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-02-06 00:38:34 +0000

    chflags(1): Fix -f option
    
    PR:     276723
    
    (cherry picked from commit fae467c2212ced8e82f5fa385d316445c8874941)
---
 bin/chflags/chflags.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c
index 2532b4e230ef..81fb6708ae34 100644
--- a/bin/chflags/chflags.c
+++ b/bin/chflags/chflags.c
@@ -195,9 +195,11 @@ main(int argc, char *argv[])
 		if (newflags == p->fts_statp->st_flags)
 			continue;
 		if (chflagsat(AT_FDCWD, p->fts_accpath, newflags,
-		    atflag) == -1 && !fflag) {
-			warn("%s", p->fts_path);
-			rval = 1;
+		    atflag) == -1) {
+			if (!fflag) {
+				warn("%s", p->fts_path);
+				rval = 1;
+			}
 		} else if (vflag || siginfo) {
 			(void)printf("%s", p->fts_path);
 			if (vflag > 1 || siginfo)



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