
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