In the case where an environment variable spans multiple lines, we should
use run_command_list() so that all lines are executed. This shold be
backwards compatible with existing behaviour for existing scripts.

Signed-off-by: Simon Glass <s...@chromium.org>
---
Changes in v2:
- Add new patch to adjust 'run' command to better support testing

 common/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/main.c b/common/main.c
index 56da214..3b7f2f7 100644
--- a/common/main.c
+++ b/common/main.c
@@ -1560,7 +1560,7 @@ int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
                        return 1;
                }
 
-               if (run_command(arg, flag) != 0)
+               if (run_command_list(arg, -1, flag) != 0)
                        return 1;
        }
        return 0;
-- 
1.8.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to