On Tue, 2009-11-03 at 14:43 -0500, Chris Lumens wrote: > > diff --git a/storage/partitioning.py b/storage/partitioning.py > > index 971dd7d..56c52c5 100644 > > --- a/storage/partitioning.py > > +++ b/storage/partitioning.py > > @@ -570,6 +570,26 @@ def getBestFreeSpaceRegion(disk, part_type, req_size, > > > > return best_free > > > > +def sectorsToSize(sectors, sectorSize): > > + """ Convert length in sectors to size in MB. > > + > > + Arguments: > > + > > + sectors - sector count > > + sectorSize - sector size for the device, in bytes > > + """ > > + return (sectors * sectorSize) / (1024.0 * 1024.0) > > + > > +def sizeToSectors(size, sectorSize): > > + """ Convert size in MB to length in sectors. > > + > > + Arguments: > > + > > + size - size in MB > > + sectorSize - sector size for the device, in bytes > > + """ > > + return (size * 1024.0 * 1024.0) / sectorSize > > + > > These might go better in pyparted, huh? Yeah, they might be nice as methods of parted.Device, or maybe there's an even better place for them? Dave > > - Chris > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list