Subject: Re: bin/3998: Trying to mount a filesystem you don't have is cryptic
To: None <>
From: Peter Seebach <>
List: current-users
Date: 09/26/2006 05:16:49
In message <>, Christian Hattemer writes:
>On 25.09.06, Gavan Fantom wrote:
>> This doesn't apply only to NFS, but to any filesystem which is not
>> compiled in.

>> If a more appropriate error message is difficult, then it should at
>> least be documented in the manpage as a possible failure.

>This is exactly the point.

>EOPNOTSUPP doesn't look too bad and would also be directly visible.

>If really all that can be done is a note in man, where should it go to be
>easily found? Perhaps mount(8) because it's a general issue. options(4)
>also seems to be a good place for a second hint.

>Best solution would be to both use a more descriptive error message and
>notes in the man...

The underlying problem, I think, is that mount(8) really can't do much but pass
back the errno value it gets from mount(2), and there's a big advantage
to passing back the exact text from strerror().

I do think ENODEV is probably erroneous, because it is NOT the device that
is failing to support the mount operation.  There is some temptation to hijack
the sense of EPROTONOSUPPORT, which is after all closer in the case of NFS.

In any event, the man page is just plain wrong.  The only case given in the
man page where ENODEV can come back is "[ENODEV]           A component of
ufs_args fspec does not exist." -- and even this applies only to UFS.

A fix for this should correct the man page, no matter what we think about
the "correct" errno.