mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* bootm_open_initrd_uimage: result of uimage_verify() is ignored
@ 2017-09-18 19:33 Marc Kleine-Budde
  2017-09-19  6:44 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2017-09-18 19:33 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1.1: Type: text/plain, Size: 1043 bytes --]

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?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-19  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 19:33 bootm_open_initrd_uimage: result of uimage_verify() is ignored Marc Kleine-Budde
2017-09-19  6:44 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox