In order to be mounted, a filesystem needed to both match against
noXX and not match against XX.
The ternary operator also makes the intention clearer.
---
 mount.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mount.c b/mount.c
index d413168..6a0cd61 100644
--- a/mount.c
+++ b/mount.c
@@ -302,12 +302,12 @@ mountall:
                argopts = me->mnt_opts;
                parseopts(argopts, &flags, data, sizeof(data));
                /* if -t types specified:
-                * if non-match, skip
+                * if non-match and not prefixed with "no", skip
                 * if match and prefixed with "no", skip */
                if (types &&
-                   ((types[0] == 'n' && types[1] == 'o' &&
-                    findtype(types + 2, me->mnt_type)) ||
-                    (!findtype(types, me->mnt_type))))
+                   (types[0] == 'n' && types[1] == 'o' ?
+                    findtype(types + 2, me->mnt_type) != NULL :
+                    findtype(types, me->mnt_type) == NULL))
                        continue;
 
                r = mounthelper(me->mnt_fsname, me->mnt_dir, me->mnt_type);
-- 
2.52.0


Reply via email to