1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 00:32:04 +02:00
Files
u-boot-megous/common
Simon Glass 587e1d43e7 Fix hush to give the correct return code for a simple command
When a simple command like 'false' is provided, hush should return the
result of that command. However, hush only does this if the
FLAG_EXIT_FROM_LOOP flag is provided. Without this flag, hush will
happily execute the empty string command immediate after 'false' and
then return a success code.

This behaviour does not seem very useful, and requiring the flag also
seems wrong, since it means that hush will execute only the first command
in a sequence.

Add a check for empty string and fall out of the loop in that case. That
at least fixes the simple command case. This is a change in behaviour but
it is unlikely that the old behaviour would be considered correct in any
case.

Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-05 14:38:38 -04:00
..
2013-04-01 16:33:52 -04:00
2014-05-12 15:20:05 -04:00
2014-05-29 17:49:33 -04:00
2014-02-04 16:32:20 +01:00
2014-05-27 10:21:32 -04:00
2014-02-21 08:42:47 -05:00
2014-03-21 16:39:32 -04:00
2014-05-27 10:21:32 -04:00
2014-06-05 14:38:38 -04:00
2013-08-16 13:45:15 -04:00
2014-03-22 14:47:22 -06:00
2013-05-31 17:12:03 -05:00
2014-05-12 15:19:46 -04:00
2014-02-21 11:33:19 -05:00
2012-08-09 23:39:18 +02:00
2013-04-01 16:33:52 -04:00
2013-04-01 16:33:52 -04:00
2014-01-14 09:01:06 -05:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-01-14 09:01:06 -05:00
2014-04-17 17:44:36 -04:00
2014-05-09 11:50:14 +02:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2011-12-07 08:41:22 +01:00
2014-03-21 16:39:36 -04:00
2014-03-21 16:39:33 -04:00
2014-05-27 00:10:48 +02:00
2014-03-17 20:05:49 -06:00
2014-05-29 17:52:03 -04:00
2014-05-29 17:45:31 -04:00