Panic on mount with write-locked USB media (umass)
Peter Jeremy
PeterJeremy at optushome.com.au
Wed Apr 6 00:12:12 PDT 2005
On Tue, 2005-Apr-05 22:59:08 +0200, Poul-Henning Kamp wrote:
>There are two ways that a filesystem correctly could handle a R/O
>media:
>
>1. Fail with EROFS unless asked t mouned read-only
Note that EROFS is not a documented return code for [n]mount(2).
This is probably a bug.
>2. Silently downgrade th emount to read-only.
>I personally prefer the first because that way a script does not
>have to check if it got the mount it wanted or not.
I agree that [n]mount(2) should fail with EROFS. There are benefits
in having mount(8) detect this case and retry the mount - it makes
mount(8) more intuitive for interactive use.
It's a pity there isn't provision for a "partially successful" exit
code - then mount(8) could both perform a read-only mount and any
scripts could check that they got the mount they expected.
Peter
More information about the freebsd-current
mailing list