[OpenWrt-Devel] [PATCH 2/2] ext4_part_match: fix bug that prevented matching names

josua.mayer97 at gmail.com josua.mayer97 at gmail.com
Thu Apr 28 13:39:20 EDT 2016


From: Josua Mayer <privacy at not.given>

Actually use the populated devname variable to compare against given name,
instead of the buf variable, which incidentally contains either:
MAJOR=xyz, MINOR=x, or DEVTYPE=partition, none of which ever match a name.

Signed-off-by: Josua Mayer <josua.mayer97 at gmail.com>
---
 libfstools/ext4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfstools/ext4.c b/libfstools/ext4.c
index f648aa8..b9401c3 100644
--- a/libfstools/ext4.c
+++ b/libfstools/ext4.c
@@ -78,7 +78,7 @@ ext4_part_match(char *dev, char *name, char *filename)
 			continue;
 		}
 		/* Match partition name */
-		if (strstr(buf, name))  {
+		if (strstr(devname, name))  {
 			ret = 0;
 			break;
 		}
-- 
2.6.6
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list