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