diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/fdt.c | 11 | ||||
-rw-r--r-- | cmd/log.c | 4 |
2 files changed, 10 insertions, 5 deletions
@@ -21,7 +21,6 @@ #define MAX_LEVEL 32 /* how deeply nested we will go */ #define SCRATCHPAD 1024 /* bytes of scratchpad memory */ -#define CMD_FDT_MAX_DUMP 64 /* * Global data (for the gd->bd) @@ -934,11 +933,17 @@ static int is_printable_string(const void *data, int len) static void print_data(const void *data, int len) { int j; + const char *env_max_dump; + ulong max_dump = ULONG_MAX; /* no data, don't print */ if (len == 0) return; + env_max_dump = env_get("fdt_max_dump"); + if (env_max_dump) + max_dump = simple_strtoul(env_max_dump, NULL, 16); + /* * It is a string, but it may have multiple strings (embedded '\0's). */ @@ -957,7 +962,7 @@ static void print_data(const void *data, int len) } if ((len %4) == 0) { - if (len > CMD_FDT_MAX_DUMP) + if (len > max_dump) printf("* 0x%p [0x%08x]", data, len); else { const __be32 *p; @@ -969,7 +974,7 @@ static void print_data(const void *data, int len) printf(">"); } } else { /* anything else... hexdump */ - if (len > CMD_FDT_MAX_DUMP) + if (len > max_dump) printf("* 0x%p [0x%08x]", data, len); else { const u8 *s; @@ -39,7 +39,7 @@ static int do_log_format(struct cmd_tbl *cmdtp, int flag, int argc, const char *str = argv[1]; if (!strcmp(str, "default")) { - gd->log_fmt = LOGF_DEFAULT; + gd->log_fmt = log_get_default_format(); } else if (!strcmp(str, "all")) { gd->log_fmt = LOGF_ALL; } else { @@ -139,7 +139,7 @@ static char log_help_text[] = "log format <fmt> - set log output format. <fmt> is a string where\n" "\teach letter indicates something that should be displayed:\n" "\tc=category, l=level, F=file, L=line number, f=function, m=msg\n" - "\tor 'default', equivalent to 'fm', or 'all' for all\n" + "\tor 'default', or 'all' for all\n" "log rec <category> <level> <file> <line> <func> <message> - " "output a log record" ; |