diff options
| -rw-r--r-- | sys/kern/vfs_mount.c | 11 | ||||
| -rw-r--r-- | sys/sys/mount.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index ef757b825bab..8604e31606a3 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -197,6 +197,17 @@ vfs_freeopts(struct vfsoptlist *opts) free(opts, M_MOUNT); } +void +vfs_deleteopt(struct vfsoptlist *opts, const char *name) +{ + struct vfsopt *opt, *temp; + + TAILQ_FOREACH_SAFE(opt, opts, link, temp) { + if (strcmp(opt->name, name) == 0) + vfs_freeopt(opts, opt); + } +} + /* * Check if options are equal (with or without the "no" prefix). */ diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 9b864151d850..640646b20146 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -650,6 +650,7 @@ struct mntarg *mount_argsu(struct mntarg *ma, const char *name, const void *val, struct vfsconf *vfs_byname(const char *); struct vfsconf *vfs_byname_kld(const char *, struct thread *td, int *); void vfs_event_signal(fsid_t *, u_int32_t, intptr_t); +void vfs_deleteopt(struct vfsoptlist *opts, const char *name); int vfs_flagopt(struct vfsoptlist *opts, const char *name, u_int *w, u_int val); int vfs_getopt(struct vfsoptlist *, const char *, void **, int *); char *vfs_getopts(struct vfsoptlist *, const char *, int *error); |
