From: Timo Ketola <timo@exertus.fi>
To: u-boot@lists.denx.de
Subject: [U-Boot] 'run' no longer aborts on an error, can someone please verify
Date: Mon, 23 Apr 2012 08:43:00 +0300 [thread overview]
Message-ID: <4F94EBE4.6060203@exertus.fi> (raw)
In-Reply-To: <4F932CEC.30808@gmail.com>
Dear Gray, Jason, Heiko, Simon,
I added you, Jason, Heiko and Simon, into the CC-list because there is
your commits in the history which seems somewhere to change the
behaviour below:
On 22.04.2012 00:55, Gray Remlin wrote:
> U-Boot v2012.04
>
> Marvell>> setenv ipaddr '192.168.1.130'
> Marvell>> setenv ifhostisup 'ping 192.168.1.100'
> Marvell>> setenv saywearehappy 'echo "We are happy!"'
> Marvell>> run ifhostisup saywearehappy;
> Using egiga0 device
> ping failed; host 192.168.1.100 is not alive
> "We are happy!"
> Marvell>>
>
> This is not the same behaviour as my (unfortunately customised) version based on the ancient U-Boot 2009.11
> Other commands are also effected, for example 'ide dev 0' would abort a 'run' command if the device did not exist.
>
> Is this my problem (corrupted source\compilation) or a change in policy ?
I took a quick glance over command/main.c. I think this is the "original
behaviour" (tree 9c506e 23 Aug 2011):
1374 /* OK - call function to do the command */
1375 if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) {
1376 rc = -1;
1377 }
run_command returns -1 on failure and
1407 if (run_command (arg, flag) == -1)
1408 return 1;
do_run exits the loop based on that.
Now (tree 762494 6 Mar 2012) builtin_run_command:
1341 rc = cmd_process(flag, argc, argv, &repeatable);
returns the exit code of the command but:
1366 if (builtin_run_command(cmd, flag) == -1)
1367 return 1;
run_command now depends on it to return -1 on failure. If I followed the
code right, this is clear change in the behaviour. I hope it is not
intentional and can be fixed because I have (too?) scripts that depends
on old behaviour. For example:
run get_update_from_usb erase_flash_and_write_it
Sequence must not continue to touching flash if load from USB fails.
--
Timo
next prev parent reply other threads:[~2012-04-23 5:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-21 20:51 [U-Boot] [STATUS] v2012.04 released, Merge Window is OPEN Wolfgang Denk
2012-04-21 21:55 ` [U-Boot] 'run' no longer aborts on an error, can someone please verify Gray Remlin
2012-04-23 5:43 ` Timo Ketola [this message]
2012-04-23 7:37 ` Timo Ketola
2012-04-23 8:39 ` Wolfgang Denk
2012-04-23 9:57 ` [U-Boot] [PATCH] Fix the behaviour of the 'run' command Timo Ketola
2012-04-23 10:15 ` Wolfgang Denk
2012-04-23 19:56 ` Simon Glass
2012-04-23 20:07 ` Wolfgang Denk
2012-04-23 11:02 ` [U-Boot] 'run' no longer aborts on an error, can someone please verify Simon Glass
2012-04-23 11:16 ` Wolfgang Denk
2012-04-23 19:04 ` Simon Glass
2012-04-23 20:12 ` Simon Glass
2012-04-23 8:20 ` Wolfgang Denk
2012-04-23 8:33 ` Timo Ketola
2012-04-23 8:34 ` Wolfgang Denk
2012-04-23 11:00 ` [U-Boot] [STATUS] v2012.04 released, Merge Window is OPEN Albert ARIBAUD
2012-04-23 15:45 ` Stephen Warren
2012-04-23 18:44 ` Dirk Behme
2012-04-23 20:08 ` Wolfgang Denk
2012-04-23 20:16 ` Stephen Warren
2012-04-23 21:03 ` Wolfgang Denk
2012-04-23 20:26 ` Tom Rini
2012-04-23 21:06 ` Wolfgang Denk
2012-04-23 22:38 ` Graeme Russ
2012-04-25 14:02 ` [U-Boot] [STATUS] v2012.04.01 released Wolfgang Denk
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=4F94EBE4.6060203@exertus.fi \
--to=timo@exertus.fi \
--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.