summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2005-10-17 03:07:36 +0000
committerrodrigc <rodrigc@FreeBSD.org>2005-10-17 03:07:36 +0000
commitadce9d7a14e5b03e0e41e5ae36ef9ceed55066ca (patch)
treea8098b6ed29944b4b489d1664f906a0ff1cabc0e /sys/fs
parentd98f60cef4978a1ae3e03a565be7a2878956be6c (diff)
downloadFreeBSD-src-adce9d7a14e5b03e0e41e5ae36ef9ceed55066ca.zip
FreeBSD-src-adce9d7a14e5b03e0e41e5ae36ef9ceed55066ca.tar.gz
Unconditionally mount a UDF filesystem as read-only, instead of
returning an EROFS if we forget to mount it as read-only.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/udf/udf_vfsops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 6abe549..890be05 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -199,8 +199,10 @@ udf_mount(struct mount *mp, struct thread *td)
opts = mp->mnt_optnew;
- if ((mp->mnt_flag & MNT_RDONLY) == 0)
- return (EROFS);
+ /*
+ * Unconditionally mount as read-only.
+ */
+ mp->mnt_flag |= MNT_RDONLY;
/*
* No root filesystem support. Probably not a big deal, since the
OpenPOWER on IntegriCloud