Commit 3ca9122feccee939904f1dbc8a422cfb1533785f
1 parent
4819fad905
Exists in
master
and in
55 other branches
Fix CONFIG_CMDLINE_EDITING implementation
Patch by Stefan Roese, 27 Jul 2006
Showing 2 changed files with 13 additions and 3 deletions Side-by-side Diff
CHANGELOG
... | ... | @@ -2,8 +2,11 @@ |
2 | 2 | Changes since U-Boot 1.1.4: |
3 | 3 | ====================================================================== |
4 | 4 | |
5 | +* Fix CONFIG_CMDLINE_EDITING implementation | |
6 | + Patch by Stefan Roese, 27 Jul 2006 | |
7 | + | |
5 | 8 | * MCC200: set default configuration to low_boot DDR, |
6 | - and support for configurable options high_boot and/or SDRAM. | |
9 | + and support for configurable options high_boot and/or SDRAM. | |
7 | 10 | |
8 | 11 | * Add support for 256 MB SDRAM on CPU87 |
9 | 12 | Patch by Josef Wagner, 25 Nov 2005 |
common/main.c
... | ... | @@ -53,7 +53,6 @@ |
53 | 53 | |
54 | 54 | #define MAX_DELAY_STOP_STR 32 |
55 | 55 | |
56 | -static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen); | |
57 | 56 | static int parse_line (char *, char *[]); |
58 | 57 | #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) |
59 | 58 | static int abortboot(int); |
60 | 59 | |
... | ... | @@ -63,8 +62,11 @@ |
63 | 62 | |
64 | 63 | char console_buffer[CFG_CBSIZE]; /* console I/O buffer */ |
65 | 64 | |
65 | +#ifndef CONFIG_CMDLINE_EDITING | |
66 | +static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen); | |
66 | 67 | static char erase_seq[] = "\b \b"; /* erase sequence */ |
67 | 68 | static char tab_seq[] = " "; /* used to expand TABs */ |
69 | +#endif /* CONFIG_CMDLINE_EDITING */ | |
68 | 70 | |
69 | 71 | #ifdef CONFIG_BOOT_RETRY_TIME |
70 | 72 | static uint64_t endtime = 0; /* must be set, default is instant timeout */ |
... | ... | @@ -641,6 +643,7 @@ |
641 | 643 | return (ret); |
642 | 644 | } |
643 | 645 | |
646 | +#ifndef CONFIG_CMDLINE_EDITING | |
644 | 647 | static void cread_print_hist_list(void) |
645 | 648 | { |
646 | 649 | int i; |
... | ... | @@ -659,6 +662,7 @@ |
659 | 662 | i++; |
660 | 663 | } |
661 | 664 | } |
665 | +#endif /* CONFIG_CMDLINE_EDITING */ | |
662 | 666 | |
663 | 667 | #define BEGINNING_OF_LINE() { \ |
664 | 668 | while (num) { \ |
... | ... | @@ -942,7 +946,8 @@ |
942 | 946 | |
943 | 947 | puts (prompt); |
944 | 948 | |
945 | - return cread_line(p, &len); | |
949 | + cread_line(p, &len); | |
950 | + return len; | |
946 | 951 | #else |
947 | 952 | char *p = console_buffer; |
948 | 953 | int n = 0; /* buffer index */ |
... | ... | @@ -1044,6 +1049,7 @@ |
1044 | 1049 | |
1045 | 1050 | /****************************************************************************/ |
1046 | 1051 | |
1052 | +#ifndef CONFIG_CMDLINE_EDITING | |
1047 | 1053 | static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen) |
1048 | 1054 | { |
1049 | 1055 | char *s; |
... | ... | @@ -1073,6 +1079,7 @@ |
1073 | 1079 | (*np)--; |
1074 | 1080 | return (p); |
1075 | 1081 | } |
1082 | +#endif /* CONFIG_CMDLINE_EDITING */ | |
1076 | 1083 | |
1077 | 1084 | /****************************************************************************/ |
1078 | 1085 |