[U-Boot] [PATCH v5 15/19] lib: converted with new env interfaces (except efi_loader)

AKASHI Takahiro takahiro.akashi at linaro.org
Thu Sep 5 08:21:29 UTC 2019


env_xxx(...) -> env_xxx(ctx_uboot, ...)

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 lib/efi_loader/efi_console.c | 2 +-
 lib/fdtdec.c                 | 2 +-
 lib/smbios.c                 | 2 +-
 lib/uuid.c                   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index d4765afb9849..902938c9b7f0 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -260,7 +260,7 @@ out:
  */
 static void query_console_size(void)
 {
-	const char *stdout_name = env_get("stdout");
+	const char *stdout_name = env_get(ctx_uboot, "stdout");
 	int rows = 25, cols = 80;
 
 	if (stdout_name && !strcmp(stdout_name, "vidconsole") &&
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 74525c84e7bd..f0642ea61f85 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1541,7 +1541,7 @@ int fdtdec_setup(void)
 # ifndef CONFIG_SPL_BUILD
 	/* Allow the early environment to override the fdt address */
 	gd->fdt_blob = map_sysmem
-		(env_get_ulong("fdtcontroladdr", 16,
+		(env_get_ulong(ctx_uboot, "fdtcontroladdr", 16,
 			       (unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
 # endif
 
diff --git a/lib/smbios.c b/lib/smbios.c
index 7b74971f6878..41a000cbd932 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -113,7 +113,7 @@ static int smbios_write_type1(ulong *current, int handle)
 {
 	struct smbios_type1 *t;
 	int len = sizeof(struct smbios_type1);
-	char *serial_str = env_get("serial#");
+	char *serial_str = env_get(ctx_uboot, "serial#");
 
 	t = map_sysmem(*current, len);
 	memset(t, 0, sizeof(struct smbios_type1));
diff --git a/lib/uuid.c b/lib/uuid.c
index a48e19c06eaf..6498e8d6ac0e 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -299,7 +299,7 @@ int do_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (argc == 1)
 		printf("%s\n", uuid);
 	else
-		env_set(argv[1], uuid);
+		env_set(ctx_uboot, argv[1], uuid);
 
 	return CMD_RET_SUCCESS;
 }
-- 
2.21.0



More information about the U-Boot mailing list