From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Thu, 5 Sep 2019 17:21:21 +0900 Subject: [U-Boot] [PATCH v5 07/19] api: converted with new env interfaces In-Reply-To: <20190905082133.18996-1-takahiro.akashi@linaro.org> References: <20190905082133.18996-1-takahiro.akashi@linaro.org> Message-ID: <20190905082133.18996-8-takahiro.akashi@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de env_xxx(...) -> env_xxx(ctx_uboot, ...) Signed-off-by: AKASHI Takahiro --- 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