Re: Panic on mount with write-locked USB media (umass)

From: Peter Jeremy <PeterJeremy_at_optushome.com.au>
Date: Wed, 6 Apr 2005 17:12:08 +1000
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
Received on Wed Apr 06 2005 - 05:12:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC