From owner-cvs-all@FreeBSD.ORG Sun Mar 30 12:09:54 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A995D37B401; Sun, 30 Mar 2003 12:09:54 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 901A943FAF; Sun, 30 Mar 2003 12:09:53 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.8/8.12.8) with ESMTP id h2UK9oSM017379; Sun, 30 Mar 2003 22:09:50 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Nate Lawson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 30 Mar 2003 12:05:05 -0800." Date: Sun, 30 Mar 2003 22:09:50 +0200 Message-ID: <17378.1049054990@critter.freebsd.dk> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/fdisk fdisk.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2003 20:09:57 -0000 In message , Nate Lawson writ es: >On Sat, 29 Mar 2003, Poul-Henning Kamp wrote: >> In message , Nate Lawson writ >> es: >> >On Sat, 29 Mar 2003, Poul-Henning Kamp wrote: >> >> Modified files: >> >> sbin/fdisk fdisk.c >> >> Log: >> >> Use default geometry in case the device doesn't provide one: >> >> 512 for sectorsize. >> >> 63 for sectors. >> >> 255 for heads. >> >> This will mostly show up on MD(4) devices. >> > >> >Won't this be a problem for small devices or for int 13 booting? That's >> >why we use 64 heads, 32 sectors for scsi devices < 1 GB. >> >> You can specify any number you like to fdisk using all the usual >> ways of doing so, and you should if you want to copy the image to >> some other media afterwards. > >Sure. My concern was for devices like USB flash disks where your defaults >may not be appropriate and the info IS being written to media. Would you >be willing to put in a < 1GB size check on the media to use more >appropriate heads/sector values? USB flash disks will report with DIOCGFWSECTORS/FWHEADS and therefore not hit this code. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.