summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@aol.com>2019-08-26 23:27:04 +0800
committerGao Xiang <hsiangkao@aol.com>2019-08-26 23:57:41 +0800
commit3d45c540d24c38aed7ff916000a1c5f5fd282f5c (patch)
tree36a7361779ebd6554153916354f5668839f2142c
parent12f17d8373635cdbaf6d16afe72bbd0371820a95 (diff)
erofs-utils: fix up "-E legacy-compress"
"-E legacy-compress" isn't parsed properly, fix it now. Reported-by: Li Guifu <blucerlee@gmail.com> Fixes: 1f11cf0463b5 ("erofs-utils: introduce extented options setting") Reviewed-by: Li Guifu <blucerlee@gmail.com> Signed-off-by: Gao Xiang <hsiangkao@aol.com>
-rw-r--r--mkfs/main.c2
1 files changed, 1 insertions, 1 deletions
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;