]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
cmd_mtdparts.c: allow to omit definitions for default settings
authorWolfgang Denk <wd@denx.de>
Sun, 17 May 2009 14:01:54 +0000 (16:01 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:45:48 +0000 (20:45 +0200)
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>
common/cmd_mtdparts.c

index 84108c244689e959f5a7dbdfce7b36c921f57a9d..8bd1db7d2765065732ee3a0b1135018502ce0d0e 100644 (file)
 #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");
 }
 
 /**