diff options
-rw-r--r-- | utils/mount/configfile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index 6985ed9..39d3741 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -186,8 +186,18 @@ char *lookup_entry(char *opt) { struct entry *entry; char *alias = is_alias(opt); + char *ptr; SLIST_FOREACH(entry, &head, entries) { + /* + * Only check the left side or options that use '=' + */ + if ((ptr = strchr(entry->opt, '=')) != 0) { + int len = (int) (ptr - entry->opt); + + if (strncasecmp(entry->opt, opt, len) == 0) + return opt; + } if (strcasecmp(entry->opt, opt) == 0) return opt; if (alias && strcasecmp(entry->opt, alias) == 0) |