From nobody Tue Jan 30 17:10:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPWrj0hKXz59C5R; Tue, 30 Jan 2024 17:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPWrh6pMvz4DZ0; Tue, 30 Jan 2024 17:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706634629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGZ/73TrLrilb0Uuzb/TUGFmTfrKZ0iaD0azgofIRMY=; b=DAccR8bLywZTzPqoidbOzvryKAR87hboRSQU3VRDCthcPikaeNTQaVgAsvndDkK2JuIYso cPjn1Iwf98hsOOFeCBOMBNBjr0M4Zm1jt2c150k6qzKTAM8lI254LfdmAUyFBQhs6lDOnn DXTi2jB0cNQibaZwj3t99ccRwjy9rDBNk2gCCyMC0Am/GihtJU7Q0oZyzGWfSg/trRlBhr x/nmG0PCec4bLVz9QBqEvgGnBCEyxjLhVY2Eu+dpPDjMLPdXYZG25m6bIzFs/gs5hwyNAG Canzfft0XdoqFqyZHVPOSVCadHqFLwIYuCU6URWRnNm/JJMjwcxxb4qT6mQnTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706634629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGZ/73TrLrilb0Uuzb/TUGFmTfrKZ0iaD0azgofIRMY=; b=YlmhrrJZdmEzlZgj7tjAuk91g5Fmh9SVxhKAKXVopfctqg0p4ERFZrxb8OMqDGf4pBOh+R NqQ0zNCPBPccoZQiik5EgwlJqeW6U0QhOjSurSSZuNapKJCj7Y25ht6ELmOtQHiwRKAMU/ e1Rtr4iMJlK1LRE60EPA1iP2aU9QUy0HR3AEF5h4s1OvwVdLIOC9NOOQSCkMRgVcWnlSgj rIGF6Ht/B0RaPYP1Q7aFcC6S0klscdScLslQTkL6lhgZc6ffWWCyBDdweCdDAD8hNM/1cO 4PVaz3XOwyUqAedaAUCTDc0vnydwudY8wEGgJW5LX13KMrmTB7RDn/Q3k0IhbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706634629; a=rsa-sha256; cv=none; b=Cca/yzReDNSjKhiSqeStu/X49eKCHxIBWv26aYMuVo9yaCxVve7GOHBp7IEn5Nmv0E/WZu +da/RU7UPhmi0R+68iOigpF7drfa8EQtzn7H6N3mp2dzU8r1uKq6I36oFTCFRqFstkzSY3 Ag7XhHeTzKkVYVYouNocv70ifkFHzvtQUlRCUZswrcPlsMX/ryFWA+ycnYhtp9NmsxAx2X uGvfCQHV8AOTRzGsItwSPLKO+FcN44o1Mu/bRinQ+J8J1DIxoptuxYvx37Xcg+sRReVpdD XonhnFMWBl4UYX1Qz+WvN0e/c9YNjYhdl5V6csUsv7KcSWCVjHEwKXsshTuS7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPWrh5lg1zkTf; Tue, 30 Jan 2024 17:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40UHASS0091257; Tue, 30 Jan 2024 17:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40UHASqJ091254; Tue, 30 Jan 2024 17:10:28 GMT (envelope-from git) Date: Tue, 30 Jan 2024 17:10:28 GMT Message-Id: <202401301710.40UHASqJ091254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fae467c2212c - main - chflags(1): Fix -f option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fae467c2212ced8e82f5fa385d316445c8874941 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fae467c2212ced8e82f5fa385d316445c8874941 commit fae467c2212ced8e82f5fa385d316445c8874941 Author: Ricardo Branco AuthorDate: 2024-01-29 22:17:47 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-30 17:08:03 +0000 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 --- 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 b92d5b6439f5..0972240558df 100644 --- a/bin/chflags/chflags.c +++ b/bin/chflags/chflags.c @@ -182,9 +182,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)