From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 09:58:05 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E8CE106564A for ; Tue, 25 Nov 2008 09:58:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 500F98FC13 for ; Tue, 25 Nov 2008 09:58:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 1ADBB73098; Tue, 25 Nov 2008 11:02:43 +0100 (CET) Date: Tue, 25 Nov 2008 11:02:43 +0100 From: Luigi Rizzo To: Rink Springer Message-ID: <20081125100243.GA19436@onelab2.iet.unipi.it> References: <20081125094125.GA18669@onelab2.iet.unipi.it> <20081125094635.GA64854@rink.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081125094635.GA64854@rink.nu> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: small newfs_msdos addition 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: Tue, 25 Nov 2008 09:58:05 -0000 On Tue, Nov 25, 2008 at 10:46:35AM +0100, Rink Springer wrote: > Hi Luigi, > > On Tue, Nov 25, 2008 at 10:41:25AM +0100, Luigi Rizzo wrote: > > If there are no objections I'd like to commit the small patch below > > to newfs_msdos.c -- all it does is create a fake geometry if > > it cannot get the media size, which is handy when you want to > > create a filesystem image on a regular file. > > Hmm, what about adding this as a seperate option, or perhaps printing a > message that it made a wild guess? Right now it does this: > newfs_msdos /tmp/aaa newfs_msdos: warning: /tmp/aaa is not a character device /tmp/aaa: 20424 sectors in 2553 FAT12 clusters (4096 bytes/cluster) bps=512 spc=8 res=1 nft=2 rde=512 sec=20480 mid=0xf0 spf=8 spt=64 hds=32 hid=0 so the warning is there already. I am a bit reluctant to add one more option -- the whole goal was to make it easy to use, otherwise one could just exploit the existing flags. > When I create a md(4), I may have accidently forgotten to specify the > geometry and I would like to be reminded that it made something up, well, the whole geometry thing (and disktab) is a relic of the past. These days it is completley meaningless -- hard disks always have a fake geometry (63sec/255heads), same for flash memories... cheers luigi