bug-parted
[Top][All Lists]
Advanced

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

Re: ped_partition_new


From: Andrew Clausen
Subject: Re: ped_partition_new
Date: Mon, 16 Oct 2000 15:13:32 +1100

Stephane BRANGER wrote:
> 
> Hi buddies !
> 
> I'm using the parted API.
> 
> In my program first I delete all the partitions on a disc:
> ped_disk_delete_all(disk);
> 
> then I create a new partition:
> ped_partition_new (disk, PED_PARTITION_PRIMARY, NULL, 0, boot_size_sector);
> 
> and I write the result to the disc:
> ped_disk_write(disk);
> 
> First in the API documentation the function is explained with more parameters
> (there's the unsigned char system parameter, but I dunno how to use it), but 
> in
> parted.c it's used with those parameters.

Sorry!   The API docs are about out of date :-(

I've fixed this bug in the docs now.  The unsigned char parameters have
gone.

Anyway, because the docs are out of date, I suggest you check in the
header files, before assuming that the docs are right (yuck!)  If you
do find other mistakes, I'd appreciate you telling me about them :-)
 
> Then the program delete my partitions, but it refuses to create a new one. 
> And I
> don't get any errors so what the hell did I forget ???

Well, you need to add the partition to the disk.  i.e. do:

        ped_disk_add_partition (disk, part);

Did you do this?

BTW: it would be easier if you sent in the relevant code :-)

Good luck :-)
Andrew Clausen



reply via email to

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