projects
/
project
/
fstools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9e8236
)
match full mtd partition names
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 May 2014 20:25:30 +0000
(22:25 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 19 May 2014 20:25:32 +0000
(22:25 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John Crispin <blogic@openwrt.org>
libfstools/mtd.c
patch
|
blob
|
history
diff --git
a/libfstools/mtd.c
b/libfstools/mtd.c
index 00bb2d6a549398cef21b315493fedd8485e9fc62..b9daabcb595e75cd4cd12f9757729b55257e2e77 100644
(file)
--- a/
libfstools/mtd.c
+++ b/
libfstools/mtd.c
@@
-130,7
+130,9
@@
static char* mtd_find_index(char *name)
return index;
while (!index && fgets(line, sizeof(line), fp)) {
- if (strstr(line, name)) {
+ char *ret;
+
+ if ((ret = strstr(line, name)) && (ret[strlen(name)] == '"')) {
char *eol = strstr(line, ":");
if (!eol)