* [U-Boot] Script with 'if run' don't work as expected
@ 2014-05-21 13:12 Stefan Herbrechtsmeier
2014-05-22 5:48 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Herbrechtsmeier @ 2014-05-21 13:12 UTC (permalink / raw)
To: u-boot
Hi,
a script with 'if run' don't work as expect. I have test it on an
omap3_overo board.
The following script always prints true:
setenv testcmd false; if run testcmd; then echo "true"; fi;
This could be fixed by reverting commit
1992dbfdb9886c3dfc4a505091895c851f736f3a:
Make 'run' use run_command_list() instead of run_command()
Kind regards,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] Script with 'if run' don't work as expected
2014-05-21 13:12 [U-Boot] Script with 'if run' don't work as expected Stefan Herbrechtsmeier
@ 2014-05-22 5:48 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2014-05-22 5:48 UTC (permalink / raw)
To: u-boot
Hi Stefan,
On 21 May 2014 03:12, Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> wrote:
> Hi,
>
> a script with 'if run' don't work as expect. I have test it on an
> omap3_overo board.
>
> The following script always prints true:
> setenv testcmd false; if run testcmd; then echo "true"; fi;
>
> This could be fixed by reverting commit
> 1992dbfdb9886c3dfc4a505091895c851f736f3a:
> Make 'run' use run_command_list() instead of run_command()
I can repeat this with sandbox:
$ ./b/sandbox/u-boot -c "setenv testcmd false; if run testcmd; then
echo true; fi;"
U-Boot 2014.07-rc1-00097-g169b1f8 (May 21 2014 - 19:46:07)
DRAM: 128 MiB
Using default environment
In: serial
Out: lcd
Err: lcd
true
However although that commit provoked the problem I don't think it is
the root cause. It seems that hush loses the return code when asked to
execute a sequence of commands. In looking at this I've found several
related problems so I'll put a series together and send it out for
review.
Regards,
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-22 5:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 13:12 [U-Boot] Script with 'if run' don't work as expected Stefan Herbrechtsmeier
2014-05-22 5:48 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox