mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
chflags(1): Fix -f option
As stated in the man page, -f must not emit warning on error, and must not set the utility exit code. PR: 276723 Github PR: https://github.com/freebsd/freebsd-src/pull/1088 Reviewed by: imp, kib MFC after: 1 week
This commit is contained in:
parent
6c892b79de
commit
fae467c221
|
@ -182,9 +182,11 @@ main(int argc, char *argv[])
|
||||||
if (newflags == p->fts_statp->st_flags)
|
if (newflags == p->fts_statp->st_flags)
|
||||||
continue;
|
continue;
|
||||||
if (chflagsat(AT_FDCWD, p->fts_accpath, newflags,
|
if (chflagsat(AT_FDCWD, p->fts_accpath, newflags,
|
||||||
atflag) == -1 && !fflag) {
|
atflag) == -1) {
|
||||||
warn("%s", p->fts_path);
|
if (!fflag) {
|
||||||
rval = 1;
|
warn("%s", p->fts_path);
|
||||||
|
rval = 1;
|
||||||
|
}
|
||||||
} else if (vflag || siginfo) {
|
} else if (vflag || siginfo) {
|
||||||
(void)printf("%s", p->fts_path);
|
(void)printf("%s", p->fts_path);
|
||||||
if (vflag > 1 || siginfo)
|
if (vflag > 1 || siginfo)
|
||||||
|
|
Loading…
Reference in a new issue