From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, david.oberhollenzer@sigma-star.at
Subject: Re: [PATCH 4/8] mtd-utils: Add flash stress test Utility
Date: Tue, 26 Apr 2016 10:18:50 +0200 [thread overview]
Message-ID: <20160426101850.2ccde903@bbrezillon> (raw)
In-Reply-To: <1461622409-14970-5-git-send-email-richard@nod.at>
On Tue, 26 Apr 2016 00:13:25 +0200
Richard Weinberger <richard@nod.at> wrote:
> diff --git a/misc-utils/flash_stress.c b/misc-utils/flash_stress.c
> new file mode 100644
> index 0000000..2dd2da1
> --- /dev/null
> +++ b/misc-utils/flash_stress.c
[...]
> +static void process_options(int argc, char **argv)
> +{
> + int i;
> +
> + for (i=1; i<argc; ++i) {
> + if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
> + usage(EXIT_SUCCESS);
> + } else if (!strcmp(argv[i], "--keep") || !strcmp(argv[i], "-k")) {
> + if (flags & KEEP_CONTENTS)
> + goto failmulti;
> + flags |= KEEP_CONTENTS;
> + } else if (!strcmp(argv[i], "--seed") || !strcmp(argv[i], "-s")) {
> + if (flags & SEED_SET)
> + goto failmulti;
> + srand(read_num(i, i+1, argc, argv));
> + flags |= SEED_SET;
> + } else if (!strcmp(argv[i], "--count") || !strcmp(argv[i], "-c")) {
> + if (flags & COUNT_CHANGED)
> + goto failmulti;
> + count = read_num(i, i+1, argc, argv);
> + if (count <= 0)
> + goto failarg;
> + ++i;
> + flags |= COUNT_CHANGED;
> + } else {
> + if (mtddev)
> + usage(EXIT_FAILURE);
> + mtddev = argv[i];
> + }
> + }
Please use getopt_long(). I guess this applies to all your patches, so
I'll stop mentioning it.
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-04-26 8:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 22:13 [RFC] Porting kernel MTD tests to user space Richard Weinberger
2016-04-25 22:13 ` [PATCH 1/8] mtd-utils: Fix return status in mtd_torture test function Richard Weinberger
2016-04-26 7:57 ` Boris Brezillon
2016-07-13 17:30 ` Brian Norris
2016-07-13 21:59 ` Richard Weinberger
2016-07-13 22:06 ` Brian Norris
2016-04-25 22:13 ` [PATCH 2/8] mtd-utils: Add multi-block erase function Richard Weinberger
2016-04-26 8:04 ` Boris Brezillon
2016-04-27 9:21 ` David Oberhollenzer
2016-04-27 9:27 ` Boris Brezillon
2016-04-25 22:13 ` [PATCH 3/8] mtd-utils: Add flash torture test utility Richard Weinberger
2016-04-26 8:13 ` Boris Brezillon
2016-04-26 14:34 ` Ezequiel Garcia
2016-04-27 9:28 ` David Oberhollenzer
2016-04-25 22:13 ` [PATCH 4/8] mtd-utils: Add flash stress test Utility Richard Weinberger
2016-04-26 8:18 ` Boris Brezillon [this message]
2016-04-26 9:22 ` Richard Weinberger
2016-04-26 9:47 ` Boris Brezillon
2016-04-27 16:38 ` Brian Norris
2016-04-25 22:13 ` [PATCH 5/8] mtd-utils: Add flash speed " Richard Weinberger
2016-04-25 22:13 ` [PATCH 6/8] mtd-utils: Add nand flash bit errors test Richard Weinberger
2016-04-25 22:13 ` [PATCH 7/8] mtd-utils: Add flash read test utility Richard Weinberger
2016-04-25 22:13 ` [PATCH 8/8] mtd-utils: Add nand page " Richard Weinberger
2016-04-26 3:13 ` [RFC] Porting kernel MTD tests to user space Ezequiel Garcia
2016-04-26 7:00 ` Richard Weinberger
2016-04-27 16:32 ` Brian Norris
2016-04-26 5:17 ` Artem Bityutskiy
2016-04-26 6:58 ` Richard Weinberger
2016-04-26 7:45 ` Boris Brezillon
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=20160426101850.2ccde903@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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;
as well as URLs for NNTP newsgroup(s).