Blame SOURCES/parted-3.1-libparted-use-largest_partnum-in-dm_reread_part_tabl.patch

8dc857
From 26fbffe8389e732be29225bd649adfdd5588b131 Mon Sep 17 00:00:00 2001
8dc857
From: "Brian C. Lane" <bcl@redhat.com>
8dc857
Date: Wed, 21 Mar 2012 15:34:20 -0700
8dc857
Subject: [PATCH] libparted: use largest_partnum in dm_reread_part_table
8dc857
 (#803108)
8dc857
8dc857
DM devices can have more than 16 partitions, notify the kernel about
8dc857
all of them.
8dc857
8dc857
Resolves: rhbz#803108
8dc857
8dc857
* libparted/arch/linux.c (dm_reread_part_table): Use largest_partnum
8dc857
8dc857
fixup
8dc857
---
8dc857
 libparted/arch/linux.c |    3 +--
8dc857
 1 files changed, 1 insertions(+), 2 deletions(-)
8dc857
8dc857
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
8dc857
index 7dd664e..ed14f50 100644
8dc857
--- a/libparted/arch/linux.c
8dc857
+++ b/libparted/arch/linux.c
8dc857
@@ -2516,14 +2516,13 @@ _dm_reread_part_table (PedDisk* disk)
8dc857
           return 1;
8dc857
 
8dc857
         int     rc = 1;
8dc857
-        int     last = PED_MIN (largest_partnum, 16);
8dc857
         int     i;
8dc857
 
8dc857
         sync();
8dc857
         if (!_dm_remove_parts(disk->dev))
8dc857
                 rc = 0;
8dc857
 
8dc857
-        for (i = 1; i <= last; i++) {
8dc857
+        for (i = 1; i <= largest_partnum; i++) {
8dc857
                 PedPartition*      part;
8dc857
 
8dc857
                 part = ped_disk_get_partition (disk, i);
8dc857
-- 
8dc857
1.7.7.6
8dc857