> > Module Name:        src
> > Committed By:       mrg
> > Date:               Sun May 15 00:05:24 UTC 2022
> > 
> > Modified Files:
> >     src/distrib/common/bootimage: Makefile.bootimage
> > 
> > Log Message:
> > allow some invocations of expr(1) to "fail" - expr(1) returns "1" is
> > the expression expands to "0" or empty, and sometimes these values end
> > up correctly being 0.
>
> Several values (SWAPSECTORS, EFISECTORS, FATSECTORS, and SWAPCYLINDERS)
> that couldbe zero already have '|| true'.  Should they be consistent?
> (I'm not sure if all should use strict '|| test $$? -eq 1 || exit 1')

i use the test -eq 1 method to only match the case expr(1)
exists due to "0" or "".  manual says:

The expr utility exits with one of the following values:
0       the expression is neither an empty string nor 0.
1       the expression is an empty string or 0.
2       the expression is invalid.
>2      an error occurred (such as memory allocation failure).

i kind of meant to fix the other uses too, thanks for
reminding me i wasn't done here :)


.mrg.

Reply via email to