From b74d4319dcbf173e596bc422796058091e7e07b8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 18 Dec 2020 06:46:18 -0600 Subject: Andy Hu wants mount -tnomsdos,smbfs to work. --- lib/portability.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/portability.c b/lib/portability.c index 91c01900..0c364c29 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -126,14 +126,15 @@ int mountlist_istype(struct mtab_list *ml, char *typelist) if (!typelist) return 1; + // leading "no" indicates whether entire list is inverted skip = strncmp(typelist, "no", 2); for (;;) { if (!(t = comma_iterate(&typelist, &len))) break; if (!skip) { - // If one -t starts with "no", the rest must too - if (strncmp(t, "no", 2)) error_exit("bad typelist"); - if (!strncmp(t+2, ml->type, len-2)) { + // later "no" after first are ignored + strstart(&t, "no"); + if (!strncmp(t, ml->type, len-2)) { skip = 1; break; } -- cgit v1.2.3