From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 3 08:26:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04A3716A4CF for ; Tue, 3 Feb 2004 08:26:29 -0800 (PST) Received: from gatekeeper.oremut02.us.wh.verio.net (gatekeeper.oremut02.us.wh.verio.net [198.65.168.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74AA443D45 for ; Tue, 3 Feb 2004 08:26:22 -0800 (PST) (envelope-from fclift@verio.net) Received: from mx.dmz.orem.verio.net (mx.dmz.orem.verio.net [172.16.146.6]) 73E8C1ECA64 for ; Tue, 3 Feb 2004 09:26:22 -0700 (MST) Received: from vespa.dmz.orem.verio.net (vespa.dmz.orem.verio.net [172.16.146.130])i13GQM1e067906; Tue, 3 Feb 2004 09:26:22 -0700 (MST) (envelope-from fclift@verio.net) Date: Tue, 3 Feb 2004 09:26:22 -0700 From: Fred Clift To: slick In-Reply-To: Message-ID: <20040203091203.S91207@irfcn.qzm.berz.irevb.arg> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Wed, 04 Feb 2004 05:10:31 -0800 cc: Hackers Subject: Re: My new fdisk(8) program. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 16:26:29 -0000 On Sun, 1 Feb 2004, slick wrote: > Hi, > I decided to write a new fdisk(8) program for unix. The main goal was to be > able to do all the MBR manipulation from the command line, to be portable > across all unix platform using libc, to work alone, to be as small and > simple as possible and to be easy to maintain and extend. > > I did it. One thing I noticed is that -P prints only numeric values for partition types -- I'd prefer to see it print both that and the string-version of the type - ie the same stuff you see with -l. Also missing is the ability edit partition lengths from the commandline non-interactively (ie the -f option for the existing FreeBSD fdisk). For my uses this is the real show-stopper - I maintain an automated installation system that relies on being able to script the creation of partitions - I'd have to 'speak interativly' with your program over a pipe to do so, making things more difficult. It seems that you require that the maximu Cylinder value NEVER be greater than 1024. This is generally a requirement for bootable partitions but for non-bootable ones, at least from FreeBSD's perspective, no such limitation exists. One last thing - how about adding some comments in your code? :) Good job on this - it seems to work as advertised, and is quite small. I'm pretty sure I wouldn't recommend this as a replacement for the FreeBSD fdisk until it picks up a lot more functionality. (ie like -I and -t) Oh, just curious, why are you opposed to the use of structs? Does it make the code less portable due to alignment restrictions or something? Fred -- Fred Clift - fclift@verio.net -- Remember: If brute force doesn't work, you're just not using enough.