[U-Boot-Users] Re: [patch #10/11] HUSH parser fixes.

Pantelis Antoniou panto at intracom.gr
Fri Apr 16 09:24:56 CEST 2004


Wolfgang Denk wrote:

>In message <406988DC.7040408 at intracom.gr> you wrote:
>
>>The following patch fixes various shortcomings in the
>>hush parser.
>>
>>1. A new test command was added. This is a simplified
>>   version of the one in the sh shell.
>>
>>2. A new exit command was added which terminates the
>>   current executing script.
>>
>>3. Handing of $? (exit code of last executed command), was
>>   wrong. Instead of being evaluated in the proper place
>>   it was evaluated once at the start of the evaluation.
>>
>>   For example the following script worked like this.
>>
>>   test 1 -eq 2   # set $? to 1
>>   echo $?        # outputs 1
>>   test 1 -eq 1   # set $? to 0
>>   echo $?        # still outputs 1
>>
>>   Now it is fixed.
>>
>
>Can you please re-submit a patch whioch included these 3 items only?
>
>
Sure, coming right up.

>>4. The simplified parser uses '(' and ')' for enclosing variables.
>>   This caused problems when migrating to hush because hash uses
>>   '{' and '}'. Modified to accept parentheses too.
>>
>
>Sorry, but I reject this patch. I want hush to stay as  bourne  shell
>compatible  as  possible. I'd much rather fix the simple command line
>parser to use ``${...}'' instead.
>
>
Could I at least make it a compile option?
We have a number of boards in the field that would like to upgrade
to hush without changing the configuration.

>Best regards,
>
>Wolfgang Denk
>
>
Regards

Pantelis






More information about the U-Boot mailing list