[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17108: [PATCH] libparted: Check AlternateLBA against LBA-1
From: |
Phillip Susi |
Subject: |
bug#17108: [PATCH] libparted: Check AlternateLBA against LBA-1 |
Date: |
Thu, 27 Mar 2014 20:05:14 -0400 |
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
- bug#17105: [PATCH 4/4] tests: Use msdos-overlap to setup t0283, (continued)
- bug#17107: [PATCH 2/4] tests: Fix the t0281 test to respond to the backup GPT location question, Brian C. Lane, 2014/03/26
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Brian C. Lane, 2014/03/26
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/26
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Brian C. Lane, 2014/03/27
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/27
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Brian C. Lane, 2014/03/27
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/27
- bug#17108: [PATCH] libparted: Check AlternateLBA against LBA-1,
Phillip Susi <=
- bug#17108: [PATCH] libparted: Check AlternateLBA against LBA-1, Brian C. Lane, 2014/03/28
- bug#17108: [PATCH] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/28
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/27
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Brian C. Lane, 2014/03/27
- bug#17108: [PATCH 1/4] libparted: Check AlternateLBA against LBA-1, Phillip Susi, 2014/03/27