[PATCH 07/14] comamnds: uimage: actually print error message

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Feb 7 04:22:38 EST 2014


Hi Lucas,

On Fri, Feb 07, 2014 at 09:48:49AM +0100, Lucas Stach wrote:
> Signed-off-by: Lucas Stach <dev at lynxeye.de>
> ---
>  commands/uimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/commands/uimage.c b/commands/uimage.c
> index 345e496..4b0ed4d 100644
> --- a/commands/uimage.c
> +++ b/commands/uimage.c
> @@ -63,8 +63,8 @@ static int do_uimage(int argc, char *argv[])
>  		printf("verifying data crc... ");
>  		ret = uimage_verify(handle);
>  		if (ret) {
> -			goto err;
>  			printf("Bad Data CRC\n");
> +			goto err;
I'd drop the printf instead because in the bad crc case uimage_verify()
already printfs an error. But instead let it give tongue in the other
error cases (like lseek() or read() failing)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the barebox mailing list