From nobody Fri Sep 6 21:14:49 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 4X0psM0mDhz5W0VX for ; Fri, 06 Sep 2024 21:15:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 4X0psL483Cz46R3 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-x636.google.com with SMTP id d9443c01a7336-20570b42f24so32718345ad.1 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=eQjdtsj6mS7wOJK0Rl76+iCx0YQqBzxltULl1h7cY9dnqGuROXXw8JFYGutwfU/Fqv MBKNoLha7NQm6FsI3m2c31Fq1tXeAZOhoFh3xdG56MjDyD8u+t2qW2hq8g9L0oVfCxRB eiRNPLSB+NgIjTlxe+D7+hy1mpdSQgZGJ5MhHPHVvlxk9nYpL/kotx3fHbVxh6SaL37z b7COaS6QFRr55648bHhIdhBnHAIDVVnUMF/0hZhofArNrXnYtiGs+/5Aa2/6JwLRp13x D8ME0FvbQpuJVRy9+cUnj/2cYO1iVyhlrxaiCnIcAIp7Z7OJjc3n09faxm5+aJVKDE+y RGRw== X-Forwarded-Encrypted: i=1; AJvYcCV9kG4VvdA7aeIfbArdg6B/TFgqxzqEMQb+wgNNfD0u9Asn3OIQ7m9OHQkmUN4pUu6tuY2QNia86ekEulLFFA+KwCZd@freebsd.org X-Gm-Message-State: AOJu0YzCJMzfOjpgyem0MMv35WDF1jdKh5c/xrgd++V2j0EByWp+e6BO PJXkL+NiXWAWdkOrJ6CsqamhuT8JqVacfat6O0XR7RQXlQXA5yoFqy1cYMC8vACSlC1au2btIdg XgWUogQLznMu+owsLQXceRvHFYcaEMFORh0paCQ== 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 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4X0psL483Cz46R3 --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--