Commit 3ca9122feccee939904f1dbc8a422cfb1533785f

Authored by Stefan Roese
1 parent 4819fad905
Exists in master and in 55 other branches 8qm-imx_v2020.04_5.4.70_2.3.0, emb_lf_v2022.04, emb_lf_v2023.04, imx_v2015.04_4.1.15_1.0.0_ga, pitx_8mp_lf_v2020.04, smarc-8m-android-10.0.0_2.6.0, smarc-8m-android-11.0.0_2.0.0, smarc-8mp-android-11.0.0_2.0.0, smarc-emmc-imx_v2014.04_3.10.53_1.1.0_ga, smarc-emmc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx-l5.0.0_1.0.0-ga, smarc-imx6_v2018.03_4.14.98_2.0.0_ga, smarc-imx7_v2017.03_4.9.11_1.0.0_ga, smarc-imx7_v2018.03_4.14.98_2.0.0_ga, smarc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx_v2015.04_4.1.15_1.0.0_ga, smarc-imx_v2017.03_4.9.11_1.0.0_ga, smarc-imx_v2017.03_4.9.88_2.0.0_ga, smarc-imx_v2017.03_o8.1.0_1.3.0_8m, smarc-imx_v2018.03_4.14.78_1.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_2.0.0_ga, smarc_8m-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8m-imx_v2019.04_4.19.35_1.1.0, smarc_8m_00d0-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2019.04_4.19.35_1.1.0, smarc_8mm-imx_v2020.04_5.4.24_2.1.0, smarc_8mp_lf_v2020.04, smarc_8mq-imx_v2020.04_5.4.24_2.1.0, smarc_8mq_lf_v2020.04, ti-u-boot-2015.07, u-boot-2013.01.y, v2013.10, v2013.10-smarct33, v2013.10-smartmen, v2014.01, v2014.04, v2014.04-smarct33, v2014.04-smarct33-emmc, v2014.04-smartmen, v2014.07, v2014.07-smarct33, v2014.07-smartmen, v2015.07-smarct33, v2015.07-smarct33-emmc, v2015.07-smarct4x, v2016.05-dlt, v2016.05-smarct3x, v2016.05-smarct3x-emmc, v2016.05-smarct4x, v2017.01-smarct3x, v2017.01-smarct3x-emmc, v2017.01-smarct4x

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

... ... @@ -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
... ... @@ -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