1 /* vi: set sw=4 ts=4: */
3 * Match fstypes for use in mount unmount
4 * We accept notmpfs,nfs but not notmpfs,nonfs
5 * This allows us to match fstypes that start with no like so
8 * Returns 0 for a match, otherwise -1
10 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
15 int match_fstype(const struct mntent *mt, const char *fstype)
26 if (fstype[0] == 'n' && fstype[1] == 'o') {
31 len = strlen(mt->mnt_type);
33 if (!strncmp(mt->mnt_type, fstype, len)
34 && (!fstype[len] || fstype[len] == ',')
38 fstype = strchr(fstype, ',');