Skip to contentSkip to conversation

erofs-utils: fix up "-E legacy-compress" option

PATCH In review Gao Xiang via Linux-erofs 2 participants 2 messages Aug 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 erofs-utils: fix up "-E legacy-compress" option

"-E legacy-compress" isn't parsed properly, fix it now.

---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/main.c +1 -1
index 75e1d47..5efbf30 100644
@@ -34,7 +34,7 @@ static void usage(void)
 static int parse_extended_opts(const char *opts)
 {
 #define MATCH_EXTENTED_OPT(opt, token, keylen) \
-	(keylen == sizeof(opt) && !memcmp(token, opt, sizeof(opt)))
+	(keylen == sizeof(opt) - 1 && !memcmp(token, opt, sizeof(opt) - 1))
 
 	const char *token, *next, *tokenend, *value __maybe_unused;
 	unsigned int keylen, vallen;
Signature · 1 line
2.17.1