From 93fc1f1a1a58249c1811bc320975792e900580ea Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 11 Oct 2015 11:43:34 -0700 Subject: memtest.c: Print iterations count if -i is 0 Even if memtest is started in endless mode it is still useful to see current iteration count. Add the code to print that. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- commands/memtest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'commands/memtest.c') diff --git a/commands/memtest.c b/commands/memtest.c index 756123001a..b88290c227 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. */ -- cgit v1.2.3