diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-12-03 01:26:27 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-12-03 01:26:27 +0000 |
commit | 16d338ecbb1216d0f3412fd7f78299bb033ab092 (patch) | |
tree | f68408d14315a47e1808055b05fe767df00b759f /sys | |
parent | ec3e11dc526f447eb9ff75bbd7ed3f4f8b30231c (diff) | |
download | FreeBSD-src-16d338ecbb1216d0f3412fd7f78299bb033ab092.zip FreeBSD-src-16d338ecbb1216d0f3412fd7f78299bb033ab092.tar.gz |
- Add "rw" mount option to global_opts.
- In vfs_donmount(), parse "ro", "noro", and "rw", in order to set or
unset the MNT_RDONLY filesystem flag.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_mount.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index fa45ef9..f1124c7 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -130,6 +130,7 @@ static const char *global_opts[] = { "fstype", "fspath", "ro", + "rw", "suid", "exec", NULL @@ -542,6 +543,15 @@ vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) if (vfs_getopt(optlist, "nosymfollow", NULL, NULL) == 0) fsflags |= MNT_NOSYMFOLLOW; + if (vfs_getopt(optlist, "noro", NULL, NULL) == 0) + fsflags &= ~MNT_RDONLY; + + if (vfs_getopt(optlist, "ro", NULL, NULL) == 0) + fsflags |= MNT_RDONLY; + + if (vfs_getopt(optlist, "rw", NULL, NULL) == 0) + fsflags &= ~MNT_RDONLY; + if (vfs_getopt(optlist, "snapshot", NULL, NULL) == 0) fsflags |= MNT_SNAPSHOT; |