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