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

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