[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: resizing containerpartition and keeping startpoint intact
From: |
B.Hakvoort |
Subject: |
Re: resizing containerpartition and keeping startpoint intact |
Date: |
Mon, 29 Nov 2004 15:00:49 +0100 |
On Thu, 2004-11-25 at 09:58 +1100, Andrew Clausen wrote:
> On Wed, Nov 24, 2004 at 09:15:13PM +0100, B.Hakvoort wrote:
> > > > PedGeometry* min_geom = ped_geometry_new (dev, start, len);
> > > > PedGeometry* max_geom = ped_geometry_new (dev, start, dev->length -
> > > > start);
> > > > constraint = ped_constraint_new_from_min_max (min_geom, max_geom);
> >
> > Hmmz.. this works, but afaics it basicly creates a very exact constraint
> > and doesn't round to a cyclinder boundary.
>
> It should round to a cylinder boundary (for the end only).
>
> Feel free to give me a code-snippet to prove me wrong...
>
Hi :)
Andrew, then it must be me, whatever i do i'll end up with a very exact
constraint, here some relevant code:
PedGeometry* min_geom = ped_geometry_new( device, orig_start,
new_length );
PedGeometry* max_geom = ped_geometry_new( device, orig_start, device-
>length - orig_start);
constraint = ped_constraint_new_from_min_max( min_geom, max_geom );
the resizing is done with:
ped_disk_set_partition_geom ( disk, c_partition, constraint, orig_start,
new_end ) ;
Is this what you meant?
My own way (mentioned in previous mail) works fine, but i'd rather do it
the 'official' way :)
thanks!
Bart
--
www.titanium-it.nl --- Open Minded Open Source
www.heavenisopen.com <-----Another Source