On Wed, Jun 04, 2008 at 10:46:08PM -0500, Mike Gerdts wrote:
> I've long been annoyed by the fact that mount(1M) isn't smart enough
> to figure out the file system type but fstyp(1M) is.  As I was writing
> the code to fix this annoyance, I found the reason why.
> 
> # ldd mount
>         libfstyp.so.1 =>         /usr/lib/libfstyp.so.1
>         libnvpair.so.1 =>        /lib/libnvpair.so.1
>         libc.so.1 =>     /lib/libc.so.1
>         libnsl.so.1 =>   /lib/libnsl.so.1
>         ...
> 
> Is the dependency on a library in /usr the only reason that such a
> change would be problematic?  If so, would using dlopen() be an
> acceptable method for loading the library only if it is needed?

When we run into such issues we tend to move the relevant library into
/lib (leaving behind a symlink in /usr/lib).

mount(1M) long predates fstyp(1M) and libfstyp.  That's the more likely
explanation.

But, too, what should mount/fstyp do with things like NFS or CIFS URLs
(which needn't be URLs either)?  Or "swap"?

(Well, the answer is likely: return "nfs," "cifs" or "tmpfs" if it can
unambiguously tell, else return an error and let the user tell mount
what the fs type is.)

Nico
-- 

Reply via email to