summaryrefslogtreecommitdiffstats
path: root/commands/memtest.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-10-11 11:43:34 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2015-10-15 08:56:21 +0200
commit93fc1f1a1a58249c1811bc320975792e900580ea (patch)
treeda846b33710d5171dd0fd10520cf8ace4f9b354a /commands/memtest.c
parent16f7b3513822b514bb242e3756ceb01663a0bb1e (diff)
downloadbarebox-93fc1f1a1a58249c1811bc320975792e900580ea.tar.gz
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 <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/memtest.c')
-rw-r--r--commands/memtest.c6
1 files changed, 5 insertions, 1 deletions
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.
*/