From: Wolfgang Denk Date: Mon, 17 Sep 2012 07:59:58 +0200 Subject: [U-Boot] [PATCH] common, hush [BUG]: exit not work in hush shell In-Reply-To: <505561A0.3060108@denx.de> References: <1347645856-3326-1-git-send-email-hs@denx.de> <20120914183131.728A72002E4@gemini.denx.de> <505561A0.3060108@denx.de> Message-ID: <20120917055959.06FEE203CF4@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 Heiko, In message <505561A0.3060108@denx.de> you wrote: > > Do you still have this test somewhere? Not really. It was during the development of an install & upgrade script, and step by step I removed all constructs that the hush shell would stumble upon. Sorry. > Hmm... Okay, so I have two options: > > - fix "exit" with arguments > - update to a recent version of hush (where is the current code from?) Hush is part of Busybox, see http://www.busybox.net/source.html > But I have the gut feeling, that the problem is not in the original > code, but in the u-boot adaptions, as the code in hush.c has a lot > of "#ifndef __U_BOOT__" ... There are also bugs in the old original code, many of them long fixed since. I once started looking into updating hush, and I have to admit that I don't understand the need for all of the "#ifndef __U_BOOT__" removals. When hush support was added, and additional 60 kB of code was a very heavy thing on most systems, so the primary intention then was to make the code as lightwight as possible. Today, a much larger percentage of users is both able to accept such code sizes and looking for the features offered. Many would even accept somewhat bigger code if they could get, for example, support for shell functions etc. Not to mention command substitution... 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 Thought for the day: What if there were no hypothetical situations?