On Sat, Jan 21, 2006 at 10:27:39PM +0100, Andries Brouwer wrote:
> > You think it's normal for mount to ignore the fact that
> > mount.$fstype is ENOENT when mount() returned EINVAL?
>
> Yes.
>
> Read mount(8) and see:
>
> Mount options for smbfs
> Just like nfs, the smbfs implementation expects a binary argu-
> ment (a struct smb_mount_data) to the mount system call. This
> argument is constructed by smbmount(8) and the current version
> of mount (2.12) does not know anything about smbfs.
>
> That shows that mount is the wrong program to call.
> But if you call it anyway, and you have mount.smbfs in place,
> mount will invoke that, and things still work.
> You will also find that if you search the manpage for the string smbfs.
>
>
> The normal situation is that mount.$fstype returns ENOENT.
> It is normal that there is no mount.$fstype - this is almost never
> an error. If there is no special mount program for some type
> then mount will do the generic mount call, and report on
> error returns it gets from those.
>
> It would be a mistake to build into mount knowledge about
> all of the different filesystems - it is bad enough that it
> knows about nfs.
Well, perhaps it's easier for you to not have to track these things, but you
already are on the slippery slope - you implemented one functionality, and
any user will expect the dependent functionality to be implemented as well.
Just because the manual says that there is a limitation, that doesn't make
the limitation any less arbitrary for the users. Hopefully the program is
written to be used by users, and not just to be a cosy little pile of code?
And besides, how hard is it to cache a warning message about non-existent
mount.$fstype and display it a few lines below if the EINVAL happens?
I'm all for abiding by some principles of putting things where they belong,
but this is not the case here. If mount tries to find $foo, proceeds and
then something else fails, and mount then prints a long error message, what
possible problem is caused by adding another relevant string to the message?
--
2. That which causes joy or happiness.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]