Blame SOURCES/0013-libparted-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch

003ee8
From 1174a9cca1610611ad5d8cf9f3611e9d4c984fb0 Mon Sep 17 00:00:00 2001
003ee8
From: "Brian C. Lane" <bcl@redhat.com>
003ee8
Date: Fri, 5 Jun 2015 14:40:00 -0700
003ee8
Subject: [PATCH 13/13] libparted: BLKPG_RESIZE_PARTITION uses bytes, not
003ee8
 sectors (#1135493)
003ee8
003ee8
This results in the extended partition vanishing after adding another
003ee8
partition.
003ee8
003ee8
Resolves: rhbz#1135493
003ee8
---
003ee8
 libparted/arch/linux.c | 5 ++++-
003ee8
 1 file changed, 4 insertions(+), 1 deletion(-)
003ee8
003ee8
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
003ee8
index 90ab21d..e73fe1c 100644
003ee8
--- a/libparted/arch/linux.c
003ee8
+++ b/libparted/arch/linux.c
003ee8
@@ -2547,7 +2547,10 @@ static int _blkpg_resize_partition (PedDisk* disk, const PedPartition *part)
003ee8
                                 if (walk->geom.start == part->geom.start+1)
003ee8
                                         linux_part.length = 1;
003ee8
                         }
003ee8
-                } else linux_part.length = 1;
003ee8
+                } else {
003ee8
+                        linux_part.length = 1;
003ee8
+                }
003ee8
+                linux_part.length *= disk->dev->sector_size;
003ee8
         }
003ee8
         else
003ee8
                 linux_part.length = part->geom.length * disk->dev->sector_size;
003ee8
-- 
003ee8
2.4.0
003ee8