* [U-Boot-Users] [patch #10/11] HUSH parser fixes.
@ 2004-03-30 14:49 Pantelis Antoniou
2004-04-15 21:54 ` [U-Boot-Users] " Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Pantelis Antoniou @ 2004-03-30 14:49 UTC (permalink / raw)
To: u-boot
Hello
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.
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.
Regards
Pantelis
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parser.diffstat
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040330/abd623e4/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: parser.diff
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040330/abd623e4/attachment-0001.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] Re: [patch #10/11] HUSH parser fixes.
2004-03-30 14:49 [U-Boot-Users] [patch #10/11] HUSH parser fixes Pantelis Antoniou
@ 2004-04-15 21:54 ` Wolfgang Denk
2004-04-16 7:24 ` Pantelis Antoniou
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2004-04-15 21:54 UTC (permalink / raw)
To: u-boot
In message <406988DC.7040408@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?
> 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.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
GUIs are virtually useless. Learn tools. They're configurable,
scriptable, automatable, cron-able, interoperable, etc. We don't need
no brain-dead winslurping monolithic claptrap.
-- Tom Christiansen in 371140df at csnews
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] Re: [patch #10/11] HUSH parser fixes.
2004-04-15 21:54 ` [U-Boot-Users] " Wolfgang Denk
@ 2004-04-16 7:24 ` Pantelis Antoniou
2004-04-18 22:44 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Pantelis Antoniou @ 2004-04-16 7:24 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
>In message <406988DC.7040408@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] Re: [patch #10/11] HUSH parser fixes.
2004-04-16 7:24 ` Pantelis Antoniou
@ 2004-04-18 22:44 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2004-04-18 22:44 UTC (permalink / raw)
To: u-boot
In message <407F8A48.7010100@intracom.gr> you wrote:
>
> >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.
Please see my previous message about this. If you upgrade to a new
version of U-Boot anyway, you can for example use a standalone tool
that is run once to convert the environment.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
C++ is the best example of second-system effect since OS/360.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-18 22:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-30 14:49 [U-Boot-Users] [patch #10/11] HUSH parser fixes Pantelis Antoniou
2004-04-15 21:54 ` [U-Boot-Users] " Wolfgang Denk
2004-04-16 7:24 ` Pantelis Antoniou
2004-04-18 22:44 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox