summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 68c38f4..006131f 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -136,7 +136,8 @@ static int env_print(char *name)
return 0;
}
-int do_env_print (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env_print(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
int i;
int rcode = 0;
@@ -322,7 +323,7 @@ int env_check_apply(const char *name, const char *oldval,
* Set a new environment variable,
* or replace or delete an existing one.
*/
-int _do_env_set(int flag, int argc, char * const argv[])
+static int _do_env_set(int flag, int argc, char * const argv[])
{
int i, len;
char *name, *value, *s;
@@ -435,7 +436,7 @@ int setenv_addr(const char *varname, const void *addr)
}
#ifndef CONFIG_SPL_BUILD
-int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
@@ -514,7 +515,8 @@ int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
* Interactively edit an environment variable
*/
#if defined(CONFIG_CMD_EDITENV)
-int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
char buffer[CONFIG_SYS_CBSIZE];
char *init_val;
@@ -622,7 +624,8 @@ ulong getenv_ulong(const char *name, int base, ulong default_val)
#ifndef CONFIG_SPL_BUILD
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
-int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
printf("Saving Environment to %s...\n", env_name_spec);
@@ -1020,9 +1023,8 @@ static int do_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_USAGE;
}
-U_BOOT_CMD(
- env, CONFIG_SYS_MAXARGS, 1, do_env,
- "environment handling commands",
+#ifdef CONFIG_SYS_LONGHELP
+static char env_help_text[] =
#if defined(CONFIG_CMD_ASKENV)
"ask name [message] [size] - ask for environment variable\nenv "
#endif
@@ -1047,7 +1049,12 @@ U_BOOT_CMD(
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
"env save - save environment\n"
#endif
- "env set [-f] name [arg ...]\n"
+ "env set [-f] name [arg ...]\n";
+#endif
+
+U_BOOT_CMD(
+ env, CONFIG_SYS_MAXARGS, 1, do_env,
+ "environment handling commands", env_help_text
);
/*