[U-Boot] [PATCH] common, hush [BUG]: exit not work in hush shell

Wolfgang Denk wd at denx.de
Mon Sep 17 07:59:58 CEST 2012


Dear Heiko,

In message <505561A0.3060108 at 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?


More information about the U-Boot mailing list