[parted-devel] [PATCH 2/2] libparted: raised dos partition limit from 16 to 64
Phillip Susi
phillsusi at gmail.com
Fri Jan 13 21:21:52 UTC 2012
From: Phillip Susi <psusi at cfl.rr.com>
---
NEWS | 2 ++
libparted/labels/dos.c | 2 +-
tests/t9042-dos-partition-limit.sh | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 194903b..7584c56 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ GNU parted NEWS -*- outline -*-
** New features
+ Increased limit for msdos partitions from 16 to 64
+
parted has improved support for partitionable loopback devices
** Bug fixes
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index cb90b79..f5db5b9 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -103,7 +103,7 @@ static const char MBR_BOOT_CODE[] = {
* (i.e. 1022 is sometimes used to indicate "use LBA").
*/
#define MAX_CHS_CYLINDER 1021
-#define MAX_TOTAL_PART 16
+#define MAX_TOTAL_PART 64
typedef struct _DosRawPartition DosRawPartition;
typedef struct _DosRawTable DosRawTable;
diff --git a/tests/t9042-dos-partition-limit.sh b/tests/t9042-dos-partition-limit.sh
index d19bfd9..3f24d4a 100644
--- a/tests/t9042-dos-partition-limit.sh
+++ b/tests/t9042-dos-partition-limit.sh
@@ -26,7 +26,7 @@ grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null ||
ss=$sector_size_
partition_sectors=256 # sectors per partition
-n_partitions=13 # how many partitions to create
+n_partitions=61 # how many partitions to create
start=2048 # start sector for the first partition
n_sectors=$(($start + n_partitions * partition_sectors))
--
1.7.5.4
More information about the parted-devel
mailing list