GNU bug report logs -
#17108
[PATCH 1/4] libparted: Check AlternateLBA against LBA-1
Previous Next
Full log
Message #29 received at 17108 <at> debbugs.gnu.org (full text, mbox):
t0210-gpt-resized-partition-entry-array failed because gpt-header-munge
did not relocate the LastUsableLBA to agree with the smaller table size.
This caused parted to complain that the backup was not at the end of the
disk ( as indicated by LastUsableLBA ), when in fact, it was. Accept
the current AlternateLBA if it is *either* in the right place relative
to LastUsableLBA, or the last sector of the disk.
---
libparted/labels/gpt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index 42b0360..971c1c0 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -991,7 +991,8 @@ gpt_read (PedDisk *disk)
disk->dev->sector_size);
gpt_disk_data->AlternateLBA = PED_LE64_TO_CPU (primary_gpt->AlternateLBA);
- if (PED_LE64_TO_CPU (primary_gpt->AlternateLBA) != gpt_disk_end)
+ if (gpt_disk_data->AlternateLBA != gpt_disk_end &&
+ gpt_disk_data->AlternateLBA != disk->dev->length - 1)
{
if (ped_exception_throw
(PED_EXCEPTION_ERROR,
--
1.8.3.2
This bug report was last modified 11 years and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.