diff mbox

[OpenWrt-Devel,v2,2/3] ext4_part_match: fix bug that prevented matching names

Message ID 1461867621-4055-2-git-send-email-josua.mayer97@gmail.com
State Changes Requested
Delegated to: John Crispin
Headers show

Commit Message

Josua Mayer April 28, 2016, 6:20 p.m. UTC
From: Josua Mayer <privacy@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@gmail.com>
---
 libfstools/ext4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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;
 		}