From 00caae6d47645e68d6e5277aceb69592b49381a6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Aug 2017 12:22:12 -0600 Subject: 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 Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/x86') diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index aafbeb01f9..00172dc7c1 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -48,15 +48,15 @@ static void build_command_line(char *command_line, int auto_boot) command_line[0] = '\0'; - env_command_line = getenv("bootargs"); + env_command_line = env_get("bootargs"); /* set console= argument if we use a serial console */ if (!strstr(env_command_line, "console=")) { - if (!strcmp(getenv("stdout"), "serial")) { + if (!strcmp(env_get("stdout"), "serial")) { /* We seem to use serial console */ sprintf(command_line, "console=ttyS0,%s ", - getenv("baudrate")); + env_get("baudrate")); } } @@ -285,7 +285,7 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) /* argv[1] holds the address of the bzImage */ s = argv[1]; } else { - s = getenv("fileaddr"); + s = env_get("fileaddr"); } if (s) -- cgit v1.2.3