From nobody Tue Jan 30 18:13:51 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 4TPYG64K51z59JBP for ; Tue, 30 Jan 2024 18:14:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 4TPYG62Wpjz4Qvb for ; Tue, 30 Jan 2024 18:14:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-68c41c070efso576926d6.0 for ; Tue, 30 Jan 2024 10:14:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706638445; x=1707243245; 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=Cek+MWrWZ1WMhYiTawM9ynCGl02K0Il+RuR3K4VGfnU=; b=DajllnWtdlHhARy2FDTiuGRgKiOC7+1X9qC8dCC8lQJMp2hjKfhZGESw20SqS/DVjr 7KRxqWWo8yxAZFDS0ZbaW3uH2+N3ba4f5nFDxdHLLTY6abB6fyQzgLspTWp89RuIaSAM nNW+yr8Bqbc0IiHo4q7mG+EAv4EqR/lz9brp3g6+EXbmt2VpR4+FF9iUMD6+YTI7DdLo NlGSB3Ia3NUC128Rhorz/RrLHiZfBrS8x+F0UAUbLUrAyer7Hx0NlsPZjFRv+ZEXOj0i IlpIO341t4muxlOJn/9pRiEI9x+2nF3F04/9IaUFb4A+tvirLrGp2zd/chSMWQwkO2Jp jT+Q== X-Gm-Message-State: AOJu0YypzDugxPIiWcplT59IWF7YIAGVSZ/Fd2Ftj7h1474Oe0iL0dvw ZGXOfTjgnQhQ9lKUVx17cB+LG61UdaP05FAZaJqO1Ds++gOu2G2sBe1YO9Y6aTc= X-Google-Smtp-Source: AGHT+IGzJ7W5Nsme2XeloyD59RCU0zdXpL/DLf1pU2YNUIVXwJV4ddzntdS+rhpl9cvAQ7mpZ/CsOQ== X-Received: by 2002:a0c:f2cf:0:b0:68c:46ee:de71 with SMTP id c15-20020a0cf2cf000000b0068c46eede71mr2574045qvm.1.1706638445205; Tue, 30 Jan 2024 10:14:05 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id mb7-20020a056214550700b0068602f8966esm2827635qvb.111.2024.01.30.10.14.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2024 10:14:04 -0800 (PST) Content-Type: text/plain; charset=utf-8 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 (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: Date: Tue, 30 Jan 2024 18:13:51 +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: References: <202401301710.40UHASqJ091254@gitrepo.freebsd.org> <5623BA44-006D-4613-81E9-0B2AE22B48DF@freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TPYG62Wpjz4Qvb 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 18:12, Konstantin Belousov = wrote: >=20 > On Tue, Jan 30, 2024 at 05:22:38PM +0000, Jessica Clarke wrote: >> 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. >>=20 >> 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. > Right, sorry it slipped. >=20 >>=20 >> 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. >=20 > This should fix siginfo. >=20 > commit 57658578cf42fc9b6e8906a05b9effcd03a437a1 > Author: Konstantin Belousov > Date: Tue Jan 30 20:07:59 2024 +0200 >=20 > chflags(1): obey siginfo request on chflagsat(2) failure >=20 > Noted by: jrtc27 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week >=20 > diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c > index 0972240558df..13a327d9426c 100644 > --- a/bin/chflags/chflags.c > +++ b/bin/chflags/chflags.c > @@ -183,10 +183,12 @@ main(int argc, char *argv[]) > continue; > if (chflagsat(AT_FDCWD, p->fts_accpath, newflags, > atflag) =3D=3D -1) { > - if (!fflag) { > + if (!fflag || siginfo) { > warn("%s", p->fts_path); warn goes to stderr, it really does need to be a separate printf. Jess > - rval =3D 1; > + siginfo =3D 0; > } > + if (!fflag) > + rval =3D 1; > } else if (vflag || siginfo) { > (void)printf("%s", p->fts_path); > if (vflag > 1 || siginfo)