Blame SOURCES/0014-RH-handle-other-sector-sizes.patch
|
|
f20720 |
---
|
|
|
f20720 |
kpartx/gpt.c | 9 ++++++---
|
|
|
f20720 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
f20720 |
|
|
|
f20720 |
Index: multipath-tools-120821/kpartx/gpt.c
|
|
|
f20720 |
===================================================================
|
|
|
f20720 |
--- multipath-tools-120821.orig/kpartx/gpt.c
|
|
|
f20720 |
+++ multipath-tools-120821/kpartx/gpt.c
|
|
|
f20720 |
@@ -637,6 +637,7 @@ read_gpt_pt (int fd, struct slice all, s
|
|
|
f20720 |
uint32_t i;
|
|
|
f20720 |
int n = 0;
|
|
|
f20720 |
int last_used_index=-1;
|
|
|
f20720 |
+ int sector_size_mul = get_sector_size(fd)/512;
|
|
|
f20720 |
|
|
|
f20720 |
if (!find_valid_gpt (fd, &gpt, &ptes) || !gpt || !ptes) {
|
|
|
f20720 |
if (gpt)
|
|
|
f20720 |
@@ -652,9 +653,11 @@ read_gpt_pt (int fd, struct slice all, s
|
|
|
f20720 |
sp[n].size = 0;
|
|
|
f20720 |
n++;
|
|
|
f20720 |
} else {
|
|
|
f20720 |
- sp[n].start = __le64_to_cpu(ptes[i].starting_lba);
|
|
|
f20720 |
- sp[n].size = __le64_to_cpu(ptes[i].ending_lba) -
|
|
|
f20720 |
- __le64_to_cpu(ptes[i].starting_lba) + 1;
|
|
|
f20720 |
+ sp[n].start = sector_size_mul *
|
|
|
f20720 |
+ __le64_to_cpu(ptes[i].starting_lba);
|
|
|
f20720 |
+ sp[n].size = sector_size_mul *
|
|
|
f20720 |
+ (__le64_to_cpu(ptes[i].ending_lba) -
|
|
|
f20720 |
+ __le64_to_cpu(ptes[i].starting_lba) + 1);
|
|
|
f20720 |
last_used_index=n;
|
|
|
f20720 |
n++;
|
|
|
f20720 |
}
|