提交 3a8a02be 编写于 作者: S Simon Glass 提交者: Wolfgang Denk

Allow newlines within command environment vars

Any environment variable can hold commands to be executed by the 'run'
command. The environment variables preboot, bootcmd and menucmd have
special code for triggering execution in certain circumstances.

We adjust these calls to use run_command_list() instead of run_command().
This change permits these variables to have embedded newlines so that
they work the same as the 'source' command.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 d51004a8
......@@ -334,7 +334,7 @@ void main_loop (void)
int prev = disable_ctrlc(1); /* disable Control C checking */
# endif
run_command(p, 0);
run_command_list(p, -1, 0);
# ifdef CONFIG_AUTOBOOT_KEYED
disable_ctrlc(prev); /* restore Control C checking */
......@@ -382,7 +382,7 @@ void main_loop (void)
int prev = disable_ctrlc(1); /* disable Control C checking */
# endif
run_command(s, 0);
run_command_list(s, -1, 0);
# ifdef CONFIG_AUTOBOOT_KEYED
disable_ctrlc(prev); /* restore Control C checking */
......@@ -393,7 +393,7 @@ void main_loop (void)
if (menukey == CONFIG_MENUKEY) {
s = getenv("menucmd");
if (s)
run_command(s, 0);
run_command_list(s, -1, 0);
}
#endif /* CONFIG_MENUKEY */
#endif /* CONFIG_BOOTDELAY */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册