aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-12-18 06:46:18 -0600
committerRob Landley <rob@landley.net>2020-12-18 06:46:18 -0600
commitb74d4319dcbf173e596bc422796058091e7e07b8 (patch)
tree317e6f1e305dd0de1dedc3ad341a59d9bf1612f6 /lib
parente474cf80c37f7c91d01c2c5b81cbc54444f47cc9 (diff)
downloadtoybox-b74d4319dcbf173e596bc422796058091e7e07b8.tar.gz
Andy Hu wants mount -tnomsdos,smbfs to work.
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.c7
1 files changed, 4 insertions, 3 deletions
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;
}