bug-parted
[Top][All Lists]
Advanced

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

Re: ped_disk_delete_all() problem.


From: Andrew Clausen
Subject: Re: ped_disk_delete_all() problem.
Date: Mon, 28 Jul 2003 19:06:45 +1000
User-agent: Mutt/1.5.4i

On Mon, Jul 28, 2003 at 05:59:15PM +0900, Seung B. Lee wrote:
> I want to delete all partitions on a disk like below.
> 
>         dev = ped_device_get (argv[1]);
>         if (!dev) goto error;
>         if (!ped_device_open (dev)) goto error;
>         disk = ped_disk_open (dev);
>         if (!disk) goto error_close_dev;
>         if (ped_disk_delete_all (disk))
>             printf("[PARTED] All disk partition is deleted.\n");
>         if (ped_device_sync (dev))
>             printf("[PARTED] device is synchronized.\n");
> 
> But no partition is deleted.

You need to call ped_disk_commit().
You don't need to call ped_device_sync().

Cheers,
Andrew





reply via email to

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