From owner-freebsd-arch@FreeBSD.ORG Sat Jul 8 16:14:34 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA9F116A4DA; Sat, 8 Jul 2006 16:14:34 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63FAE43D46; Sat, 8 Jul 2006 16:14:34 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-71-233-168-2.hsd1.ma.comcast.net ([71.233.168.2]) by comcast.net (rwcrmhc15) with ESMTP id <20060708160932m15004em26e>; Sat, 8 Jul 2006 16:09:32 +0000 Received: from c-71-233-168-2.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k68G9Vv6003907; Sat, 8 Jul 2006 12:09:31 -0400 (EDT) (envelope-from rodrigc@c-71-233-168-2.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-71-233-168-2.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k68G9VS0003906; Sat, 8 Jul 2006 12:09:31 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 8 Jul 2006 12:09:31 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20060708160931.GA3871@crodrigues.org> References: <20060708152801.GA3671@crodrigues.org> <86ac7krtu1.fsf@xps.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ac7krtu1.fsf@xps.des.no> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:14:35 -0000 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