[gPXE-devel] Minor Scripting Improvements

Shao Miller Shao.Miller at yrdsb.edu.on.ca
Tue Mar 16 16:06:22 EDT 2010


Stefan Hajnoczi wrote:
>
> if ( rc | shell_exit_flag ) {
>
> The bitwise OR saves a few bytes compared to logical OR but looks odd.
>  On my system I can get the same size using:
>
> while ( ! shell_exit_flag && offset < image->len ) {
>
> Stefan
>

I have had some trouble reproducing the same size for script.o using 
this code under GCC 3.3.3, but I agree that it's more the Right Thing 
anyway.

Stefan shared some insights today regarding the 'loopif' command's 
proximity to the flow control functionality that we eventually 
desire...  Once flow control "proper" has been implemented, 'loopif' 
could be rendered redundant; removing it at that time would obviously 
not be a pleasant option.

I've split 'exit' off into the staging/sha0-73-exit branch[1], 
incorporating Stefan's above-shown code changes.  Would this 'exit' be 
possible to merge?  I'll most likely be removing the 
staging/sha0-73_74-exit_loopif branch shortly.

With thanks for your consideration,

- Shao Miller

[1] 
http://git.etherboot.org/?p=gpxe-staging.git;a=commitdiff;h=5fc6361a7b2df86df20ef84fd4ab010cab26126b


More information about the gPXE-devel mailing list