]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
env: remote: Disallow CMD_SAVEENV
authorTom Rini <trini@konsulko.com>
Mon, 23 Mar 2026 19:51:06 +0000 (13:51 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 7 Apr 2026 17:30:41 +0000 (11:30 -0600)
Looking at how the saveenv portion of this driver was implemented, it
does not appear that it could actually result in changes being saved on
the remote end. Update Kconfig to disallow CMD_SAVEENV for
ENV_IS_IN_REMOTE and then remove the relevant code.

Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/Kconfig
env/remote.c

index f47ce7f45ce63a7d13edbbb5b23af25c6941a69d..ff6ad37fbe4aedf6211d616e8fb15aa17224100f 100644 (file)
@@ -717,6 +717,7 @@ config CMD_GREPENV
 
 config CMD_SAVEENV
        bool "saveenv"
+       depends on !(SRIO_PCIE_BOOT_SLAVE && ENV_IS_IN_REMOTE)
        default y
        help
          Save all environment variables into the compiled-in persistent
index 0cc383c23602e3fdf353a47c77bf1ee752988da6..5dd929155a43f09d35ffee824910f819db4a4272 100644 (file)
@@ -31,18 +31,6 @@ static int env_remote_init(void)
        return -ENOENT;
 }
 
-#ifdef CONFIG_CMD_SAVEENV
-static int env_remote_save(void)
-{
-#ifdef CONFIG_SRIO_PCIE_BOOT_SLAVE
-       printf("Can not support the 'saveenv' when boot from SRIO or PCIE!\n");
-       return 1;
-#else
-       return 0;
-#endif
-}
-#endif /* CONFIG_CMD_SAVEENV */
-
 static int env_remote_load(void)
 {
 #ifndef ENV_IS_EMBEDDED
@@ -56,6 +44,5 @@ U_BOOT_ENV_LOCATION(remote) = {
        .location       = ENVL_REMOTE,
        ENV_NAME("Remote")
        .load           = env_remote_load,
-       .save           = env_save_ptr(env_remote_save),
        .init           = env_remote_init,
 };