summaryrefslogtreecommitdiff
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /common/cmd_nvedit.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c60
1 files changed, 59 insertions, 1 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 3c2a553..9cf8b90 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -43,7 +43,6 @@
#include <command.h>
#include <environment.h>
#include <watchdog.h>
-#include <cmd_nvedit.h>
#include <linux/stddef.h>
#include <asm/byteorder.h>
#if (CONFIG_COMMANDS & CFG_CMD_NET)
@@ -534,6 +533,8 @@ int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return (saveenv() ? 1 : 0);
}
+
+
#endif
@@ -556,3 +557,60 @@ envmatch (uchar *s1, int i2)
return(i2);
return(-1);
}
+
+
+/**************************************************/
+
+cmd_tbl_t U_BOOT_CMD(PRINTENV) = MK_CMD_ENTRY(
+ "printenv", CFG_MAXARGS, 1, do_printenv,
+ "printenv- print environment variables\n",
+ "\n - print values of all environment variables\n"
+ "printenv name ...\n"
+ " - print value of environment variable 'name'\n"
+);
+
+cmd_tbl_t U_BOOT_CMD(SETENV) = MK_CMD_ENTRY(
+ "setenv", CFG_MAXARGS, 0, do_setenv,
+ "setenv - set environment variables\n",
+ "name value ...\n"
+ " - set environment variable 'name' to 'value ...'\n"
+ "setenv name\n"
+ " - delete environment variable 'name'\n"
+);
+
+#if ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == (CFG_CMD_ENV|CFG_CMD_FLASH))
+
+cmd_tbl_t U_BOOT_CMD(SAVEENV) = MK_CMD_ENTRY(
+ "saveenv", 1, 0, do_saveenv,
+ "saveenv - save environment variables to persistent storage\n",
+ NULL
+);
+
+#endif /* CFG_CMD_ENV */
+
+#if (CONFIG_COMMANDS & CFG_CMD_ASKENV)
+
+cmd_tbl_t U_BOOT_CMD(ASKENV) = MK_CMD_ENTRY(
+ "askenv", CFG_MAXARGS, 1, do_askenv,
+ "askenv - get environment variables from stdin\n",
+ "name [message] [size]\n"
+ " - get environment variable 'name' from stdin (max 'size' chars)\n"
+ "askenv name\n"
+ " - get environment variable 'name' from stdin\n"
+ "askenv name size\n"
+ " - get environment variable 'name' from stdin (max 'size' chars)\n"
+ "askenv name [message] size\n"
+ " - display 'message' string and get environment variable 'name'"
+ "from stdin (max 'size' chars)\n"
+);
+#endif /* CFG_CMD_ASKENV */
+
+#if (CONFIG_COMMANDS & CFG_CMD_RUN)
+int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+cmd_tbl_t U_BOOT_CMD(RUN) = MK_CMD_ENTRY(
+ "run", CFG_MAXARGS, 1, do_run,
+ "run - run commands in an environment variable\n",
+ "var [...]\n"
+ " - run the commands in the environment variable(s) 'var'\n"
+);
+#endif /* CFG_CMD_RUN */