From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 3/4] Fix hush to give the correct return code for a simple command
Date: Thu, 5 Jun 2014 18:47:58 -0400 [thread overview]
Message-ID: <20140605224758.GU7841@bill-the-cat> (raw)
In-Reply-To: <1401482511-9647-4-git-send-email-sjg@chromium.org>
On Fri, May 30, 2014 at 02:41:50PM -0600, Simon Glass wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140605/2613f809/attachment.pgp>
next prev parent reply other threads:[~2014-06-05 22:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 20:41 [U-Boot] [PATCH v2 0/4] Fix a few problems with the command parsers Simon Glass
2014-05-30 20:41 ` [U-Boot] [PATCH v2 1/4] Add final result tests for run_command_list() Simon Glass
2014-06-05 22:47 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-30 20:41 ` [U-Boot] [PATCH v2 2/4] Fix itest mask overflow Simon Glass
2014-06-05 22:47 ` [U-Boot] [U-Boot,v2,2/4] " Tom Rini
2014-05-30 20:41 ` [U-Boot] [PATCH v2 3/4] Fix hush to give the correct return code for a simple command Simon Glass
2014-06-05 22:47 ` Tom Rini [this message]
2014-05-30 20:41 ` [U-Boot] [PATCH v2 4/4] Correct return code from builtin_run_command_list() Simon Glass
2014-06-05 22:48 ` [U-Boot] [U-Boot, v2, " Tom Rini
2014-05-30 20:43 ` [U-Boot] [PATCH v2 0/4] Fix a few problems with the command parsers Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140605224758.GU7841@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox