diff options
| author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:12 -0600 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:24 -0400 | 
| commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
| tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /common/bootm_os.c | |
| parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) | |
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>
Diffstat (limited to 'common/bootm_os.c')
| -rw-r--r-- | common/bootm_os.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/common/bootm_os.c b/common/bootm_os.c index 86a37cb925a..1feea8af175 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -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", | 
