Skip to contentSkip to conversation

cmd_mtdparts.c: allow to omit definitions for default settings

PATCH New Wolfgang Denk 1 participant 2 messages May 17, 2009 – Jun 3, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd_mtdparts.c: allow to omit definitions for default settings

There is actually no good reason to enforce that all board configuations must define default settings for "mtdids" and "mtdparts". Actually this may be difficult to handle, especially on boards where different sizes of flash chips can be fit, so there is no real "default" partition map for all boards.

Lift this arbitrary limitation.

---
 common/cmd_mtdparts.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
common/cmd_mtdparts.c +4 -4
index e7b6acc..bb07fde 100644
@@ -137,14 +137,12 @@
 #if defined(MTDIDS_DEFAULT)
 static const char *const mtdids_default = MTDIDS_DEFAULT;
 #else
-#warning "MTDIDS_DEFAULT not defined!"
 static const char *const mtdids_default = NULL;
 #endif
 
 #if defined(MTDPARTS_DEFAULT)
 static const char *const mtdparts_default = MTDPARTS_DEFAULT;
 #else
-#warning "MTDPARTS_DEFAULT not defined!"
 static const char *const mtdparts_default = NULL;
 #endif
 
@@ -1344,8 +1342,10 @@ static void list_partitions(void)
 	}
 
 	printf("\ndefaults:\n");
-	printf("mtdids  : %s\n", mtdids_default);
-	printf("mtdparts: %s\n", mtdparts_default);
+	printf("mtdids  : %s\n", 
+		mtdids_default ? mtdids_default : "none");
+	printf("mtdparts: %s\n",
+		mtdparts_default ? mtdparts_default : "none");
 }
 
 /**
Signature · 1 line
1.6.0.6
author Applied
#1 lore raw

PATCH 1/1 cmd_mtdparts.c: allow to omit definitions for default settings

Hello,

Quoted 6 lines · In message <[email protected]> you wrote:

There is actually no good reason to enforce that all board configuations must define default settings for "mtdids" and "mtdparts". Actually this may be difficult to handle, especially on boards where different sizes of flash chips can be fit, so there is no real "default" partition map for all boards.

Quoted 6 lines

Lift this arbitrary limitation.

---
 common/cmd_mtdparts.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Applied to next.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Humans do claim a great deal for that particular emotion (love).
	-- Spock, "The Lights of Zetar", stardate 5725.6