bootm_open_initrd_uimage: result of uimage_verify() is ignored

Marc Kleine-Budde mkl at pengutronix.de
Mon Sep 18 12:33:01 PDT 2017


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   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20170918/b1c6dcde/attachment.sig>


More information about the barebox mailing list