From: Josua Mayer <[email protected]>

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 <[email protected]>
---
 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
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to