[PATCH] cmd: CONFIG_CMD_SAVES depends on CONFIG_CMD_LOADS

From: Ying Sun sunying@nj.iscas.ac.cn
CONFIG_CMD_SAVES is used to enable support for the "saveenv" command and is only implemented in cmd/load.c when "#if defined(CONFIG_CMD_LOADS)" is met.
It is recommended to add dependency constraints to its definition. Prevents "saveenv" command from not being supported when "CONFIG_CMD_SAVES=y CONFIG_CMD_LOADS=n".
Suggested-by: Yanjie Ren renyanjie01@gmail.com Signed-off-by: Ying Sun sunying@nj.iscas.ac.cn --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 02e54f1e50..c1941849f9 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1228,6 +1228,7 @@ config LOADS_ECHO
config CMD_SAVES bool "saves - Save a file over serial in S-Record format" + depends on CMD_LOADS help Provides a way to save a binary file using the Motorola S-Record format over the serial line.

On Sun, 25 Jun 2023 at 09:25, sunying@nj.iscas.ac.cn wrote:
From: Ying Sun sunying@nj.iscas.ac.cn
CONFIG_CMD_SAVES is used to enable support for the "saveenv" command and is only implemented in cmd/load.c when "#if defined(CONFIG_CMD_LOADS)" is met.
It is recommended to add dependency constraints to its definition. Prevents "saveenv" command from not being supported when "CONFIG_CMD_SAVES=y CONFIG_CMD_LOADS=n".
Suggested-by: Yanjie Ren renyanjie01@gmail.com Signed-off-by: Ying Sun sunying@nj.iscas.ac.cn
cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Sun, Jun 25, 2023 at 04:24:47PM +0800, sunying@nj.iscas.ac.cn wrote:
From: Ying Sun sunying@nj.iscas.ac.cn
CONFIG_CMD_SAVES is used to enable support for the "saveenv" command and is only implemented in cmd/load.c when "#if defined(CONFIG_CMD_LOADS)" is met.
It is recommended to add dependency constraints to its definition. Prevents "saveenv" command from not being supported when "CONFIG_CMD_SAVES=y CONFIG_CMD_LOADS=n".
Suggested-by: Yanjie Ren renyanjie01@gmail.com Signed-off-by: Ying Sun sunying@nj.iscas.ac.cn Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/next, thanks!
participants (3)
-
Simon Glass
-
sunying@nj.iscas.ac.cn
-
Tom Rini