2 kpartx/gpt.c | 9 ++++++---
3 1 file changed, 6 insertions(+), 3 deletions(-)
5 Index: multipath-tools-120821/kpartx/gpt.c
6 ===================================================================
7 --- multipath-tools-120821.orig/kpartx/gpt.c
8 +++ multipath-tools-120821/kpartx/gpt.c
9 @@ -637,6 +637,7 @@ read_gpt_pt (int fd, struct slice all, s
12 int last_used_index=-1;
13 + int sector_size_mul = get_sector_size(fd)/512;
15 if (!find_valid_gpt (fd, &gpt, &ptes) || !gpt || !ptes) {
17 @@ -652,9 +653,11 @@ read_gpt_pt (int fd, struct slice all, s
21 - sp[n].start = __le64_to_cpu(ptes[i].starting_lba);
22 - sp[n].size = __le64_to_cpu(ptes[i].ending_lba) -
23 - __le64_to_cpu(ptes[i].starting_lba) + 1;
24 + sp[n].start = sector_size_mul *
25 + __le64_to_cpu(ptes[i].starting_lba);
26 + sp[n].size = sector_size_mul *
27 + (__le64_to_cpu(ptes[i].ending_lba) -
28 + __le64_to_cpu(ptes[i].starting_lba) + 1);