summaryrefslogtreecommitdiffstats
path: root/commands/nandtest.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@googlemail.com>2012-10-22 09:23:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-23 08:27:33 +0200
commitf221939b5d6946a4f6fbc551f736fc5a9c9fad86 (patch)
tree58f46d45920ed8786bcf6be38e116e5e1d9bb770 /commands/nandtest.c
parent1c3d312b51a8fa311dd30fd7858660381d93da25 (diff)
downloadbarebox-f221939b5d6946a4f6fbc551f736fc5a9c9fad86.tar.gz
nandtest: rename command argument p to i
Rename command argument p for 'passes' to 'i' iteration. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/nandtest.c')
-rw-r--r--commands/nandtest.c16
1 files 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";