Blame SOURCES/0014-RH-handle-other-sector-sizes.patch

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