diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-12-03 12:04:20 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-12-03 12:04:20 +0000 |
commit | fa8afa1a00a6ec87e57aca5ddcf1ec554e025edf (patch) | |
tree | ee2dde7103d2dba4ff664b4baa62e7bf50b14d19 /sys | |
parent | 0c322e42b4c0add7658e901b171eeec9561841c1 (diff) | |
download | FreeBSD-src-fa8afa1a00a6ec87e57aca5ddcf1ec554e025edf.zip FreeBSD-src-fa8afa1a00a6ec87e57aca5ddcf1ec554e025edf.tar.gz |
Add "rdonly" to global_opts, and parse it in vfs_donmount().
Requested by: rwatson
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_mount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index f1124c7..e4e2524 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -129,6 +129,7 @@ struct vnode *rootvnode; static const char *global_opts[] = { "fstype", "fspath", + "rdonly", "ro", "rw", "suid", @@ -549,6 +550,9 @@ vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) if (vfs_getopt(optlist, "ro", NULL, NULL) == 0) fsflags |= MNT_RDONLY; + if (vfs_getopt(optlist, "rdonly", NULL, NULL) == 0) + fsflags |= MNT_RDONLY; + if (vfs_getopt(optlist, "rw", NULL, NULL) == 0) fsflags &= ~MNT_RDONLY; |