From: Wolfgang Denk Date: Tue, 12 Apr 2011 22:47:43 +0200 Subject: [U-Boot] [PATCH 2/2] hush: Fix return code when using 'exit' in control structures In-Reply-To: <1297710697-13872-1-git-send-email-wd@denx.de> <1297710697-13872-2-git-send-email-wd@denx.de> References: <1297710697-13872-1-git-send-email-wd@denx.de> <1297710697-13872-2-git-send-email-wd@denx.de> Message-ID: <20110412204743.675E1151F83@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 In message <1297710697-13872-2-git-send-email-wd@denx.de> you wrote: > This fixes cases like this one, there hush used to return 0 : > > => if foo ; then do something ; exit 1 ; fi ; echo RC=$? > Unknown command 'foo' - try 'help' > RC=1 > > Adapted from Barebox commit 2477fb1 > From: Sascha Hauer > Date: Tue, 23 Mar 2010 15:33:43 +0100 > > Signed-off-by: Wolfgang Denk > --- > common/hush.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) I will drop these hush patches. Further testing shows that they don't really fix the problems. Looking closer at the current hush code I think it's a waste of time to try fixing these things; we should rather throw it away and re-import a recent version from BusyBox, which would also bring a few nice features like shell functions and the like. 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 Computers are not intelligent. They only think they are.