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

Bug#218601: selected disk should advance as disks are partitioned

On Sun, Nov 02, 2003 at 02:07:56PM +0100, Thorsten Sauter wrote:
> Hi Joey,
> * Joey Hess <joeyh@debian.org> [2003-11-01 02:26]:
> | The behavior of the partitioner/disc select list could be improved if it
> | gave some indication of which disks had already been partitioned. One
> | way to do so might be to move the default selection down to the next
> | disk (and finally to "Finish") as disks are parittioned.
> I see one problem here:
> 1) how we can detect, if the partition was already partitioned?
>    Simply checking the return code of the fdisk program (and check for
>    zero status)? But what, if the user exit the program without any
>    work?

We could implement a small libparted program making a single call to
ped_disk_probe (err i think you should call ped_device_get (/dev/hda)
first to get the device, and maybe ped_device_open/close too). And you
will get back the information on which kind of partition table is on the
disk. If there is a partition table, you know that it has already been
somewhat partitioned, altough the partition table may be empty.


Sven Luther

Reply to: