[parted-devel] [PATCH 1/2] libparted: use PED_MAX in dm_reread_part_table (#803108)

Brian C. Lane bcl at redhat.com
Fri Apr 20 18:46:00 UTC 2012


From: "Brian C. Lane" <bcl at redhat.com>

DM devices can have more than 16 partitions, this prevents
a mpath or dmsetup device from notifying the kernel about > 16
partitions.

Resolves: rhbz#803108

* libparted/arch/linux.c (dm_reread_part_table): Use PED_MAX not PED_MIN
---
 libparted/arch/linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index e2c4139..2cae27b 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2859,7 +2859,7 @@ _dm_reread_part_table (PedDisk* disk)
           return 1;
 
         int     rc = 1;
-        int     last = PED_MIN (largest_partnum, 16);
+        int     last = PED_MAX (largest_partnum, 16);
         int     i;
 
         sync();
-- 
1.7.7.6




More information about the parted-devel mailing list