Subject: Re: CVS commit: src/sbin/newfs
To: matthew green <mrg@eterna.com.au>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 10/10/2003 11:07:52
> > i think it would be best if newfs Just Worked with vinum devices.
>
> No question. Do you have any suggestion how? I suppose one way would
> be to ignore errors if you can't get the partition information
> indicated by the last letter. Another, tacky one would be to
> recognize the path name (/dev/vinum) and go by that. But that's even
> worse than the -V flag.
The partition size could be got from stat, the label is only needed
for the sector size. It is also used as defaults for the fragment/block
size and to validate the appleufs stuff.
IMHO the fragment/block sizes don't belong in the label!
And newfs shouldn't be writing the label....
> i see there is a DIOCGPART ioctl that isn't used anywhere in our
> tree but does appear to be supported by all the drivers...perhaps
> that could be tried on the as-is name?
Looks like you would have to open /dev/kmem and read the structure
from the reported address!
> (i had a quick look at the code in newfs, but it wasn't clear how
> all the partitioning stuff works.)
Maybe it doesn't! The code is OTT for what it actually does.
David
--
David Laight: david@l8s.co.uk