diff options
author | Ricardo Branco <rbranco@suse.de> | 2024-01-29 22:17:47 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2024-02-06 00:38:34 +0000 |
commit | 19d960cedddd08b59fe193190744a36602e7e8d5 (patch) | |
tree | 95db6274903d6257a94ff7af91b3b23795764f17 | |
parent | 7393d37b12249aa26b0336136790cbcb33b690c2 (diff) | |
download | src-19d960cedddd08b59fe193190744a36602e7e8d5.tar.gz src-19d960cedddd08b59fe193190744a36602e7e8d5.zip |
chflags(1): Fix -f option
PR: 276723
(cherry picked from commit fae467c2212ced8e82f5fa385d316445c8874941)
-rw-r--r-- | bin/chflags/chflags.c | 8 |
1 files 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) |