* [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()"
@ 2025-09-12 22:58 Tom Rini
2025-09-12 23:02 ` Tom Rini
2025-09-14 18:36 ` Osama Abdelkader
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2025-09-12 22:58 UTC (permalink / raw)
To: u-boot; +Cc: Osama Abdelkader
While testing changes, I missed that Gitlab had failed CI with pytest
failures due to this change.
This reverts commit 4c822970d366415e717730606734e815993a70bb.
Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
arch/sandbox/cpu/os.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index adb6b5869469..f5c9a8aecf2e 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -35,7 +35,6 @@
#include <asm/state.h>
#include <os.h>
#include <rtc_def.h>
-#include <env.h>
/* Environment variable for time offset */
#define ENV_TIME_OFFSET "UBOOT_SB_TIME_OFFSET"
@@ -284,7 +283,7 @@ int os_unmap(void *buf, int size)
int os_persistent_file(char *buf, int maxsize, const char *fname)
{
- const char *dirname = env_get("U_BOOT_PERSISTENT_DATA_DIR");
+ const char *dirname = getenv("U_BOOT_PERSISTENT_DATA_DIR");
char *ptr;
int len;
@@ -1015,7 +1014,7 @@ long os_get_time_offset(void)
{
const char *offset;
- offset = env_get(ENV_TIME_OFFSET);
+ offset = getenv(ENV_TIME_OFFSET);
if (offset)
return strtol(offset, NULL, 0);
return 0;
@@ -1133,7 +1132,7 @@ static void *fuzzer_thread(void * ptr)
const char *fuzz_test;
/* Find which test to run from an environment variable. */
- fuzz_test = env_get("UBOOT_SB_FUZZ_TEST");
+ fuzz_test = getenv("UBOOT_SB_FUZZ_TEST");
if (!fuzz_test)
os_abort();
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()"
2025-09-12 22:58 [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()" Tom Rini
@ 2025-09-12 23:02 ` Tom Rini
2025-09-14 18:36 ` Osama Abdelkader
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-09-12 23:02 UTC (permalink / raw)
To: u-boot, Tom Rini; +Cc: Osama Abdelkader
On Fri, 12 Sep 2025 16:58:20 -0600, Tom Rini wrote:
> While testing changes, I missed that Gitlab had failed CI with pytest
> failures due to this change.
>
> This reverts commit 4c822970d366415e717730606734e815993a70bb.
>
>
Applied to u-boot/next, thanks!
[1/1] Revert "sandbox: replace deprecated getenv() with env_get()"
commit: f0c1704f56dba70da93f30131564af777c29c1bd
--
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()"
2025-09-12 22:58 [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()" Tom Rini
2025-09-12 23:02 ` Tom Rini
@ 2025-09-14 18:36 ` Osama Abdelkader
1 sibling, 0 replies; 3+ messages in thread
From: Osama Abdelkader @ 2025-09-14 18:36 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot
On Fri, Sep 12, 2025 at 04:58:20PM -0600, Tom Rini wrote:
> While testing changes, I missed that Gitlab had failed CI with pytest
> failures due to this change.
>
> This reverts commit 4c822970d366415e717730606734e815993a70bb.
>
> Cc: Osama Abdelkader <osama.abdelkader@gmail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> arch/sandbox/cpu/os.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
> index adb6b5869469..f5c9a8aecf2e 100644
> --- a/arch/sandbox/cpu/os.c
> +++ b/arch/sandbox/cpu/os.c
> @@ -35,7 +35,6 @@
> #include <asm/state.h>
> #include <os.h>
> #include <rtc_def.h>
> -#include <env.h>
>
> /* Environment variable for time offset */
> #define ENV_TIME_OFFSET "UBOOT_SB_TIME_OFFSET"
> @@ -284,7 +283,7 @@ int os_unmap(void *buf, int size)
>
> int os_persistent_file(char *buf, int maxsize, const char *fname)
> {
> - const char *dirname = env_get("U_BOOT_PERSISTENT_DATA_DIR");
> + const char *dirname = getenv("U_BOOT_PERSISTENT_DATA_DIR");
> char *ptr;
> int len;
>
> @@ -1015,7 +1014,7 @@ long os_get_time_offset(void)
> {
> const char *offset;
>
> - offset = env_get(ENV_TIME_OFFSET);
> + offset = getenv(ENV_TIME_OFFSET);
> if (offset)
> return strtol(offset, NULL, 0);
> return 0;
> @@ -1133,7 +1132,7 @@ static void *fuzzer_thread(void * ptr)
> const char *fuzz_test;
>
> /* Find which test to run from an environment variable. */
> - fuzz_test = env_get("UBOOT_SB_FUZZ_TEST");
> + fuzz_test = getenv("UBOOT_SB_FUZZ_TEST");
> if (!fuzz_test)
> os_abort();
>
> --
> 2.43.0
>
Thanks Tom for testing, that's actually because U_BOOT_PERSISTENT_DATA_DIR
is intended to be set/get from host env not u-boot env, I removed them and
sent a new patch for ENV_TIME_OFFSET only.
Thanks,
Osama
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-14 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 22:58 [PATCH] Revert "sandbox: replace deprecated getenv() with env_get()" Tom Rini
2025-09-12 23:02 ` Tom Rini
2025-09-14 18:36 ` Osama Abdelkader
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.