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

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


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

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

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;
-- 
2.21.0



More information about the U-Boot mailing list