All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/5] bootm: Handle errors consistently
Date: Wed, 10 Jul 2013 09:17:37 -0400	[thread overview]
Message-ID: <20130710131737.GG4846@bill-the-cat> (raw)
In-Reply-To: <1372969032-20009-1-git-send-email-sjg@chromium.org>

On Thu, Jul 04, 2013 at 01:17:07PM -0700, Simon Glass wrote:

> A recent bootm fix left the error path incomplete. Reinstate this so that
> failures in bootm stages are handled properly.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> Changes in v2:
> - Correct checking in the no-error case
> 
>  common/cmd_bootm.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 02a5013..652513a 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -684,12 +684,8 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc,
>  	if (!ret && (states & BOOTM_STATE_OS_GO)) {
>  		ret = boot_selected_os(argc, argv, BOOTM_STATE_OS_GO,
>  				images, boot_fn);
> -		if (ret)
> -			goto err;
>  	}
>  
> -	return ret;
> -
>  	/* Deal with any fallout */
>  err:
>  	if (iflag)
> @@ -699,7 +695,7 @@ err:
>  		bootstage_error(BOOTSTAGE_ID_DECOMP_UNIMPL);
>  	else if (ret == BOOTM_ERR_RESET)
>  		do_reset(cmdtp, flag, argc, argv);
> -	else
> +	else if (ret)
>  		puts("subcommand not supported\n");
>  
>  	return ret;

Looking this part over again, BOOTM_STATE_OS_GO handles its own prints
when returning 1, so we don't want to do the "subcommand not supported"
part here (the other case is a BOOTM_ERR_RESET).  But, trace does need
to be covered and isn't by the "subcommand not supported" print.  I'll
make a v3 of this shortly and post.

-- 
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/20130710/d75035b1/attachment.pgp>

      parent reply	other threads:[~2013-07-10 13:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 20:17 [U-Boot] [PATCH v2 1/5] bootm: Handle errors consistently Simon Glass
2013-07-05 12:59 ` Tom Rini
2013-07-05 19:52   ` Simon Glass
2013-07-05 20:15     ` Tom Rini
2013-07-05 20:21       ` Simon Glass
2013-07-05 20:29         ` Tom Rini
2013-07-05 20:48           ` Simon Glass
2013-07-08 13:24             ` Tom Rini
2013-07-10 13:17 ` Tom Rini [this message]

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=20130710131737.GG4846@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.