[PATCH v2 10/19] rsatoc: check error value of gen_key()
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Aug 5 03:03:17 PDT 2024
On 01.08.24 07:57, Sascha Hauer wrote:
> exit with an error in case gen_key() fails, otherwise errors go through
> unnoticed.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Ah, nice that you caught this.
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> scripts/rsatoc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c
> index c7bc4ba843..27f0afe61f 100644
> --- a/scripts/rsatoc.c
> +++ b/scripts/rsatoc.c
> @@ -471,7 +471,7 @@ static int gen_key(const char *keyname, const char *path)
> int main(int argc, char *argv[])
> {
> char *path, *keyname;
> - int i, opt;
> + int i, opt, ret;
> char *outfile = NULL;
>
> outfilep = stdout;
> @@ -542,7 +542,9 @@ int main(int argc, char *argv[])
> }
> }
>
> - gen_key(keyname, path);
> + ret = gen_key(keyname, path);
> + if (ret)
> + exit(1);
> }
>
> if (dts) {
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list