mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fd1e959e91
commit
00caae6d47
213 changed files with 531 additions and 502 deletions
|
@ -21,7 +21,7 @@ static int do_bootm_standalone(int flag, int argc, char * const argv[],
|
|||
int (*appl)(int, char *const[]);
|
||||
|
||||
/* Don't start if "autostart" is set to "no" */
|
||||
s = getenv("autostart");
|
||||
s = env_get("autostart");
|
||||
if ((s != NULL) && !strcmp(s, "no")) {
|
||||
env_set_hex("filesize", images->os.image_len);
|
||||
return 0;
|
||||
|
@ -96,7 +96,7 @@ static int do_bootm_netbsd(int flag, int argc, char * const argv[],
|
|||
cmdline = malloc(len);
|
||||
copy_args(cmdline, argc, argv, ' ');
|
||||
} else {
|
||||
cmdline = getenv("bootargs");
|
||||
cmdline = env_get("bootargs");
|
||||
if (cmdline == NULL)
|
||||
cmdline = "";
|
||||
}
|
||||
|
@ -227,14 +227,14 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[],
|
|||
#endif
|
||||
|
||||
/* See README.plan9 */
|
||||
s = getenv("confaddr");
|
||||
s = env_get("confaddr");
|
||||
if (s != NULL) {
|
||||
char *confaddr = (char *)simple_strtoul(s, NULL, 16);
|
||||
|
||||
if (argc > 0) {
|
||||
copy_args(confaddr, argc, argv, '\n');
|
||||
} else {
|
||||
s = getenv("bootargs");
|
||||
s = env_get("bootargs");
|
||||
if (s != NULL)
|
||||
strcpy(confaddr, s);
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ void do_bootvx_fdt(bootm_headers_t *images)
|
|||
|
||||
ret = fdt_add_subnode(*of_flat_tree, 0, "chosen");
|
||||
if ((ret >= 0 || ret == -FDT_ERR_EXISTS)) {
|
||||
bootline = getenv("bootargs");
|
||||
bootline = env_get("bootargs");
|
||||
if (bootline) {
|
||||
ret = fdt_find_and_setprop(*of_flat_tree,
|
||||
"/chosen", "bootargs",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue