diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_boot.c | 2 | ||||
-rw-r--r-- | common/cmd_bootm.c | 1 | ||||
-rw-r--r-- | common/cmd_date.c | 8 | ||||
-rw-r--r-- | common/cmd_fdc.c | 4 | ||||
-rw-r--r-- | common/cmd_fdos.c | 3 | ||||
-rw-r--r-- | common/cmd_ide.c | 3 | ||||
-rw-r--r-- | common/cmd_itest.c | 8 | ||||
-rw-r--r-- | common/cmd_mii.c | 68 | ||||
-rw-r--r-- | common/cmd_nand.c | 5 | ||||
-rw-r--r-- | common/cmd_net.c | 4 | ||||
-rw-r--r-- | common/cmd_nvedit.c | 20 | ||||
-rw-r--r-- | common/cmd_scsi.c | 3 | ||||
-rw-r--r-- | common/cmd_usb.c | 3 | ||||
-rw-r--r-- | common/command.c | 24 | ||||
-rw-r--r-- | common/console.c | 4 | ||||
-rw-r--r-- | common/hush.c | 8 | ||||
-rw-r--r-- | common/image.c | 14 | ||||
-rw-r--r-- | common/main.c | 10 | ||||
-rw-r--r-- | common/stdio.c | 4 |
19 files changed, 69 insertions, 127 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c index 72dacaa..7b603d3 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -67,8 +67,6 @@ U_BOOT_CMD( " passing 'arg' as arguments" ); -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - U_BOOT_CMD( reset, 1, 0, do_reset, "Perform RESET of the CPU", diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 1a024f1..9873ee7 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -93,7 +93,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify); static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len); -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* * Continue booting an OS image; caller already has: diff --git a/common/cmd_date.c b/common/cmd_date.c index 8dbf16d..f0fa02a 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -31,7 +31,7 @@ DECLARE_GLOBAL_DATA_PTR; -const char *weekdays[] = { +static const char * const weekdays[] = { "Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur", }; @@ -41,7 +41,7 @@ const char *weekdays[] = { #define RELOC(a) a #endif -int mk_date (char *, struct rtc_time *); +int mk_date (const char *, struct rtc_time *); int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { @@ -106,7 +106,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * simple conversion of two-digit string with error checking */ -static int cnvrt2 (char *str, int *valp) +static int cnvrt2 (const char *str, int *valp) { int val; @@ -131,7 +131,7 @@ static int cnvrt2 (char *str, int *valp) * Some basic checking for valid values is done, but this will not catch * all possible error conditions. */ -int mk_date (char *datestr, struct rtc_time *tmp) +int mk_date (const char *datestr, struct rtc_time *tmp) { int len, val; char *ptr; diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 831a07f..d373480 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -721,7 +721,6 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) image_header_t *hdr; /* used for fdc boot */ unsigned char boot_drive; int i,nrofblk; - char *ep; int rcode = 0; #if defined(CONFIG_FIT) const void *fit_hdr = NULL; @@ -824,9 +823,8 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) load_addr = addr; /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm (cmd_tbl_t *, int, int, char *[]); local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c index a8822d9..238abdd 100644 --- a/common/cmd_fdos.c +++ b/common/cmd_fdos.c @@ -99,9 +99,8 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) size, load_addr); /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm (cmd_tbl_t *, int, int, char *[]); local_args[0] = argv[0]; local_args[1] = NULL; printf ("Automatic boot of image at addr 0x%08lX ...\n", load_addr); diff --git a/common/cmd_ide.c b/common/cmd_ide.c index ea0f4a7..f627881 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -496,9 +496,8 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) load_addr = addr; /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm (cmd_tbl_t *, int, int, char *[]); local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_itest.c b/common/cmd_itest.c index 8dd8927..fa6a0c3 100644 --- a/common/cmd_itest.c +++ b/common/cmd_itest.c @@ -46,7 +46,7 @@ struct op_tbl_s { typedef struct op_tbl_s op_tbl_t; -op_tbl_t op_table [] = { +static const op_tbl_t op_table [] = { { "-lt", LT }, { "<" , LT }, { "-gt", GT }, @@ -62,8 +62,6 @@ op_tbl_t op_table [] = { { "<=" , LE }, }; -#define op_tbl_size (sizeof(op_table)/sizeof(op_table[0])) - static long evalexp(char *s, int w) { long l = 0; @@ -138,12 +136,12 @@ static int arithcomp (char *s, char *t, int op, int w) int binary_test (char *op, char *arg1, char *arg2, int w) { int len, i; - op_tbl_t *optp; + const op_tbl_t *optp; len = strlen(op); for (optp = (op_tbl_t *)&op_table, i = 0; - i < op_tbl_size; + i < ARRAY_SIZE(op_table); optp++, i++) { if ((strncmp (op, optp->op, len) == 0) && (len == strlen (optp->op))) { diff --git a/common/cmd_mii.c b/common/cmd_mii.c index 3ea493b..3fb0795 100644 --- a/common/cmd_mii.c +++ b/common/cmd_mii.c @@ -34,7 +34,7 @@ typedef struct _MII_reg_desc_t { char * name; } MII_reg_desc_t; -MII_reg_desc_t reg_0_5_desc_tbl[] = { +static const MII_reg_desc_t reg_0_5_desc_tbl[] = { { 0, "PHY control register" }, { 1, "PHY status register" }, { 2, "PHY ID 1 register" }, @@ -50,7 +50,7 @@ typedef struct _MII_field_desc_t { char * name; } MII_field_desc_t; -MII_field_desc_t reg_0_desc_tbl[] = { +static const MII_field_desc_t reg_0_desc_tbl[] = { { 15, 15, 0x01, "reset" }, { 14, 14, 0x01, "loopback" }, { 13, 6, 0x81, "speed selection" }, /* special */ @@ -63,7 +63,7 @@ MII_field_desc_t reg_0_desc_tbl[] = { { 5, 0, 0x3f, "(reserved)" } }; -MII_field_desc_t reg_1_desc_tbl[] = { +static const MII_field_desc_t reg_1_desc_tbl[] = { { 15, 15, 0x01, "100BASE-T4 able" }, { 14, 14, 0x01, "100BASE-X full duplex able" }, { 13, 13, 0x01, "100BASE-X half duplex able" }, @@ -82,17 +82,17 @@ MII_field_desc_t reg_1_desc_tbl[] = { { 0, 0, 0x01, "extended capabilities" }, }; -MII_field_desc_t reg_2_desc_tbl[] = { +static const MII_field_desc_t reg_2_desc_tbl[] = { { 15, 0, 0xffff, "OUI portion" }, }; -MII_field_desc_t reg_3_desc_tbl[] = { +static const MII_field_desc_t reg_3_desc_tbl[] = { { 15, 10, 0x3f, "OUI portion" }, { 9, 4, 0x3f, "manufacturer part number" }, { 3, 0, 0x0f, "manufacturer rev. number" }, }; -MII_field_desc_t reg_4_desc_tbl[] = { +static const MII_field_desc_t reg_4_desc_tbl[] = { { 15, 15, 0x01, "next page able" }, { 14, 14, 0x01, "reserved" }, { 13, 13, 0x01, "remote fault" }, @@ -107,7 +107,7 @@ MII_field_desc_t reg_4_desc_tbl[] = { { 4, 0, 0x1f, "xxx to do" }, }; -MII_field_desc_t reg_5_desc_tbl[] = { +static const MII_field_desc_t reg_5_desc_tbl[] = { { 15, 15, 0x01, "next page able" }, { 14, 14, 0x01, "acknowledge" }, { 13, 13, 0x01, "remote fault" }, @@ -121,39 +121,31 @@ MII_field_desc_t reg_5_desc_tbl[] = { { 5, 5, 0x01, "10BASE-T able" }, { 4, 0, 0x1f, "xxx to do" }, }; - -#define DESC0LEN (sizeof(reg_0_desc_tbl)/sizeof(reg_0_desc_tbl[0])) -#define DESC1LEN (sizeof(reg_1_desc_tbl)/sizeof(reg_1_desc_tbl[0])) -#define DESC2LEN (sizeof(reg_2_desc_tbl)/sizeof(reg_2_desc_tbl[0])) -#define DESC3LEN (sizeof(reg_3_desc_tbl)/sizeof(reg_3_desc_tbl[0])) -#define DESC4LEN (sizeof(reg_4_desc_tbl)/sizeof(reg_4_desc_tbl[0])) -#define DESC5LEN (sizeof(reg_5_desc_tbl)/sizeof(reg_5_desc_tbl[0])) - typedef struct _MII_field_desc_and_len_t { - MII_field_desc_t * pdesc; + const MII_field_desc_t *pdesc; ushort len; } MII_field_desc_and_len_t; -MII_field_desc_and_len_t desc_and_len_tbl[] = { - { reg_0_desc_tbl, DESC0LEN }, - { reg_1_desc_tbl, DESC1LEN }, - { reg_2_desc_tbl, DESC2LEN }, - { reg_3_desc_tbl, DESC3LEN }, - { reg_4_desc_tbl, DESC4LEN }, - { reg_5_desc_tbl, DESC5LEN }, +static const MII_field_desc_and_len_t desc_and_len_tbl[] = { + { reg_0_desc_tbl, ARRAY_SIZE(reg_0_desc_tbl) }, + { reg_1_desc_tbl, ARRAY_SIZE(reg_1_desc_tbl) }, + { reg_2_desc_tbl, ARRAY_SIZE(reg_2_desc_tbl) }, + { reg_3_desc_tbl, ARRAY_SIZE(reg_3_desc_tbl) }, + { reg_4_desc_tbl, ARRAY_SIZE(reg_4_desc_tbl) }, + { reg_5_desc_tbl, ARRAY_SIZE(reg_5_desc_tbl) }, }; static void dump_reg( ushort regval, - MII_reg_desc_t * prd, - MII_field_desc_and_len_t * pdl); + const MII_reg_desc_t *prd, + const MII_field_desc_and_len_t *pdl); static int special_field( ushort regno, - MII_field_desc_t * pdesc, + const MII_field_desc_t *pdesc, ushort regval); -void MII_dump_0_to_5( +static void MII_dump_0_to_5( ushort regvals[6], uchar reglo, uchar reghi) @@ -169,12 +161,12 @@ void MII_dump_0_to_5( static void dump_reg( ushort regval, - MII_reg_desc_t * prd, - MII_field_desc_and_len_t * pdl) + const MII_reg_desc_t *prd, + const MII_field_desc_and_len_t *pdl) { ulong i; ushort mask_in_place; - MII_field_desc_t * pdesc; + const MII_field_desc_t *pdesc; printf("%u. (%04hx) -- %s --\n", prd->regno, regval, prd->name); @@ -217,7 +209,7 @@ static void dump_reg( static int special_field( ushort regno, - MII_field_desc_t * pdesc, + const MII_field_desc_t *pdesc, ushort regval) { if ((regno == 0) && (pdesc->lo == 6)) { @@ -268,12 +260,12 @@ static int special_field( return 0; } -char last_op[2]; -uint last_data; -uint last_addr_lo; -uint last_addr_hi; -uint last_reg_lo; -uint last_reg_hi; +static char last_op[2]; +static uint last_data; +static uint last_addr_lo; +static uint last_addr_hi; +static uint last_reg_lo; +static uint last_reg_hi; static void extract_range( char * input, @@ -292,7 +284,7 @@ static void extract_range( } /* ---------------------------------------------------------------- */ -int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) +static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char op[2]; unsigned char addrlo, addrhi, reglo, reghi; diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 634d036..c547a68 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -711,7 +711,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, ulong offset, ulong addr, char *cmd) { int r; - char *ep, *s; + char *s; size_t cnt; image_header_t *hdr; #if defined(CONFIG_FIT) @@ -787,9 +787,8 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, load_addr = addr; /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm(cmd_tbl_t *, int, int, char *[]); local_args[0] = cmd; local_args[1] = NULL; diff --git a/common/cmd_net.c b/common/cmd_net.c index 44d17db..973fa21 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -28,8 +28,6 @@ #include <command.h> #include <net.h> -extern int do_bootm (cmd_tbl_t *, int, int, char * const []); - static int netboot_common (proto_t, cmd_tbl_t *, int , char * const []); int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) @@ -213,7 +211,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char * const argv[]) flush_cache(load_addr, size); /* Loading ok, check if we should attempt an auto-start */ - if (((s = getenv("autostart")) != NULL) && (strcmp(s,"yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index dcc93c1..c3b57f2 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -883,29 +883,32 @@ U_BOOT_CMD( */ #if defined(CONFIG_CMD_EDITENV) -U_BOOT_CMD( +U_BOOT_CMD_COMPLETE( editenv, 2, 0, do_env_edit, "edit environment variable", "name\n" - " - edit environment variable 'name'" + " - edit environment variable 'name'", + var_complete ); #endif -U_BOOT_CMD( +U_BOOT_CMD_COMPLETE( printenv, CONFIG_SYS_MAXARGS, 1, do_env_print, "print environment variables", "\n - print values of all environment variables\n" "printenv name ...\n" - " - print value of environment variable 'name'" + " - print value of environment variable 'name'", + var_complete ); -U_BOOT_CMD( +U_BOOT_CMD_COMPLETE( setenv, CONFIG_SYS_MAXARGS, 0, do_env_set, "set environment variables", "name value ...\n" " - set environment variable 'name' to 'value ...'\n" "setenv name\n" - " - delete environment variable 'name'" + " - delete environment variable 'name'", + var_complete ); #if defined(CONFIG_CMD_ASKENV) @@ -926,10 +929,11 @@ U_BOOT_CMD( #endif #if defined(CONFIG_CMD_RUN) -U_BOOT_CMD( +U_BOOT_CMD_COMPLETE( run, CONFIG_SYS_MAXARGS, 1, do_run, "run commands in an environment variable", "var [...]\n" - " - run the commands in the environment variable(s) 'var'" + " - run the commands in the environment variable(s) 'var'", + var_complete ); #endif diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index 6b937f9..63a46de 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -327,9 +327,8 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flush_cache (addr, (cnt+1)*info.blksz); /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm (cmd_tbl_t *, int, int, char *[]); local_args[0] = argv[0]; local_args[1] = NULL; printf ("Automatic boot of image at addr 0x%08lX ...\n", addr); diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 226ea0d..8439198 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -488,9 +488,8 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flush_cache(addr, (cnt+1)*info.blksz); /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) { + if (getenv_yesno("autostart")) { char *local_args[2]; - extern int do_bootm(cmd_tbl_t *, int, int, char *[]); local_args[0] = argv[0]; local_args[1] = NULL; printf("Automatic boot of image at addr 0x%08lX ...\n", addr); diff --git a/common/command.c b/common/command.c index 0b1a3fb..ef4a081 100644 --- a/common/command.c +++ b/common/command.c @@ -177,30 +177,6 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char * return 0; } -static void install_auto_complete_handler(const char *cmd, - int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])) -{ - cmd_tbl_t *cmdtp; - - cmdtp = find_cmd(cmd); - if (cmdtp == NULL) - return; - - cmdtp->complete = complete; -} - -void install_auto_complete(void) -{ -#if defined(CONFIG_CMD_EDITENV) - install_auto_complete_handler("editenv", var_complete); -#endif - install_auto_complete_handler("printenv", var_complete); - install_auto_complete_handler("setenv", var_complete); -#if defined(CONFIG_CMD_RUN) - install_auto_complete_handler("run", var_complete); -#endif -} - /*************************************************************************************/ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]) diff --git a/common/console.c b/common/console.c index 7e01886..8c650e0 100644 --- a/common/console.c +++ b/common/console.c @@ -479,7 +479,7 @@ inline void dbg(const char *fmt, ...) /** U-Boot INIT FUNCTIONS *************************************************/ -struct stdio_dev *search_device(int flags, char *name) +struct stdio_dev *search_device(int flags, const char *name) { struct stdio_dev *dev; @@ -491,7 +491,7 @@ struct stdio_dev *search_device(int flags, char *name) return NULL; } -int console_assign(int file, char *devname) +int console_assign(int file, const char *devname) { int flag; struct stdio_dev *dev; diff --git a/common/hush.c b/common/hush.c index 2188fd4..8021a68 100644 --- a/common/hush.c +++ b/common/hush.c @@ -93,8 +93,6 @@ #include <common.h> /* readline */ #include <hush.h> #include <command.h> /* find_cmd */ -/*cmd_boot.c*/ -extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* do_bootd */ #endif #ifndef __U_BOOT__ #include <ctype.h> /* isalpha, isdigit */ @@ -1023,9 +1021,7 @@ static void get_user_input(struct in_str *i) static char the_command[CONFIG_SYS_CBSIZE]; #ifdef CONFIG_BOOT_RETRY_TIME -# ifdef CONFIG_RESET_TO_RETRY - extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); -# else +# ifndef CONFIG_RESET_TO_RETRY # error "This currently only works with CONFIG_RESET_TO_RETRY enabled" # endif reset_cmd_timeout(); @@ -1681,8 +1677,6 @@ static int run_pipe_real(struct pipe *pi) } else { int rcode; #if defined(CONFIG_CMD_BOOTD) - extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - /* avoid "bootd" recursion */ if (cmdtp->cmd == do_bootd) { if (flag & CMD_FLAG_BOOTD) { diff --git a/common/image.c b/common/image.c index 42f5b79..f63a2ff 100644 --- a/common/image.c +++ b/common/image.c @@ -74,7 +74,7 @@ static const image_header_t* image_get_ramdisk (ulong rd_addr, uint8_t arch, #include <image.h> #endif /* !USE_HOSTCC*/ -static table_entry_t uimage_arch[] = { +static const table_entry_t uimage_arch[] = { { IH_ARCH_INVALID, NULL, "Invalid ARCH", }, { IH_ARCH_ALPHA, "alpha", "Alpha", }, { IH_ARCH_ARM, "arm", "ARM", }, @@ -96,7 +96,7 @@ static table_entry_t uimage_arch[] = { { -1, "", "", }, }; -static table_entry_t uimage_os[] = { +static const table_entry_t uimage_os[] = { { IH_OS_INVALID, NULL, "Invalid OS", }, { IH_OS_LINUX, "linux", "Linux", }, #if defined(CONFIG_LYNXKDI) || defined(USE_HOSTCC) @@ -129,7 +129,7 @@ static table_entry_t uimage_os[] = { { -1, "", "", }, }; -static table_entry_t uimage_type[] = { +static const table_entry_t uimage_type[] = { { IH_TYPE_INVALID, NULL, "Invalid Image", }, { IH_TYPE_FILESYSTEM, "filesystem", "Filesystem Image", }, { IH_TYPE_FIRMWARE, "firmware", "Firmware", }, @@ -144,7 +144,7 @@ static table_entry_t uimage_type[] = { { -1, "", "", }, }; -static table_entry_t uimage_comp[] = { +static const table_entry_t uimage_comp[] = { { IH_COMP_NONE, "none", "uncompressed", }, { IH_COMP_BZIP2, "bzip2", "bzip2 compressed", }, { IH_COMP_GZIP, "gzip", "gzip compressed", }, @@ -516,7 +516,7 @@ static void genimg_print_time (time_t timestamp) * long entry name if translation succeeds * msg otherwise */ -char *get_table_entry_name (table_entry_t *table, char *msg, int id) +char *get_table_entry_name(const table_entry_t *table, char *msg, int id) { for (; table->id >= 0; ++table) { if (table->id == id) @@ -563,10 +563,10 @@ const char *genimg_get_comp_name (uint8_t comp) * entry id if translation succeeds * -1 otherwise */ -int get_table_entry_id (table_entry_t *table, +int get_table_entry_id(const table_entry_t *table, const char *table_name, const char *name) { - table_entry_t *t; + const table_entry_t *t; #ifdef USE_HOSTCC int first = 1; diff --git a/common/main.c b/common/main.c index d97ccd7..42f4d02 100644 --- a/common/main.c +++ b/common/main.c @@ -50,12 +50,6 @@ DECLARE_GLOBAL_DATA_PTR; void inline __show_boot_progress (int val) {} void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress"))); -#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY) -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); /* for do_reset() prototype */ -#endif - -extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - #if defined(CONFIG_UPDATE_TFTP) void update_tftp (void); #endif /* CONFIG_UPDATE_TFTP */ @@ -342,10 +336,6 @@ void main_loop (void) hush_init_var (); #endif -#ifdef CONFIG_AUTO_COMPLETE - install_auto_complete(); -#endif - #ifdef CONFIG_PREBOOT if ((p = getenv ("preboot")) != NULL) { # ifdef CONFIG_AUTOBOOT_KEYED diff --git a/common/stdio.c b/common/stdio.c index ab7c5ab..b20772c 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -105,7 +105,7 @@ struct list_head* stdio_get_list(void) return &(devs.list); } -struct stdio_dev* stdio_get_by_name(char* name) +struct stdio_dev* stdio_get_by_name(const char *name) { struct list_head *pos; struct stdio_dev *dev; @@ -155,7 +155,7 @@ int stdio_register (struct stdio_dev * dev) * returns 0 if success, -1 if device is assigned and 1 if devname not found */ #ifdef CONFIG_SYS_STDIO_DEREGISTER -int stdio_deregister(char *devname) +int stdio_deregister(const char *devname) { int l; struct list_head *pos; |