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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux