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

Signed-off-by: Gao Xiang <[email protected]>
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 75e1d47..5efbf30 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -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;
-- 
2.17.1

Reply via email to