Message ID | 20120821231933.722f5be4@halley |
---|---|
State | New, archived |
Headers | show |
On Tue, 2012-08-21 at 23:19 +0300, Shmulik Ladkani wrote: > 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 ",," We have 0 as the default value already, no need to have the second way to specify the same.
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)