X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Fcommand.c;h=0d8bf244be220e02beccc0741847d2f45d5ca285;hb=634fe73eedb9551a13296f356afae67539583f17;hp=e192bb2a619ec5dffe46f4bb0dee7275f8faf35c;hpb=b4ee6daad7a2604ca9466b2ba48de86cc27d381f;p=oweals%2Fu-boot.git diff --git a/common/command.c b/common/command.c index e192bb2a61..0d8bf244be 100644 --- a/common/command.c +++ b/common/command.c @@ -11,6 +11,7 @@ #include #include #include +#include #include /* @@ -356,8 +357,13 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp) int i, j, k, len, seplen, argc; int cnt; char last_char; +#ifdef CONFIG_CMDLINE_PS_SUPPORT + const char *ps_prompt = env_get("PS1"); +#else + const char *ps_prompt = CONFIG_SYS_PROMPT; +#endif - if (strcmp(prompt, CONFIG_SYS_PROMPT) != 0) + if (strcmp(prompt, ps_prompt) != 0) return 0; /* not in normal console */ cnt = strlen(buf); @@ -463,7 +469,7 @@ int cmd_get_data_size(char* arg, int default_size) return 2; case 'l': return 4; -#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA +#ifdef MEM_SUPPORT_64BIT_DATA case 'q': return 8; #endif @@ -490,6 +496,11 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size) for (i = 0; i < size; i++) { ulong addr; + addr = (ulong)(cmdtp->cmd_rep) + gd->reloc_off; + cmdtp->cmd_rep = + (int (*)(struct cmd_tbl_s *, int, int, + char * const [], int *))addr; + addr = (ulong)(cmdtp->cmd) + gd->reloc_off; #ifdef DEBUG_COMMANDS printf("Command \"%s\": 0x%08lx => 0x%08lx\n",