diff options
Diffstat (limited to 'tests/mtd-tests/flash_stress.c')
-rw-r--r-- | tests/mtd-tests/flash_stress.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/mtd-tests/flash_stress.c b/tests/mtd-tests/flash_stress.c index b7a0fec..da39e14 100644 --- a/tests/mtd-tests/flash_stress.c +++ b/tests/mtd-tests/flash_stress.c @@ -126,10 +126,14 @@ static void process_options(int argc, char **argv) } } - if (optind < argc) - mtddev = argv[optind++]; - else + if (optind < argc) { + mtddev = mtd_find_dev_node(argv[optind]); + if (!mtddev) + errmsg_die("Can't find MTD device %s", argv[optind]); + optind++; + } else { errmsg_die("No device specified!\n"); + } if (optind < argc) usage(EXIT_FAILURE); |