From: Felix Fietkau Date: Mon, 19 May 2014 20:25:30 +0000 (+0200) Subject: match full mtd partition names X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=commitdiff_plain;h=233d957c7662b667fb5470c05641e51e802df97c match full mtd partition names Signed-off-by: Felix Fietkau Signed-off-by: John Crispin --- diff --git a/libfstools/mtd.c b/libfstools/mtd.c index 00bb2d6..b9daabc 100644 --- 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)