- 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.
This commit is contained in:
Craig Rodrigues 2005-12-03 01:26:27 +00:00
parent 69b9fffc84
commit ec528a3472
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153034

View File

@ -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;