From: Wolfgang Denk Date: Mon, 23 Apr 2012 10:20:05 +0200 Subject: [U-Boot] 'run' no longer aborts on an error, can someone please verify In-Reply-To: <4F932CEC.30808@gmail.com> References: <20120421205158.67291204A81@gemini.denx.de> <4F932CEC.30808@gmail.com> Message-ID: <20120423082005.8497F200261@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Gray Remlin, In message <4F932CEC.30808@gmail.com> you 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 cannot confirm a problem with the "run' command; tested with v2012.04 in "sandbox" : ------------------------------------ $ echo 'setenv fail printenv foo;setenv bug echo === BUG ===;run fail bug; reset' | ./u-boot U-Boot 2012.04 (Apr 23 2012 - 10:07:18) DRAM: 128 MiB Using default environment In: serial Out: serial Err: serial =>setenv fail printenv foo;setenv bug echo === BUG ===;run fail bug; reset ## Error: "foo" not defined $ ------------------------------------ i. e. the second command ("echo === BUG ===") does not get run. Ditto on real hardware (here a MPC5200 based board): ------------------------------------ U-Boot 2012.04 (Apr 23 2012 - 10:16:22) CPU: MPC5200B v2.2, Core v1.4 at 396 MHz Bus 132 MHz, IPB 132 MHz, PCI 66 MHz ... => setenv ifhostisup 'ping 192.168.99.99' => setenv saywearehappy 'echo "We are happy!"' => run ifhostisup saywearehappy Using FEC device ping failed; host 192.168.99.99 is not alive => ------------------------------------ Which exact version of U-Boot and which board configuration are you testing? Are you using hush shell, or plain old command interpreter? [In both my tests the hush shell was used.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A conservative is a man with two perfectly good legs who has never learned to walk. - Franklin D. Roosevelt