From owner-freebsd-current@FreeBSD.ORG Sat Jul 8 16:17:21 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2049616A4DA; Sat, 8 Jul 2006 16:17:21 +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 9B96243D45; Sat, 8 Jul 2006 16:17:20 +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 <20060708161719m15004h5pse>; Sat, 8 Jul 2006 16:17:19 +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 k68GHJtX003985; Sat, 8 Jul 2006 12:17:19 -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 k68GHJwk003984; Sat, 8 Jul 2006 12:17:19 -0400 (EDT) (envelope-from rodrigc) Date: Sat, 8 Jul 2006 12:17:19 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20060708161719.GB3871@crodrigues.org> References: <20060708152801.GA3671@crodrigues.org> <44AFD7DF.8090002@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44AFD7DF.8090002@errno.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] mount can figure out fstype automatically X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 16:17:21 -0000 On Sat, Jul 08, 2006 at 09:05:51AM -0700, Sam Leffler wrote: > Linux has -t auto; haven't looked at how it works. I didn't want to implement -t auto, in case that would confuse things in case someone gets around to implementing autofs for FreeBSD, so I just used -t "". > It appears you just try a series of fs types; can't you read the device > to infer the filesystem? I was thinking of doing something like that. You can basically get the same info by doing something like: file - < /dev/ad0s1e /dev/stdin: Unix Fast File system (little-endian) file - < /dev/ad0s4 /dev/stdin: SGI XFS filesystem I leaned away from this approach in mount(8) because: - I didn't want to tie mount(8) to file(1) - I didn't want to build up a table of known superblocks inside mount(8) because every time a new filesystem is added to FreeBSD, mount(8) would need to be updated If there was a way, maybe at the GEOM or filesystem level to "taste" what type of filesystem existed on a device, and/or have a filesystem advertise what type of superblock it has, then that would be a nice way to do it, but I couldn't figure out a way to easily do it. -- Craig Rodrigues rodrigc@crodrigues.org