[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resizing containerpartition and keeping startpoint intact

From: Andrew Clausen
Subject: Re: resizing containerpartition and keeping startpoint intact
Date: Tue, 23 Nov 2004 08:51:41 +1100
User-agent: Mutt/1.5.6+20040722i


On Mon, Nov 22, 2004 at 03:18:21PM +0100, B.Hakvoort wrote:
> --------------------------------------------------------
> constraint = ped_constraint_any( device );
> ped_disk_set_partition_geom ( disk, c_partition, constraint, start,
> end ) ;
> ----------------------------------------------------------------

You want something like this:

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);

All of the constraint constructors use ped_constraint_new()... the
others are just for convenience.

ped_constraint_intersect() is also useful... it allows you to require
several constraints to be satisfied simultaneously.  If you have
several conceptual requirements, it is a bit nicer to split them
up into several constraints, and then find the intersection of them all.


reply via email to

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