summaryrefslogtreecommitdiffstats
path: root/sbin/mount
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-05-02 02:16:16 +0000
committerdd <dd@FreeBSD.org>2001-05-02 02:16:16 +0000
commit120b57c149d09765bdc3fddd807a41544a7141cd (patch)
tree421a7e65dec5f2a94b2f17410ca10105367099be /sbin/mount
parentdb1670b79697f277967ef441b57da62be4a396a4 (diff)
downloadFreeBSD-src-120b57c149d09765bdc3fddd807a41544a7141cd.zip
FreeBSD-src-120b57c149d09765bdc3fddd807a41544a7141cd.tar.gz
Implement the -r and -w options as `-o ro' and `-o noro', respectively. At
least in -w's case, simply unsetting the correct bit in init_flags was not enough. The bit may be reset later if, say, the filesystem is marked `ro' in fstab. The command line option should override the fstab setting, but did not. The implementation of -r was changed for consistency. PR: 26886 Reviewed by: archie
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 877339b..eb9fdba 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -158,7 +158,7 @@ main(argc, argv)
verbose = 1;
break;
case 'r':
- init_flags |= MNT_RDONLY;
+ options = catopt(options, "ro");
break;
case 't':
if (vfslist != NULL)
@@ -173,7 +173,7 @@ main(argc, argv)
verbose = 1;
break;
case 'w':
- init_flags &= ~MNT_RDONLY;
+ options = catopt(options, "noro");
break;
case '?':
default:
OpenPOWER on IntegriCloud