[PATCH] fdisk.c: major whitespace/style cleanup

Garrett Kajmowicz gkajmowi at tbaytel.net
Sat Feb 25 15:46:47 UTC 2006


> Technically speaking the GPL is not a revocable license, but in this case
> the current fdisk is crap anyway, and I've already recommended starting
> over from scratch, so I have no problem yanking what's there and asking
> Garret or Dennis to write a new one.  (And doing it myself if they don't
> want to: it's probably about a one-week project.  It's writing a
> _boot_sector_...)

What makes the current code just plain annoying is the way that it supports 
multiple partition table formats.  If I'm able to strip out some of them (aix 
and sgi?), it would clean the code up a lot.  From there, reorganization 
becomes easier.  We may end up with a rewrite, but I'd prefer to keep known 
mostly-working code (I can clean that up as well - baby steps).  I'm also 
looking at grouping some of related global variables into a struct.

> The interesting ones for us are the traditional PC one, and possibly BSD
> disk labels (since Red Hat uses 'em).  The others we can worry about if
> somebody actually misses them...

We've subsequently had a request to keep sun.  If you agre, I'll trash 
everything else.  From there, splitting up the code more cleanly becomes 
easier at which point I might be able to refactor the code so that we can 
share a significant portion between fdisk and a future sfdisk.


-     Garrett



More information about the busybox mailing list