On Mon, 24 Nov 2003 17:24:11 +0000 Luke-Jr <[EMAIL PROTECTED]> 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
pgp00000.pgp
Description: PGP signature
