freebsd-src/sbin/mount
Andriy Gapon 3ea3666fcb MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails
If the operation is not an update, if neither r/w nor r/o mode is
explicitly requested, if the error code hints at the possibility of the
media being read-only, and if the fallback is allowed, then we can try
to automatically downgrade to the readonly mode.

This is especially useful for auto-mounting of removable media that
sometimes can happen to be write-protected.

The fallback to r/o is not enabled by default.  It can be requested on a
per-mount basis with a new mount option, 'autoro'.  Or it can be
globally allowed by setting vfs.default_autoro.

stable/10 note: this branch does not have SYSCTL_BOOL, so SYSCTL_INT is
used instead.

Relnotes:	yes
2018-04-19 05:52:47 +00:00
..
extern.h Remove UFS-specific parts from mount(8). 2005-11-23 23:22:56 +00:00
getmntopts.3 Fix minor nits: 2012-10-15 13:20:08 +00:00
getmntopts.c MFC r310092: 2016-12-21 23:16:58 +00:00
Makefile In this GRN, Marcel Moolenaar overhauled the logic for mounting 2013-07-17 19:32:07 +00:00
mntopts.h MFC r310092: 2016-12-21 23:16:58 +00:00
mount_fs.c Don't print the nmount(2) provided error message if it is empty. 2012-01-20 12:59:12 +00:00
mount.8 MFC r331616: vfs_donmount: in certain cases try r/o mount if r/w mount fails 2018-04-19 05:52:47 +00:00
mount.c MFC r316611: 2017-05-30 22:36:24 +00:00
mount.conf.8 MFC r315774: 2017-03-30 05:17:23 +00:00
pathnames.h Remove advertising clause from University of California Regent's license, 2004-04-09 19:58:40 +00:00
vfslist.c ANSIfy almost all applications that use WARNS=6. 2009-12-29 22:53:27 +00:00