[parted-devel] GNU Parted Official Repository: Changes to 'master'

Debarshi Ray debarshi.ray at gmail.com
Thu Jan 11 19:39:56 CET 2007


> > A way to fix this is to create a deep copy duplicate of PedDeice **dev
> > before doing ped_device_free_all. This would require a
> > ped_device_duplicate function (similar to ped_disk_duplicate) to be
> > written.

> I got it. I think it would be nice to have it done and rightly
> implemented.

The easiest and best way to solve this is to do a ped_device_get(path)
after the ped_device_free_all. This will reopen the device Parted was
invoked with originally.

However I have already written a ped_device_duplicate function, and
for the sake of completeness of the API I feel libparted should have a
function to create a duplicate of a device. After all we do have
ped_disk_duplicate. The problem is that this function needs to be
thoroughly tested and is not fit to be merged in 'stable-1.8.x'.

Happy hacking,
Debarshi
-- 
After the game the king and the pawn go into the same box.
                -- Italian proverb



More information about the parted-devel mailing list