]>
Commit | Line | Data |
---|---|---|
78f6622a WD |
1 | /* |
2 | * (C) Copyright 2000 | |
3 | * Wolfgang Denk, DENX Software Engineering, [email protected]. | |
4 | * | |
5 | * See file CREDITS for list of people who contributed to this | |
6 | * project. | |
7 | * | |
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. | |
12 | * | |
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. | |
17 | * | |
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, | |
21 | * MA 02111-1307 USA | |
22 | */ | |
23 | ||
24 | /* | |
25 | * Boot support | |
26 | */ | |
27 | #ifndef _CMD_NVEDIT_H | |
28 | #define _CMD_NVEDIT_H | |
29 | ||
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" \ | |
36 | ), | |
37 | int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
38 | ||
39 | #define CMD_TBL_SETENV MK_CMD_TBL_ENTRY( \ | |
40 | "setenv", 6, CFG_MAXARGS, 0, do_setenv, \ | |
41 | "setenv - set environment variables\n", \ | |
42 | "name value ...\n" \ | |
43 | " - set environment variable 'name' to 'value ...'\n" \ | |
44 | "setenv name\n" \ | |
45 | " - delete environment variable 'name'\n" \ | |
46 | ), | |
47 | int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
48 | ||
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", \ | |
53 | NULL \ | |
54 | ), | |
55 | int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
56 | #else | |
57 | #define CMD_TBL_SAVEENV | |
58 | #endif /* CFG_CMD_ENV */ | |
59 | ||
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" \ | |
66 | "askenv name\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" \ | |
73 | ), | |
74 | int do_askenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
75 | #else | |
76 | #define CMD_TBL_ASKENV | |
77 | #endif /* CFG_CMD_ASKENV */ | |
78 | ||
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", \ | |
83 | "var [...]\n" \ | |
84 | " - run the commands in the environment variable(s) 'var'\n" \ | |
85 | ), | |
86 | int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); | |
87 | #else | |
88 | #define CMD_TBL_RUN | |
89 | #endif /* CFG_CMD_RUN */ | |
90 | ||
91 | #endif /* _CMD_NVEDIT_H */ |