From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Date: Tue, 30 Mar 2004 17:49:00 +0300 Subject: [U-Boot-Users] [patch #10/11] HUSH parser fixes. Message-ID: <406988DC.7040408@intracom.gr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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