From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: dedekind1@gmail.com
Cc: Richard Genoud <richard.genoud@gmail.com>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2 3/7] UBI: accept empty string for vid_hdr_offs parameter
Date: Tue, 21 Aug 2012 23:19:33 +0300 [thread overview]
Message-ID: <20120821231933.722f5be4@halley> (raw)
In-Reply-To: <1345467898.2848.29.camel@sauron.fi.intel.com>
On Mon, 20 Aug 2012 16:04:58 +0300 Artem Bityutskiy <dedekind1@gmail.com> wrote:
> Please, let's not over-engineer this, do not bother with ",,", use ",0,"
> instead. Just do amend the documentation properly.
Artem, you are probably right, but it was really a one-liner:
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 2c5ed5c..1745764 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1333,7 +1333,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
p = &mtd_dev_param[mtd_devs];
strcpy(&p->name[0], tokens[0]);
- if (tokens[1])
+ if (tokens[1] && *tokens[1] != '\0')
p->vid_hdr_offs = bytes_str_to_int(tokens[1]);
if (p->vid_hdr_offs < 0)
But either case, I guess the user will probably still need to take a
look at the description to understand how to "avoid specifying" the
vid_hdr_offs ;-)
So no real benefit supporting ",,"
Bit more intuitive, though.
Anyways, saw you already pushed, thanks.
Shmulik
next prev parent reply other threads:[~2012-08-21 20:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 12:09 [PATCH v2 0/7] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
2012-08-20 12:09 ` [PATCH v2 1/7] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
2012-08-20 12:26 ` Shmulik Ladkani
2012-08-20 12:09 ` [PATCH v2 2/7] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
2012-08-20 12:09 ` [PATCH v2 3/7] UBI: accept empty string for vid_hdr_offs parameter Richard Genoud
2012-08-20 12:52 ` Shmulik Ladkani
2012-08-20 13:04 ` Artem Bityutskiy
2012-08-20 13:06 ` Richard Genoud
2012-08-21 20:19 ` Shmulik Ladkani [this message]
2012-08-22 8:51 ` Artem Bityutskiy
2012-08-20 12:09 ` [PATCH v2 4/7] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
2012-08-20 12:09 ` [PATCH v2 5/7] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
2012-08-20 12:09 ` [PATCH v2 6/7] UBI: add ioctl for max_beb_per1024 Richard Genoud
2012-08-20 12:09 ` [PATCH v2 7/7] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
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=20120821231933.722f5be4@halley \
--to=shmulik.ladkani@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.genoud@gmail.com \
/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