[PATCH] commands/crc: add a trailing newline after output of checksum

Sascha Hauer s.hauer at pengutronix.de
Wed Jun 27 04:25:37 EDT 2012


On Wed, Jun 27, 2012 at 10:13:13AM +0200, Uwe Kleine-König wrote:
> Without this patch the next command prompt starts directly after the
> calculated check sum. While at it also fix the coding style.

Under which conditions does this happen? The newline should be appended in
do_crc()

Sascha

> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
>  commands/crc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/commands/crc.c b/commands/crc.c
> index df22941..81aa340 100644
> --- a/commands/crc.c
> +++ b/commands/crc.c
> @@ -71,7 +71,7 @@ static int file_crc(char* filename, ulong start, ulong size, ulong *crc,
>  		*total += now;
>  	}
>  
> -	printf ("CRC32 for %s 0x%08lx ... 0x%08lx ==> 0x%08lx",
> +	printf("CRC32 for %s 0x%08lx ... 0x%08lx ==> 0x%08lx\n",
>  			filename, start, start + *total - 1, *crc);
>  
>  out_free:
> -- 
> 1.7.10
> 
> 

-- 
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 |



More information about the barebox mailing list