diff mbox series

[v2,1/2] tools: mkimage: don't print error message "Success" in case of failure

Message ID 20221031145121.236877-2-mkl@pengutronix.de
State Superseded
Delegated to: Tom Rini
Headers show
Series tools: mkimage: cleanups + allow to create legacy image with type flat_dt | expand

Commit Message

Marc Kleine-Budde Oct. 31, 2022, 2:51 p.m. UTC
In case there's no struct image_type_params::set_header callback, no
"errno" will be set. Don't fail with an error message, followed by
"Success". Remove the printing of the human readable "errno" value.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 tools/mkimage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass Oct. 31, 2022, 7:27 p.m. UTC | #1
On Mon, 31 Oct 2022 at 08:51, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> In case there's no struct image_type_params::set_header callback, no
> "errno" will be set. Don't fail with an error message, followed by
> "Success". Remove the printing of the human readable "errno" value.
>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  tools/mkimage.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Marc Kleine-Budde Nov. 16, 2022, 10:42 a.m. UTC | #2
On 31.10.2022 13:27:10, Simon Glass wrote:
> On Mon, 31 Oct 2022 at 08:51, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> >
> > In case there's no struct image_type_params::set_header callback, no
> > "errno" will be set. Don't fail with an error message, followed by
> > "Success". Remove the printing of the human readable "errno" value.
> >
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > ---
> >  tools/mkimage.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>

Has this patch already been applied?

regards,
Marc
Simon Glass Nov. 16, 2022, 11:51 p.m. UTC | #3
+Tom Rini

Hi Marc,

On Wed, 16 Nov 2022 at 03:42, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> On 31.10.2022 13:27:10, Simon Glass wrote:
> > On Mon, 31 Oct 2022 at 08:51, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> > >
> > > In case there's no struct image_type_params::set_header callback, no
> > > "errno" will be set. Don't fail with an error message, followed by
> > > "Success". Remove the printing of the human readable "errno" value.
> > >
> > > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > > ---
> > >  tools/mkimage.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Has this patch already been applied?

No, you can see the status here:

https://patchwork.ozlabs.org/project/uboot/patch/20221031145121.236877-2-mkl@pengutronix.de/

Regards,
SImon
diff mbox series

Patch

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 30c6df77081f..35a6b1fb799c 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -760,8 +760,8 @@  int main(int argc, char **argv)
 	if (tparams->set_header)
 		tparams->set_header (ptr, &sbuf, ifd, &params);
 	else {
-		fprintf (stderr, "%s: Can't set header for %s: %s\n",
-			params.cmdname, tparams->name, strerror(errno));
+		fprintf (stderr, "%s: Can't set header for %s\n",
+			params.cmdname, tparams->name);
 		exit (EXIT_FAILURE);
 	}