Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jul 2006 12:09:31 -0400
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        freebsd-current@freebsd.org
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [RFC] mount can figure out fstype automatically
Message-ID:  <20060708160931.GA3871@crodrigues.org>
In-Reply-To: <86ac7krtu1.fsf@xps.des.no>
References:  <20060708152801.GA3671@crodrigues.org> <86ac7krtu1.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 08, 2006 at 05:37:26PM +0200, Dag-Erling Smrgrav wrote:
> What about cases where there may be several matching file systems?
> For instance, a clean ext3 file system is also a valid ext2 file
> system (and vice versa).

Currently, FreeBSD can only mount ext2 with mount -t ext2fs.

A better example would probably be udf and cd9660 filesystems.

Right now the logic is to iterate over the list of known local
filesystems (always starting with "ufs"), skipping over "synthetic"
and "network" filesystems,
i.e. similar to the list produced by lsvfs:

Filesystem                        Refs Flags
-------------------------------- ----- ---------------
ufs                                  8 
reiserfs                             0 read-only
nfs4                                 0 network
ext2fs                               0 
ntfs                                 0 
cd9660                               0 read-only
procfs                               1 synthetic
msdosfs                              0 
xfs                                  0 
devfs                                1 synthetic
nfs                                  0 network



The first matching filesystem wins....not perfect, but
maybe good enough for a lot of cases.

mount -t always works if you want to specify the fstype.

-- 
Craig Rodrigues        
rodrigc@crodrigues.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060708160931.GA3871>