]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/match: make match_fstype() case insensitive
authorKarel Zak <kzak@redhat.com>
Thu, 31 Aug 2017 12:15:23 +0000 (14:15 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 31 Aug 2017 12:15:23 +0000 (14:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/match.c

index 9be82b0cc2c8bd5fe87796dbac30fed2a7d6551b..a286a190c0c865b2588985bde118fbdd8d469264 100644 (file)
@@ -39,10 +39,10 @@ int match_fstype(const char *type, const char *pattern)
        len = strlen(type);
        p = pattern;
        while(1) {
-               if (!strncmp(p, "no", 2) && !strncmp(p+2, type, len) &&
+               if (!strncmp(p, "no", 2) && !strncasecmp(p+2, type, len) &&
                    (p[len+2] == 0 || p[len+2] == ','))
                        return 0;
-               if (strncmp(p, type, len) == 0 && (p[len] == 0 || p[len] == ','))
+               if (strncasecmp(p, type, len) == 0 && (p[len] == 0 || p[len] == ','))
                        return !no;
                p = strchr(p,',');
                if (!p)