My new fdisk(8) program.

Fred Clift fclift at verio.net
Tue Feb 3 08:26:29 PST 2004


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 at verio.net -- Remember: If brute
force doesn't work, you're just not using enough.


More information about the freebsd-hackers mailing list