summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-15 18:11:23 +1300
committerSimon Glass <sjg@chromium.org>2021-03-27 15:04:31 +1300
commita8d696275aca9a121d438db50fcc44c02d7793cb (patch)
treecb9cbaa4e950626392bceeb1be15810635b58bcd /common
parentf2c1442e9643396a764fc3c9c28ffc2f36a73bbe (diff)
downloadu-boot-a8d696275aca9a121d438db50fcc44c02d7793cb.tar.gz
bootm: Skip command-line substitution if !CONFIG_CMDLINE
When there is no command line, we cannot enable this feature. Add a check to avoid a build error. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c
index dab7c3619f..ea71522d0c 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -583,7 +583,8 @@ int bootm_process_cmdline(char *buf, int maxlen, int flags)
if (ret)
return log_msg_ret("silent", ret);
}
- if (IS_ENABLED(CONFIG_BOOTARGS_SUBST) && (flags & BOOTM_CL_SUBST)) {
+ if (IS_ENABLED(CONFIG_BOOTARGS_SUBST) && IS_ENABLED(CONFIG_CMDLINE) &&
+ (flags & BOOTM_CL_SUBST)) {
ret = process_subst(buf, maxlen);
if (ret)
return log_msg_ret("subst", ret);