Hello,

I think I did some progress about the ipod issue.

Adding the bug patch or the current proposed Colin's patch it fixes
the label detection but fails due a bad geom. Looking at code, I found
where it was doing a wrong thing...

diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index e513a05..0b11867 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -378,9 +378,7 @@ linear_start (const PedDisk* disk, const DosRawPartition* 
raw_part,
        PED_ASSERT (disk != NULL, return 0);
        PED_ASSERT (raw_part != NULL, return 0);
 
-       return offset
-              + PED_LE32_TO_CPU (raw_part->start)
-                       * (disk->dev->sector_size / 512);
+       return offset + PED_LE32_TO_CPU (raw_part->start);
 }
 
 static PedSector
@@ -391,8 +389,7 @@ linear_end (const PedDisk* disk, const DosRawPartition* 
raw_part,
        PED_ASSERT (raw_part != NULL, return 0);
 
        return linear_start (disk, raw_part, offset)
-              + (PED_LE32_TO_CPU (raw_part->length) - 1)
-                       * (disk->dev->sector_size / 512);
+              + (PED_LE32_TO_CPU (raw_part->length) - 1);
 }
 
 #ifndef DISCOVER_ONLY

This provides right geom; code now has a segfault that I was unable to
find. Any hint?

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [EMAIL PROTECTED]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to