From nobody Tue Jan 30 17:22:38 2024 X-Original-To: dev-commits-src-main@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 4TPX6z4gRwz59CyM for ; Tue, 30 Jan 2024 17:22:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPX6z1ks7z4JfL for ; Tue, 30 Jan 2024 17:22:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2cf591d22dfso32397781fa.0 for ; Tue, 30 Jan 2024 09:22:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706635369; x=1707240169; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sJCFn75akw4a1jeawI+LAHWwdzPCpZ5L+wMucZUt4IM=; b=sNiRt9Rxyq+YxOydI/wuPL5BXJ4iibmIZEd4Tq4L7dp5Qsy/ZjA87TYbvBeZiKWO/u 5ojafgyUklbMevNH5YaFrWqL70vgr+LVhzxALCiNuIW2WgzsnXWNQmki4LIC7zQolHcj FivhDkwq4K8trDFybsuFxE02g1tb0epzk5XbNuswKiNAh7w14JAnBcfU3OfLf6Jz18Lm AowPHFCaqmG4LVKrhqn4GECXFqX7rPfCk1+tqAv4Rym/3AJbsWeP90BRrKAbaMGAlWG+ fEDjyuZF63XTeHdCI559c3tDnt2O2g5x1jMGau5ZxA2NPicdzjUi1Ixe7wAIsrPkyRw0 sPsA== X-Gm-Message-State: AOJu0YzpgHrygCcfhrec5YOqNrMPt53buvLI+/uxfY0SHtrkOGQ396ok Dl/moWgxro9XWX2SqkZlekohlSVSEzK0FrUmZaE0OEqrMvqOH2mAo/jxYoxqSRA= X-Google-Smtp-Source: AGHT+IFux3oIpaK35HV2m9kA6sLiJNh5ousJqM8y+1YuNi8a/+Mcod9hKmTquythn30AyF0psDPdbw== X-Received: by 2002:a19:f50a:0:b0:50e:a219:e05d with SMTP id j10-20020a19f50a000000b0050ea219e05dmr99077lfb.12.1706635369254; Tue, 30 Jan 2024 09:22:49 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id n16-20020adfe790000000b0033afed6e9desm537504wrm.98.2024.01.30.09.22.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2024 09:22:48 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: fae467c2212c - main - chflags(1): Fix -f option From: Jessica Clarke In-Reply-To: <202401301710.40UHASqJ091254@gitrepo.freebsd.org> Date: Tue, 30 Jan 2024 17:22:38 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <5623BA44-006D-4613-81E9-0B2AE22B48DF@freebsd.org> References: <202401301710.40UHASqJ091254@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TPX6z1ks7z4JfL X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 30 Jan 2024, at 17:10, Konstantin Belousov wrote: >=20 > The branch main has been updated by kib: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dfae467c2212ced8e82f5fa385d316445= c8874941 >=20 > commit fae467c2212ced8e82f5fa385d316445c8874941 > Author: Ricardo Branco > AuthorDate: 2024-01-29 22:17:47 +0000 > Commit: Konstantin Belousov > CommitDate: 2024-01-30 17:08:03 +0000 >=20 > chflags(1): Fix -f option >=20 > As stated in the man page, -f must not emit warning on error, and = must > not set the utility exit code. But that was already true of the code; this is not what the bug fix is. The problem was that it would print out the filename with -v (and flags change attempted with -vv) as if it succeeded, when it didn=E2=80=99t. But I=E2=80=99m also not entirely convinced this new code is right with = respect to SIGINFO, as it won=E2=80=99t print anything until it reaches a file = that doesn=E2=80=99t cause an error? I=E2=80=99d normally expect SIGINFO to = tell me exactly what it is doing or just did. Jess > 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(-) >=20 > 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 =3D=3D p->fts_statp->st_flags) > continue; > if (chflagsat(AT_FDCWD, p->fts_accpath, newflags, > - atflag) =3D=3D -1 && !fflag) { > - warn("%s", p->fts_path); > - rval =3D 1; > + atflag) =3D=3D -1) { > + if (!fflag) { > + warn("%s", p->fts_path); > + rval =3D 1; > + } > } else if (vflag || siginfo) { > (void)printf("%s", p->fts_path); > if (vflag > 1 || siginfo)