Re: resize_ffs improvements

On Sat, Dec 25, 2010 at 03:53:01AM +0100, Adam Hamsik wrote:
>
> On Dec,Friday 24 2010, at 5:32 PM, Christopher Berardi wrote:
>
> >> hi,
> >>
> >> I have done some small improvements to resize_ffs. With [1] patch it ask
> >> for
> >> confirmation if user has run fsck on filesystem (requested by agc@) and I
> >> have
> >> changed default behaviour of tool to grow filesystem to device size by
> >> default,
> >> shrinking is still possible with -s parameter. I would like to commit this
> >> patch and add resize_ffs to release build to have at least ffsv1
> >> grow/shrink
> >> working for users.
> >>
> >> [1] www.netbsd.org/~haad/resize_ffs.diff
> >>
> >> Regards
> >>
> >> Adam.
> >
> > I've done some more work on this, too. I attempted to recycle newfs(8)
> > code, though I wasn't entirely successful in the integration. I did,
> > however, make important improvements in the realm of user usability. For
> > example, I add options for entering the new size in different units, such
> > as KB, MB, GB, etc. as well as a percentage of the current filesystem size
> > (such as 150% of current file system size).
> >
> > Let me know if you'd be interested in seeing my code.
>
> Yeah I'm interested and if you can show it to me it would be good.
>
> Regards
>
> Adam.
>
>
I've attached a copy of the file. The code that deals with the usuability
features is found in lines 29-37; 98-158; 195-209; 662-754.
And just FYI, all code I borrowed from elsewhere was under the BSD license
(e.g., newfs(8)) and all code I wrote I place under the BSD license.
--
Christopher Berardi
http://www.natoufa.com/
Be still, and know that I am God (Psalms 46:10)