diff mbox series

[U-Boot,v5,07/19] api: converted with new env interfaces

Message ID 20190905082133.18996-8-takahiro.akashi@linaro.org
State Changes Requested, archived
Delegated to: Heinrich Schuchardt
Headers show
Series efi_loader: non-volatile variables support | expand

Commit Message

AKASHI Takahiro Sept. 5, 2019, 8:21 a.m. UTC
env_xxx(...) -> env_xxx(ctx_uboot, ...)

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 api/api.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/api/api.c b/api/api.c
index bc9454eb4b63..d1dd8bfc60af 100644
--- a/api/api.c
+++ b/api/api.c
@@ -458,7 +458,8 @@  static int API_env_get(va_list ap)
 	if ((value = (char **)va_arg(ap, uintptr_t)) == NULL)
 		return API_EINVAL;
 
-	*value = env_get(name);
+	/* TODO: context */
+	*value = env_get(ctx_uboot, name);
 
 	return 0;
 }
@@ -481,7 +482,8 @@  static int API_env_set(va_list ap)
 	if ((value = (char *)va_arg(ap, uintptr_t)) == NULL)
 		return API_EINVAL;
 
-	env_set(name, value);
+	/* TODO: context */
+	env_set(ctx_uboot, name, value);
 
 	return 0;
 }
@@ -663,7 +665,7 @@  void api_init(void)
 		return;
 	}
 
-	env_set_hex("api_address", (unsigned long)sig);
+	env_set_hex(ctx_uboot, "api_address", (unsigned long)sig);
 	debugf("API sig @ 0x%lX\n", (unsigned long)sig);
 	memcpy(sig->magic, API_SIG_MAGIC, 8);
 	sig->version = API_SIG_VERSION;