* [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command
@ 2013-07-01 13:09 Tom Rini
2013-07-02 13:05 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2013-07-01 13:09 UTC (permalink / raw)
To: u-boot
With the do_bootm_states re-organization, we have the call to any
potential sub-commands in a single spot. If one fails, we can then stop
right there and return to the caller. Prior to these calls we have
already ensured that ret is zero so we will not be returning this error
for some other case.
Signed-off-by: Tom Rini <trini@ti.com>
---
common/cmd_bootm.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 02a5013..a36e019 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -669,6 +669,13 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc,
if (!ret && (states & BOOTM_STATE_OS_PREP))
ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images);
+ /* Check for unsupported subcommand. */
+ if (ret) {
+ puts("subcommand not supported\n");
+ return ret;
+ }
+
+
#ifdef CONFIG_TRACE
/* Pretend to run the OS, then run a user command */
if (!ret && (states & BOOTM_STATE_OS_FAKE_GO)) {
@@ -699,8 +706,6 @@ err:
bootstage_error(BOOTSTAGE_ID_DECOMP_UNIMPL);
else if (ret == BOOTM_ERR_RESET)
do_reset(cmdtp, flag, argc, argv);
- else
- puts("subcommand not supported\n");
return ret;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command
2013-07-01 13:09 [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command Tom Rini
@ 2013-07-02 13:05 ` Andreas Bießmann
2013-07-03 12:37 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2013-07-02 13:05 UTC (permalink / raw)
To: u-boot
On 07/01/2013 03:09 PM, Tom Rini wrote:
> With the do_bootm_states re-organization, we have the call to any
> potential sub-commands in a single spot. If one fails, we can then stop
> right there and return to the caller. Prior to these calls we have
> already ensured that ret is zero so we will not be returning this error
> for some other case.
>
> Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com>
on avr32
> ---
> common/cmd_bootm.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command
2013-07-02 13:05 ` Andreas Bießmann
@ 2013-07-03 12:37 ` Tom Rini
2013-07-04 13:24 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2013-07-03 12:37 UTC (permalink / raw)
To: u-boot
On Tue, Jul 02, 2013 at 03:05:22PM +0200, Andreas Bie?mann wrote:
> On 07/01/2013 03:09 PM, Tom Rini wrote:
> > With the do_bootm_states re-organization, we have the call to any
> > potential sub-commands in a single spot. If one fails, we can then stop
> > right there and return to the caller. Prior to these calls we have
> > already ensured that ret is zero so we will not be returning this error
> > for some other case.
> >
> > Signed-off-by: Tom Rini <trini@ti.com>
>
> Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com>
Applied to u-boot/master.
--
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/20130703/969bcab8/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command
2013-07-03 12:37 ` Tom Rini
@ 2013-07-04 13:24 ` Andreas Bießmann
2013-07-04 14:54 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2013-07-04 13:24 UTC (permalink / raw)
To: u-boot
On 07/03/2013 02:37 PM, Tom Rini wrote:
> On Tue, Jul 02, 2013 at 03:05:22PM +0200, Andreas Bie?mann wrote:
>> On 07/01/2013 03:09 PM, Tom Rini wrote:
>>> With the do_bootm_states re-organization, we have the call to any
>>> potential sub-commands in a single spot. If one fails, we can then stop
>>> right there and return to the caller. Prior to these calls we have
>>> already ensured that ret is zero so we will not be returning this error
>>> for some other case.
>>>
>>> Signed-off-by: Tom Rini <trini@ti.com>
>>
>> Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>
> Applied to u-boot/master.
>
couldn't find it, missing push?
Regards,
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command
2013-07-04 13:24 ` Andreas Bießmann
@ 2013-07-04 14:54 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2013-07-04 14:54 UTC (permalink / raw)
To: u-boot
On Thu, Jul 04, 2013 at 03:24:10PM +0200, Andreas Bie?mann wrote:
> On 07/03/2013 02:37 PM, Tom Rini wrote:
> > On Tue, Jul 02, 2013 at 03:05:22PM +0200, Andreas Bie?mann wrote:
> >> On 07/01/2013 03:09 PM, Tom Rini wrote:
> >>> With the do_bootm_states re-organization, we have the call to any
> >>> potential sub-commands in a single spot. If one fails, we can then stop
> >>> right there and return to the caller. Prior to these calls we have
> >>> already ensured that ret is zero so we will not be returning this error
> >>> for some other case.
> >>>
> >>> Signed-off-by: Tom Rini <trini@ti.com>
> >>
> >> Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> >
> > Applied to u-boot/master.
> >
>
> couldn't find it, missing push?
Fixed, 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/20130704/2cb4ad22/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-04 14:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 13:09 [U-Boot] [PATCH] cmd_bootm.c: Correct check/return for unsupported sub-command Tom Rini
2013-07-02 13:05 ` Andreas Bießmann
2013-07-03 12:37 ` Tom Rini
2013-07-04 13:24 ` Andreas Bießmann
2013-07-04 14:54 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox