U-Boot Archive on 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: Fri, 5 Jul 2013 16:29:27 -0400	[thread overview]
Message-ID: <20130705202927.GL16630@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ08YTWm9KnWquXeFbawLFuEKADMP+nFXKpqxdebVsbMKg@mail.gmail.com>

On Fri, Jul 05, 2013 at 01:21:09PM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Fri, Jul 5, 2013 at 1:15 PM, Tom Rini <trini@ti.com> wrote:
> 
> > On Fri, Jul 05, 2013 at 12:52:03PM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Fri, Jul 5, 2013 at 5:59 AM, Tom Rini <trini@ti.com> wrote:
> > >
> > > > 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
> > > >
> > > >
> > > > OK, this conflicts with the change I posted (and pushed later than I
> > > > thought I had).  Can you confirm the code is good in mainline now?
> > > > Thanks!
> > > >
> > >
> > > It's close, but I think it still needs this near the end
> > > of do_bootm_states(), something like:
> > >
> > >  else if (ret == BOOTM_ERR_RESET) do_reset(cmdtp, flag, argc, argv); +
> > else
> > > if (ret) + puts("subcommand not supported\n"); return ret;
> > >
> > > If you agree, I can prepare a patch as part of the bootz update.
> >
> > How do we get there in the code?  When we do any subcalls is where we've
> > got that puts already.  Failures from that point on are either the OS
> > bootm part failed (and return is > 0) or one of the BOOTM_ERR codes.  Or
> > did I miss a case still?
> >
> 
> I think this is when the boot_os function returns an error. At least the
> old code had quite a lot of printf()s for that case.

We had a printf per subcommand before, and just a single one now.  We
didn't say the 'go' subcommand failed however, just what the
function happened to print out.

-- 
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/20130705/6801750d/attachment.pgp>

  reply	other threads:[~2013-07-05 20:29 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 [this message]
2013-07-05 20:48           ` Simon Glass
2013-07-08 13:24             ` Tom Rini
2013-07-10 13:17 ` Tom Rini

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=20130705202927.GL16630@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