mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@googlemail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/8] nandtest: rename command argument p to i
Date: Mon, 22 Oct 2012 09:23:27 +0200	[thread overview]
Message-ID: <1350890612-10588-4-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1350890612-10588-1-git-send-email-alex.aring@gmail.com>

Rename command argument p for 'passes' to 'i' iteration.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 commands/nandtest.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/commands/nandtest.c b/commands/nandtest.c
index f614cd5..656fb65 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -198,7 +198,7 @@ static int do_nandtest(int argc, char *argv[])
 	int opt, length = -1, do_nandtest_dev = -1;
 	off_t flash_offset = 0;
 	off_t test_ofs;
-	unsigned int nr_passes = 1, pass;
+	unsigned int nr_iterations = 1, iter;
 	int i;
 	int ret = -1;
 	unsigned char *wbuf, *rbuf;
@@ -210,7 +210,7 @@ static int do_nandtest(int argc, char *argv[])
 
 	memset(ecc_stats, 0, MAX_ECC_BITS);
 
-	while ((opt = getopt(argc, argv, "ms:p:o:l:t")) > 0) {
+	while ((opt = getopt(argc, argv, "ms:i:o:l:t")) > 0) {
 		switch (opt) {
 		case 'm':
 			markbad = 1;
@@ -218,8 +218,8 @@ static int do_nandtest(int argc, char *argv[])
 		case 's':
 			seed = simple_strtoul(optarg, NULL, 0);
 			break;
-		case 'p':
-			nr_passes = simple_strtoul(optarg, NULL, 0);
+		case 'i':
+			nr_iterations = simple_strtoul(optarg, NULL, 0);
 			break;
 		case 'o':
 			flash_offset = simple_strtoul(optarg, NULL, 0);
@@ -310,7 +310,7 @@ static int do_nandtest(int argc, char *argv[])
 	}
 	rbuf = wbuf + meminfo.erasesize;
 
-	for (pass = 0; pass < nr_passes; pass++) {
+	for (iter = 0; iter < nr_iterations; iter++) {
 		init_progression_bar(length);
 		for (test_ofs = flash_offset;
 				test_ofs < flash_offset+length;
@@ -338,10 +338,10 @@ static int do_nandtest(int argc, char *argv[])
 				goto err2;
 		}
 		show_progress(test_ofs);
-		printf("\nFinished pass %d successfully\n", pass+1);
+		printf("\nFinished pass %d successfully\n", iter+1);
 	}
 
-	print_stats(nr_passes, length);
+	print_stats(nr_iterations, length);
 
 	ret = close(fd);
 	if (ret < 0) {
@@ -366,7 +366,7 @@ static const __maybe_unused char cmd_nandtest_help[] =
 		"  -t,	Really do a nandtest on device.\n"
 		"  -m,	Mark blocks bad if they appear so.\n"
 		"  -s	<seed>,	Supply random seed.\n"
-		"  -p	<passes>, Number of passes.\n"
+		"  -i	<iterations>, Number of iterations.\n"
 		"  -o	<offset>, Start offset on flash.\n"
 		"  -l	<length>, Length of flash to test.\n";
 
-- 
1.7.12.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-10-22  7:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-22  7:23 [PATCH 0/8] improve nandtest command Alexander Aring
2012-10-22  7:23 ` [PATCH 1/8] nandtest: stat ecc per page not per eraseblock Alexander Aring
2012-10-22  7:23 ` [PATCH 2/8] nandtest: add progressbar instead of offset print Alexander Aring
2012-10-22  7:23 ` Alexander Aring [this message]
2012-10-22  7:23 ` [PATCH 4/8] nandtest: change flash length variable type Alexander Aring
2012-10-22  7:23 ` [PATCH 5/8] nandtest: use get_random_bytes instead of for loop Alexander Aring
2012-10-22  7:23 ` [PATCH 6/8] nandtest: clean up code Alexander Aring
2012-10-22  7:23 ` [PATCH 7/8] nandtest: use loff_t instead off_t Alexander Aring
2012-10-22  7:23 ` [PATCH 8/8] nandtest: add another constraints check Alexander Aring
2012-10-23  6:27 ` [PATCH 0/8] improve nandtest command Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350890612-10588-4-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@googlemail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox