mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: bootm_open_initrd_uimage: result of uimage_verify() is ignored
Date: Tue, 19 Sep 2017 08:44:48 +0200	[thread overview]
Message-ID: <20170919064448.n2gjiy5lyqqvclfq@pengutronix.de> (raw)
In-Reply-To: <7ca89d8a-f413-3728-1990-40802e5cb2b6@pengutronix.de>

On Mon, Sep 18, 2017 at 09:33:01PM +0200, Marc Kleine-Budde wrote:
> Hello,
> 
> the bootm_open_initrd_uimage() function will check the CRC of the inird,
> if bootm_get_verify_mode is set appropriately, but the error value is
> not propagated.
> 
> > static int bootm_open_initrd_uimage(struct image_data *data)
> > {
> > 	int ret;
> > 
> > 	if (strcmp(data->os_file, data->initrd_file)) {
> > 		data->initrd = uimage_open(data->initrd_file);
> > 		if (!data->initrd)
> > 			return -EINVAL;
> > 
> > 		if (bootm_get_verify_mode() > BOOTM_VERIFY_NONE) {
> > 			ret = uimage_verify(data->initrd);
> > 			if (ret) {
> > 				printf("Checking data crc failed with %s\n",
> > 					strerror(-ret));
> > 			}
> > 		}
> > 		uimage_print_contents(data->initrd);
> > 	} else {
> > 		data->initrd = data->os;
> > 	}
> > 
> > 	return 0;
> > }
> 
> Is this intentional?

I suppose not :(

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2017-09-19  6:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 19:33 Marc Kleine-Budde
2017-09-19  6:44 ` Sascha Hauer [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=20170919064448.n2gjiy5lyqqvclfq@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mkl@pengutronix.de \
    /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