[U-Boot] [PATCH 1/2] hush: Treat trailing || and && as incomplete statements

Joe Hershberger joe.hershberger at gmail.com
Fri Nov 9 00:26:41 CET 2012


Hi Wolfgang,

On Thu, Nov 8, 2012 at 5:04 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Joe,
>
> In message <1352405756-401-1-git-send-email-joe.hershberger at ni.com> you wrote:
>> A || or && at the end of a command should behave just like an if
>> statment that is not complete.
>>
>> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
>
> I really appreciate your patches.  But after having spent some time on
> hush bug fixes myself (I submitted a few patches some time ago - to
> kill them later when I learned I was just chiseling at the top of
> somce iceberg) I seriously doubt if it makes senxe to try fixing the
> many, many bugs in the old version of hush that is included with
> U-Boot.

I'm not attempting to make it perfect.  Far from it.  I'm just trying
to make it work for the use-cases that keep my scripts from working
properly or prevent me from doing something I'm trying to do in the
script..

> You may have a look over the fence at what Barebox fixed in this area,
> but the result will probably be the same.

I didn't even know that project existed.  Given how early they forked,
I'd be surprised if there is much to gain there, but there hasn't been
much in the way of changes to hush in either u-boot or barebox.  I'll
glace at it and see if there's anything obviously useful.

> I fear that such patches, while fixing a nasty problem here and there,
> will create other and maybe even more nasty problems in unexpacted
> areas.

I share your fear.  I try to find the simplest and most unobtrusive
ways to get the behavior I want in the hopes that these surgical
changes don't have unintended effects.

> My suggestion is to save such efforts, and rather spend the time on
> adating a more recent version of hush to U-Boot; getting things like
> shell functions or backtic evaluation would be more than welcome to
> many of us, I guess.

I agree it would be nice to have more shell features, but I fear it's
an awful lot of work.  At least for now I'm just trying to get key
functionality that I need, which can be fixed with minimal source
changes, and that I think others will find useful.

Where is the source project that hush came from anyway?  Some old
busybox?  Would you still recommend it over a more currently used
busybox shell?

-Joe


More information about the U-Boot mailing list