public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biggers <ebiggers@google.com>,
	Eric Biggers <ebiggers@kernel.org>,
	Mimi Zohar <zohar@linux.ibm.com>,
	Vitaly Chikunov <vt@altlinux.org>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Pascal van Leeuwen <pvanleeuwen@rambus.com>,
	James Morris <jmorris@namei.org>,
	James Morris <jamorris@linux.microsoft.com>,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sign-file: Fix confusing error messages
Date: Sun, 26 Jun 2022 09:14:57 +0300	[thread overview]
Message-ID: <Yrf5YU1IktrMBdLx@kernel.org> (raw)
In-Reply-To: <eb589e46-f46f-689d-72bc-1ce552cb5313@linux.alibaba.com>

On Fri, Jun 17, 2022 at 05:24:55PM +0800, Tianjia Zhang wrote:
> Hi Jarkko,
> 
> On 6/24/21 6:48 PM, Tianjia Zhang wrote:
> > When an error occurs, use errx() instead of err() to display the
> > error message, because openssl has its own error record. When an
> > error occurs, errno will not be changed, while err() displays the
> > errno error message. It will cause confusion. For example, when
> > CMS_add1_signer() fails, the following message will appear:
> > 
> >    sign-file: CMS_add1_signer: Success
> > 
> > errx() ignores errno and does not cause such issue.
> > 
> > Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> > ---
> >   scripts/sign-file.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/sign-file.c b/scripts/sign-file.c
> > index fbd34b8e8f57..37d8760cb0d1 100644
> > --- a/scripts/sign-file.c
> > +++ b/scripts/sign-file.c
> > @@ -107,7 +107,7 @@ static void drain_openssl_errors(void)
> >   		bool __cond = (cond);			\
> >   		display_openssl_errors(__LINE__);	\
> >   		if (__cond) {				\
> > -			err(1, fmt, ## __VA_ARGS__);	\
> > +			errx(1, fmt, ## __VA_ARGS__);	\
> >   		}					\
> >   	} while(0)
> 
> Likewise, No response from David, can you pick this? thanks.
> 
> Best regards,
> Tianjia

Ditto.

BR, Jarkko

      reply	other threads:[~2022-06-26  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 10:48 [PATCH v2] sign-file: Fix confusing error messages Tianjia Zhang
2021-09-18  2:25 ` Tianjia Zhang
2022-06-17  9:24 ` Tianjia Zhang
2022-06-26  6:14   ` Jarkko Sakkinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yrf5YU1IktrMBdLx@kernel.org \
    --to=jarkko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=ebiggers@google.com \
    --cc=ebiggers@kernel.org \
    --cc=gilad@benyossef.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jamorris@linux.microsoft.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pvanleeuwen@rambus.com \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=vt@altlinux.org \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox