On Fri, 2007-04-20 at 04:27 -0300, Otavio Salvador wrote:
> Checking what was causing the exception I started to go deeply on code
> and then found the reason but I'm not experienced at dvh labels to
> know if it's right or not.
>
> The bug is caused by the bellow code.
> #v+
> 1 ped_disk_duplicate (const PedDisk* old_disk)
> 2 {
> 3 PedDisk* new_disk;
> 4 PedPartition* old_part;
> 5
> 6 PED_ASSERT (old_disk != NULL, return NULL);
> 7 PED_ASSERT (!old_disk->update_mode, return NULL);
> 8 PED_ASSERT (old_disk->type->ops->duplicate != NULL, return NULL);
> 9 PED_ASSERT (old_disk->type->ops->partition_duplicate != NULL,
> 10 return NULL);
> 11
> 12 new_disk = old_disk->type->ops->duplicate (old_disk);
> 13 if (!new_disk)
> 14 goto error;
> 15
> 16 _disk_push_update_mode (new_disk);
> 17 for (old_part = ped_disk_next_partition (old_disk, NULL); old_part;
> 18 old_part = ped_disk_next_partition (old_disk, old_part)) {
> 19 if (ped_partition_is_active (old_part)) {
> 20 if (!_add_duplicate_part (new_disk, old_part))
> 21 goto error_destroy_new_disk;
> 22 }
> 23 }
> 24 _disk_pop_update_mode (new_disk);
> 25 return new_disk;
> 26
> 27 error_destroy_new_disk:
> 28 ped_disk_destroy (new_disk);
> 29 error:
> 30 return NULL;
> 31 }
> #v-
>
> At line 16, the code changes new_disk->update_mode and then try to
> walk through the partition table on the disk. Line 20 then fail and
> make the code goes out without reverting the update_mode change. This
> makes the exception to be raised later on ped_disk_destroy since it
> checks this value and abort.
>
> Does someone has any tip why this specific label is failing while the
> others are not?The dvh label is for SGI systems, so immediately the thing that comes to mind is, "did the original account for byte ordering when writing the dvh functionality?" That's something to consider if you are running this on an LE system. Also, it's entirely possible that the dvh code we have now is pretty old in libparted and simply needs to be updated. -- David Cantrell <[EMAIL PROTECTED]> Red Hat / Westford, MA
signature.asc
Description: This is a digitally signed message part
_______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

