From 233d957c7662b667fb5470c05641e51e802df97c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 19 May 2014 22:25:30 +0200 Subject: [PATCH] match full mtd partition names Signed-off-by: Felix Fietkau Signed-off-by: John Crispin --- libfstools/mtd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.30.2