5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 #define CMD_TBL_PRINTENV MK_CMD_TBL_ENTRY( \
31 "printenv", 4, CFG_MAXARGS, 1, do_printenv, \
32 "printenv- print environment variables\n", \
33 "\n - print values of all environment variables\n" \
34 "printenv name ...\n" \
35 " - print value of environment variable 'name'\n" \
37 int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
39 #define CMD_TBL_SETENV MK_CMD_TBL_ENTRY( \
40 "setenv", 6, CFG_MAXARGS, 0, do_setenv, \
41 "setenv - set environment variables\n", \
43 " - set environment variable 'name' to 'value ...'\n" \
45 " - delete environment variable 'name'\n" \
47 int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
49 #if ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == (CFG_CMD_ENV|CFG_CMD_FLASH))
50 #define CMD_TBL_SAVEENV MK_CMD_TBL_ENTRY( \
51 "saveenv", 4, 1, 0, do_saveenv, \
52 "saveenv - save environment variables to persistent storage\n", \
55 int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
57 #define CMD_TBL_SAVEENV
58 #endif /* CFG_CMD_ENV */
60 #if (CONFIG_COMMANDS & CFG_CMD_ASKENV)
61 #define CMD_TBL_ASKENV MK_CMD_TBL_ENTRY( \
62 "askenv", 8, CFG_MAXARGS, 1, do_askenv, \
63 "askenv - get environment variables from stdin\n", \
64 "name [message] [size]\n" \
65 " - get environment variable 'name' from stdin (max 'size' chars)\n" \
67 " - get environment variable 'name' from stdin\n" \
68 "askenv name size\n" \
69 " - get environment variable 'name' from stdin (max 'size' chars)\n" \
70 "askenv name [message] size\n" \
71 " - display 'message' string and get environment variable 'name'" \
72 "from stdin (max 'size' chars)\n" \
74 int do_askenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
76 #define CMD_TBL_ASKENV
77 #endif /* CFG_CMD_ASKENV */
79 #if (CONFIG_COMMANDS & CFG_CMD_RUN)
80 #define CMD_TBL_RUN MK_CMD_TBL_ENTRY( \
81 "run", 3, CFG_MAXARGS, 1, do_run, \
82 "run - run commands in an environment variable\n", \
84 " - run the commands in the environment variable(s) 'var'\n" \
86 int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
89 #endif /* CFG_CMD_RUN */
91 #endif /* _CMD_NVEDIT_H */