bug-parted
[Top][All Lists]
Advanced

[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: Sat, 04 Dec 2004 15:55:54 +0100

On Sat, 2004-12-04 at 11:54 +1100, Andrew Clausen wrote:

> Perhaps the partition in your test case doesn't have a cylinder-aligned
> start?

lol :) Andrew, that was the whole point. :^)
I wanted something that keeps the startpoint _exact_ as it was in case
it isn't cylinder-aligned.

I hacked something together and it worked, but i was wondering if
there's another, more efficient way to accomplish the same. Just for
clearity, here's what i have:
-------------------------------------------------
constraint = ped_constraint_any( device );
ped_disk_set_partition_geom ( disk, part, constraint, orig_start,
new_end ) ;
ped_constraint_destroy ( constraint );

ped_geometry_set_start ( & part ->geom, orig_start ) ;
constraint = ped_constraint_exact ( & part ->geom ) ;
-----------------------------------------------------

The resulting constraint does what i want. fixed start and a
cylinder-aligned end.

However, i cannot escape the feeling there should be an easier way to
accomplish the same...

Any insights are appreciated (no rush though, this'll work for the
moment)

regards,

Bart

> Cheers,
> Andrew
-- 
www.titanium-it.nl --- Open Minded Open Source
www.heavenisopen.com <-----Another Source





reply via email to

[Prev in Thread] Current Thread [Next in Thread]