summaryrefslogtreecommitdiffstats
path: root/common/cmd_mtdparts.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-05-17 16:01:54 +0200
committerWolfgang Denk <wd@denx.de>2009-06-12 20:45:48 +0200
commit36c9169aa6f79ddf604a3bca64e145654f94888b (patch)
tree940a430b15be6e019bf67c92bd95a3068c4f1ac9 /common/cmd_mtdparts.c
parent864aa034f3a0e10ce710e8bbda171df3cab59414 (diff)
downloadtalos-obmc-uboot-36c9169aa6f79ddf604a3bca64e145654f94888b.tar.gz
talos-obmc-uboot-36c9169aa6f79ddf604a3bca64e145654f94888b.zip
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: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/cmd_mtdparts.c')
-rw-r--r--common/cmd_mtdparts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
index 84108c2446..8bd1db7d27 100644
--- a/common/cmd_mtdparts.c
+++ b/common/cmd_mtdparts.c
@@ -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
@@ -1264,8 +1262,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");
}
/**
OpenPOWER on IntegriCloud