Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329069
b: refs/heads/master
c: 5993f9b
h: refs/heads/master
i:
  329067: 69f1691
v: v3
  • Loading branch information
Richard Genoud authored and Artem Bityutskiy committed Sep 4, 2012
1 parent 0d67451 commit f6a1882
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95e6fb027e041641baed441fcbd27c2f082c760e
refs/heads/master: 5993f9b7380d77fd23f5402dcfb701aedb327ffe
7 changes: 5 additions & 2 deletions trunk/drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
/* Maximum length of the 'mtd=' parameter */
#define MTD_PARAM_LEN_MAX 64

/* Maximum number of comma-separated items in the 'mtd=' parameter */
#define MTD_PARAM_MAX_COUNT 2

#ifdef CONFIG_MTD_UBI_MODULE
#define ubi_is_module() 1
#else
Expand Down Expand Up @@ -1324,7 +1327,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
struct mtd_dev_param *p;
char buf[MTD_PARAM_LEN_MAX];
char *pbuf = &buf[0];
char *tokens[2] = {NULL, NULL};
char *tokens[MTD_PARAM_MAX_COUNT];

if (!val)
return -EINVAL;
Expand Down Expand Up @@ -1354,7 +1357,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
if (buf[len - 1] == '\n')
buf[len - 1] = '\0';

for (i = 0; i < 2; i++)
for (i = 0; i < MTD_PARAM_MAX_COUNT; i++)
tokens[i] = strsep(&pbuf, ",");

if (pbuf) {
Expand Down

0 comments on commit f6a1882

Please sign in to comment.