[PATCH] Make number of GPT partitions a configurable option

Santosh Sivaraj santosh at fossix.org
Tue Jan 7 21:45:39 EST 2014


Theoritically there is no limit for the partitions that can be created
based on EFI/GPT, so make the number of partitions that can be visible
in barebox a configurable option.

Signed-off-by: Santosh Sivaraj <santosh at fossix.org>
---
 common/partitions/Kconfig  | 5 +++++
 common/partitions/parser.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/partitions/Kconfig b/common/partitions/Kconfig
index 90238ad..f3353dd 100644
--- a/common/partitions/Kconfig
+++ b/common/partitions/Kconfig
@@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE
 	depends on PARTITION_DISK_EFI
 	default y
 	bool "EFI: GPT: compare primary and Alternate GPT header for validity"
+
+config MAX_PARTITIONS
+	depends on PARTITION_DISK_EFI
+	int "Maximum of partitions needed to be supported on a GPT"
+	default 8
diff --git a/common/partitions/parser.h b/common/partitions/parser.h
index 8d39452..d1154d7 100644
--- a/common/partitions/parser.h
+++ b/common/partitions/parser.h
@@ -11,7 +11,7 @@
 #include <filetype.h>
 #include <linux/list.h>
 
-#define MAX_PARTITION		8
+#define MAX_PARTITION		CONFIG_MAX_PARTITIONS
 #define MAX_PARTITION_NAME	38
 
 struct partition {
-- 
1.8.4.2
 



More information about the barebox mailing list