[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] Partitioning
From:       Markus Nigbur <pYrania () gentoo ! org>
Date:       2003-11-25 17:58:48
[Download RAW message or body]


On Mon, 24 Nov 2003 17:24:11 +0000
Luke-Jr <luke-jr@gentoo.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I've been working on some of the partitioning code for InGen lately,
> but I can't seem to find a *good* way to do things (such as find out
> how much unallocated space is on a HD, etc)...
> Does anyone have any suggestions for programming partition table
> manipulation front ends?

you could determine the number of sectors of the disk, get through the
current partition table and fetch all first and last sectors of
partitions, calculate the sum of each partitions sectors, substract it
from the total number of sectors and voila: you get the unused sectors.

one sector represents 512 Byte.

-- Markus

-- 
Markus Nigbur
Gentoo Developer
http://www.gentoo.org

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic