Subject: Re: sysinst death
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 12/05/1997 12:57:49
On Thu, 4 Dec 1997 16:39:55 -0800 (PST)  Jonathan Stone wrote:

> 
> >Hmm.  An option at the "choose your installation" menu, have an option
> >"d" to read the current disklabel, and then drop into the "partitions
> >ok?" menu shouldn't be too hard, but I don't think I'll have a chance
> >to do it...  Also, should this menu be called "choose your partition
> >layout" or similar?
> 
> 
> Sounds good to me.  I was looking at it yesterday.
> 
> But the internal data structure used by sysinst is not compatbile with
> either struct disklabel or the ascii output from disklabel or
> disklabel -R.
> 
>  There's no input parser, just the menu-based, er, structure editor :)
> 
> You'd need to add code to do an ioctl to get the disklabel, then
> translate it into the internal structure used by sysinst.
> that much is a very SMOP.
> 
> But what to do if there's no label on the disk?

How's about try to read the label?  If there's no label, then present
the existing menu, and if there is a label present the new menu with the
extra option.  I guess I could come up with the disklabel parser fairly
quickly.  I've had the practice parsing ifconfig. :)

Phil, what about a way to conditionalise what appears in the menu?
Sounds a bit hard off the cuff...

Simon.