Specifications
142 Version 2.0
appear at the start of the line (just after the if itself). The two may appear in either
order.
When performing comparisons, the Unicode Byte Ordering Character is ignored at the
beginning of any argument.
Table 19Comparison Operators
Operator Definition
gt Greater than
ugt Unsigned Greater than
lt Less than
ult Unsigned Less than
ge Greater than or equal
uge Unsigned greater than or equal
le Less than or equal
ule Unsigned less than or equal
ne Not equal
eq Equals (semantically equivalent to ==)
== Equals (semantically equivalent to eq)
Error Mapping Functions
These functions are used to convert integers into UEFI, PI or OEM error codes, as
defined by Appendix D of the UEFI specification.
Table 20Functions used to convert integers into UEFI, PI or OEM error codes
Function Definition
UefiError Sets top nibble of parameter to 0100 binary (0x8)
PiError Sets top nibble of parameter to 1010 binary (0xA)
OemError Sets top nibble of parameter to 1100 binary (0xC)
Each function maps the small positive parameter into its equivalent error classification
as described in Appendix D of the UEFI Specification. For example,
...
if %lasterror% == EfiError(8) then # Check for write protect.
...
These functions may only be used to modify operators in comparisons.
Boolean Functions
The following built-in Boolean functions are also available:










