From: Crystal Kolipe Subject: mount(2) fixes To: tech@openbsd.org Date: Wed, 19 Nov 2025 17:47:00 +0000 Fix a couple of bugs in mount(2): 1. The manual page contains the following text: "For example, most filesystems will not allow a change from read-write to read-only." As far as I can tell, this text was added in 4.3BSD-Reno and propogated to OpenBSD via the initial import of the NetBSD tree. In fact, all of ffs, mfs, tmpfs, ext2fs, and msdosfs allow re-mounting as read-only. (At least they do via the mount syscall, separately /sbin/mount fails when given an mfs filesystem as an argument along with -u because it doesn't understand the 'mfs:*' device string, but that's a separate issue.) ISO9660, UDF, and ntfs are read-only implementations anyway, so there is no concept of re-mounting from read-write to read-only. So the idea that _most_ filesystems don't allow a change from read-write to read-only is now clearly outdated. Let's just remove the example. 2. The description of struct iso_args is missing the 'sess' element. The following patch fixes those two issues. Aside from that, the manual page is also missing all of the NFSMNT_* mount option flags, as well as a description of fusefs_args. I've not included fixes for those because in the case of the NFSMNT_* options it seems like a lot of bloat that might not really belong in the manual page, and since fusefs is not usable without external software that is not part of base, it's not obvious if the fusefs_args should be documented in the manual either. --- lib/libc/sys/mount.2 +++ lib/libc/sys/mount.2 @@ -115,8 +115,6 @@ This allows the mount flags to be changed without requiring that the filesystem be unmounted and remounted. Some filesystems may not allow all flags to be changed. -For example, -most filesystems will not allow a change from read-write to read-only. .Pp The .Fa type @@ -136,6 +134,7 @@ struct export_args export_info; /* network export info */ int flags; /* mounting flags, see below */ + int sess; /* start sector of session */ }; #define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/ #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */