bug-parted
[Top][All Lists]
Advanced

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

Re: How can I get the device number of a partition before it's created?


From: Andrew Clausen
Subject: Re: How can I get the device number of a partition before it's created?
Date: Fri, 15 Aug 2003 13:52:32 +1000
User-agent: Mutt/1.5.4i

On Wed, Aug 13, 2003 at 05:26:52PM +0200, Hauke Goos-Habermann wrote:
> I'm working on a web based frontend (PHP) for parted for our software 
> distribution system m23 (m23.sf.net), that allows me to remove, add and 
> format partitions.

I think someone at MontaVista was doing the same thing about a year
ago.  You might want to take a look ;)

> The interface showes me how the new partitionating will 
> look like before it is actualy done. So I've to know how the partitions are 
> numbered (e.g. hda1, hda2, ...). After each operation the web page is updated 
> and shows me the new look of the partitioning.
> 
> What I don't understand is the numbering of the newly created partitions. 
> Sometimes they get reordered and sometimes not. If I delete a partition and 
> create two new in that space the numbering is not always recalculaded. Till 
> now I haven't found the algorithm how it is done.

The algorithm is contained in ped_disk_enumerate_partitions() in
libparted/disk.c and msdos_partition_enumerate() in libparted/disk_dos.c

Cheers,
Andrew





reply via email to

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