From nobody Fri Sep 06 21:14:49 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 4X0psL5Fdjz5W0Q9 for ; Fri, 06 Sep 2024 21:15:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0psL3NVDz46G5 for ; Fri, 6 Sep 2024 21:15:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2054e22ce3fso24499995ad.2 for ; Fri, 06 Sep 2024 14:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1725657301; x=1726262101; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HzIzFTq9mDk4msVPgceO6acp7BBqMvQFAOj2TI3rMm0=; b=TWPd0OjnaczrjLuae4AMRU4kBkDiGI5kv9Gtapdvz1bl0Kpp1PdPvbyVw2K//lrlLA Gf+uFyelbjWPXaVwk2oUuzOeo0jkBH4h3uIxCyQaIZq2S1X1U8qWTqioH1ex9m7nNMuJ ef3q5r35fAnsdvctZyekVg8HTzChVZiMkFmMInK7WhLJlKyJQDZ6sfQcDldBWkO/lpCT NHibZWLPkXlXRVHOpD+ofQuQaOMeEc0O6SxJ+/H/SIZefY7pY7wrbvqZQ5w0RO8jWKy5 NtYrq+vdnYNk/QeXlWTdooeW+Cbm8LbfWpu4trXGi6Bl4IXUjMDYpSfNJZu0n9Iq7GZo Ha5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725657301; x=1726262101; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HzIzFTq9mDk4msVPgceO6acp7BBqMvQFAOj2TI3rMm0=; b=EyLX1i/k4YPEIr/Qpyuia8/Dg91e0bm8z0W52OUNHs/2iH74uoolJhmvJes6j62G/T 123spYDOj3Torf2JI84WX6FamqKjyvwIpyeWgOpNWDyquc7YwSiIVT3s/mjAE8wWn7qj FYYavoSwI/OwtoWaVcjz8aV9HQVF5qaPfOSohIW77cUgfXMc0qRR1ldgXWyQL9GXt8PO NxvZ1ZpbI/VyZIjJJK71NeRcpqUzhSXI6y4Bb6PzaTEKBX5yOvSOoJyfd5+ScgXpbG/E aWQ8ieC4ALTwu7ihwLwWChlb35hoNsChDINbK8EtgzvzUONBTDK+pEo8l6IXVypcU30v EwXA== X-Forwarded-Encrypted: i=1; AJvYcCWRDFYRk23YpNJUtMgbTNXWxaYXnMRcfSqYTgyGBoZy3QVhVa2RotMycrl1KthcPZx2DDJPoEAxuOnEksfw/3eSro1KYg==@freebsd.org X-Gm-Message-State: AOJu0YxmG5RooOGk0ye8+5y7dmzv7zj9vC0raIjupaAN+URD/Gkd1unw JQiLs0PoxDIRTBEXghX5cnlhCHyRi/L1R9dERJeEskE63BpO/CURlwLpNyHM4M0eTiUk2f9AYlS ZY7MuahXHb0fJg/KwqFyLgD2SUa4e6SHUBty0bA== X-Google-Smtp-Source: AGHT+IFUiiYiCI0xQiZJqVT65qJSjrYo4TD99r6QWO2KbKHq3W6i/wFkkHuOSRStiYFwyPTNkWdwOe5F3oXq+v71Ih0= X-Received: by 2002:a17:90a:f493:b0:2da:5edd:c165 with SMTP id 98e67ed59e1d1-2dad50e8866mr4731925a91.30.1725657301017; Fri, 06 Sep 2024 14:15:01 -0700 (PDT) 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202409061835.486IZ9Fd010541@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 6 Sep 2024 15:14:49 -0600 Message-ID: Subject: Re: git: 07d90ee0a621 - main - kvprintf(): Fix '+' conversion handling To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000006e8382062179e610" 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:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4X0psL3NVDz46G5 --0000000000006e8382062179e610 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 6, 2024 at 2:53=E2=80=AFPM Konstantin Belousov wrote: > On Fri, Sep 06, 2024 at 06:35:09PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D07d90ee0a62110e5161bb0b8a3a0b1b= 9d2beabad > > > > commit 07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad > > Author: Sebastian Huber > > AuthorDate: 2024-06-14 07:30:28 +0000 > > Commit: Warner Losh > > CommitDate: 2024-09-06 18:34:30 +0000 > > > > kvprintf(): Fix '+' conversion handling > > > > For example, printf("%+i", 1) prints "+1". However, kvprintf() did > > print just "1" for this example. According to PRINTF(3): > > > > A sign must always be placed before a number produced by a signed > > conversion. > > > > For "%+r" radix conversions, keep the "+" handling as it is, since > this > > is a non-standard conversion. For "%+p" pointer conversions, > continue > > to ignore the sign modifier to be in line with libc. > > > > This change allows to support the ' conversion modifier in the > future. > > > > Reviewed by: imp > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1310 > > --- > > sys/kern/subr_prf.c | 27 +++++++++++++-------------- > > 1 file changed, 13 insertions(+), 14 deletions(-) > Again, isn't rtld_printf needs the same change? > This time I don't think so. I'll double check though. I'd checked when this came in. Thanks for the reminder. --0000000000006e8382062179e610 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Sep 6, 2024 at 2:53=E2=80=AFP= M Konstantin Belousov <kostikbel@= gmail.com> wrote:
On Fri, Sep 06, 2024 at 06:35:09PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad<= /a>
>
> commit 07d90ee0a62110e5161bb0b8a3a0b1b9d2beabad
> Author:=C2=A0 =C2=A0 =C2=A0Sebastian Huber <
sebastian.huber@embedded-b= rains.de>
> AuthorDate: 2024-06-14 07:30:28 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-09-06 18:34:30 +0000
>
>=C2=A0 =C2=A0 =C2=A0kvprintf(): Fix '+' conversion handling
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0For example, printf("%+i", 1) prints &quo= t;+1".=C2=A0 However, kvprintf() did
>=C2=A0 =C2=A0 =C2=A0print just "1" for this example.=C2=A0 Ac= cording to PRINTF(3):
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0A sign must always be placed before a number= produced by a signed
>=C2=A0 =C2=A0 =C2=A0 =C2=A0conversion.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0For "%+r" radix conversions, keep the &qu= ot;+" handling as it is, since this
>=C2=A0 =C2=A0 =C2=A0is a non-standard conversion.=C2=A0 For "%+p&q= uot; pointer conversions, continue
>=C2=A0 =C2=A0 =C2=A0to ignore the sign modifier to be in line with libc= .
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0This change allows to support the ' conversion = modifier in the future.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0Pull Request: https://github= .com/freebsd/freebsd-src/pull/1310
> ---
>=C2=A0 sys/kern/subr_prf.c | 27 +++++++++++++--------------
>=C2=A0 1 file changed, 13 insertions(+), 14 deletions(-)
Again, isn't rtld_printf needs the same change?
This time I don't think so. I'll double check though. = I'd checked when this came in. Thanks for the reminder.=C2=A0
--0000000000006e8382062179e610--