Skip to content
Snippets Groups Projects
Commit 36c9169a authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

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.

Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent 864aa034
No related branches found
No related tags found
No related merge requests found
...@@ -137,14 +137,12 @@ ...@@ -137,14 +137,12 @@
#if defined(MTDIDS_DEFAULT) #if defined(MTDIDS_DEFAULT)
static const char *const mtdids_default = MTDIDS_DEFAULT; static const char *const mtdids_default = MTDIDS_DEFAULT;
#else #else
#warning "MTDIDS_DEFAULT not defined!"
static const char *const mtdids_default = NULL; static const char *const mtdids_default = NULL;
#endif #endif
#if defined(MTDPARTS_DEFAULT) #if defined(MTDPARTS_DEFAULT)
static const char *const mtdparts_default = MTDPARTS_DEFAULT; static const char *const mtdparts_default = MTDPARTS_DEFAULT;
#else #else
#warning "MTDPARTS_DEFAULT not defined!"
static const char *const mtdparts_default = NULL; static const char *const mtdparts_default = NULL;
#endif #endif
...@@ -1264,8 +1262,10 @@ static void list_partitions(void) ...@@ -1264,8 +1262,10 @@ static void list_partitions(void)
} }
printf("\ndefaults:\n"); printf("\ndefaults:\n");
printf("mtdids : %s\n", mtdids_default); printf("mtdids : %s\n",
printf("mtdparts: %s\n", mtdparts_default); mtdids_default ? mtdids_default : "none");
printf("mtdparts: %s\n",
mtdparts_default ? mtdparts_default : "none");
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment