[PATCH 1/8] memtest.c: Print iterations count if -i is 0

Sascha Hauer s.hauer at pengutronix.de
Mon Oct 12 02:46:23 PDT 2015


Hi Andrey,

Applied the patches I have not commented on from this series.

Sascha

On Sun, Oct 11, 2015 at 11:43:34AM -0700, Andrey Smirnov wrote:
> Even if memtest is started in endless mode it is still usefult to see
> current iteration count. Add the code to print that.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
> ---
>  commands/memtest.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/commands/memtest.c b/commands/memtest.c
> index 7561230..b88290c 100644
> --- a/commands/memtest.c
> +++ b/commands/memtest.c
> @@ -180,8 +180,12 @@ static int do_memtest(int argc, char *argv[])
>  		goto out;
> 
>  	for (i = 1; (i <= max_i) || !max_i; i++) {
> +		printf("Start iteration %u", i);
>  		if (max_i)
> -			printf("Start iteration %u of %u.\n", i, max_i);
> +			printf(" of %u.\n", max_i);
> +		else
> +			putchar('\n');
> +
>  		/*
>  		 * First try a memtest with caching enabled.
>  		 */
> --
> 2.1.4
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

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