TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS | IsNextFragment (IN OUT CONST CHAR16 **Statement, IN CONST CHAR16 *Fragment, OUT BOOLEAN *Match) |
BOOLEAN | IsValidProfile (IN CONST CHAR16 *String) |
BOOLEAN | TestOperation (IN CONST CHAR16 *Compare1, IN CONST CHAR16 *Compare2, IN CONST BIN_OPERATOR_TYPE BinOp, IN CONST BOOLEAN CaseInsensitive, IN CONST BOOLEAN ForceStringCompare) |
EFI_STATUS | ProcessStatement (IN OUT BOOLEAN *PassingState, IN UINTN StartParameterNumber, IN UINTN EndParameterNumber, IN CONST END_TAG_TYPE OperatorToUse, IN CONST BOOLEAN CaseInsensitive, IN CONST BOOLEAN ForceStringCompare) |
BOOLEAN | BuildNextStatement (IN UINTN ParameterNumber, OUT UINTN *EndParameter, OUT END_TAG_TYPE *EndTag) |
BOOLEAN | MoveToTagSpecial (IN SCRIPT_FILE *ScriptFile) |
EFI_STATUS | PerformResultOperation (IN CONST BOOLEAN Result) |
SHELL_STATUS EFIAPI | ShellCommandRunIf (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
SHELL_STATUS EFIAPI | ShellCommandRunElse (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
SHELL_STATUS EFIAPI | ShellCommandRunEndIf (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Main file for If and else shell level 1 function.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file If.c.
BOOLEAN BuildNextStatement | ( | IN UINTN | ParameterNumber, |
OUT UINTN * | EndParameter, | ||
OUT END_TAG_TYPE * | EndTag | ||
) |
Break up the next part of the if statement (until the next 'and', 'or', or 'then').
[in] | ParameterNumber | The current parameter number. |
[out] | EndParameter | Upon successful return, will point to the parameter to start the next iteration with. |
[out] | EndTag | Upon successful return, will point to the type that was found at the end of this statement. |
TRUE | A valid statement was found. |
FALSE | A valid statement was not found. |
EFI_STATUS IsNextFragment | ( | IN OUT CONST CHAR16 ** | Statement, |
IN CONST CHAR16 * | Fragment, | ||
OUT BOOLEAN * | Match | ||
) |
Extract the next fragment, if there is one.
[in,out] | Statement | The current remaining statement. |
[in] | Fragment | The current fragment. |
[out] | Match | TRUE when there is another Fragment in Statement, FALSE otherwise. |
EFI_SUCCESS | The match operation is performed successfully. |
EFI_OUT_OF_RESOURCES | Out of resources. |
BOOLEAN MoveToTagSpecial | ( | IN SCRIPT_FILE * | ScriptFile | ) |
Move the script file pointer to a different place in the script file. This one is special since it handles the if/else/endif syntax.
[in] | ScriptFile | The script file from GetCurrnetScriptFile(). |
TRUE | The move target was found and the move was successful. |
FALSE | Something went wrong. |
EFI_STATUS PerformResultOperation | ( | IN CONST BOOLEAN | Result | ) |
EFI_STATUS ProcessStatement | ( | IN OUT BOOLEAN * | PassingState, |
IN UINTN | StartParameterNumber, | ||
IN UINTN | EndParameterNumber, | ||
IN CONST END_TAG_TYPE | OperatorToUse, | ||
IN CONST BOOLEAN | CaseInsensitive, | ||
IN CONST BOOLEAN | ForceStringCompare | ||
) |
Process an if statement and determine if its is valid or not.
[in,out] | PassingState | Opon entry, the current state. Upon exit, the new state. |
[in] | StartParameterNumber | The number of the first parameter of this statement. |
[in] | EndParameterNumber | The number of the final parameter of this statement. |
[in] | OperatorToUse | The type of termination operator. |
[in] | CaseInsensitive | TRUE for case insensitive, FALSE otherwise. |
[in] | ForceStringCompare | TRUE for all string based, FALSE otherwise. |
EFI_INVALID_PARAMETER | A parameter was invalid. |
EFI_SUCCESS | The operation was successful. |
SHELL_STATUS EFIAPI ShellCommandRunElse | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
SHELL_STATUS EFIAPI ShellCommandRunEndIf | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
SHELL_STATUS EFIAPI ShellCommandRunIf | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
BOOLEAN TestOperation | ( | IN CONST CHAR16 * | Compare1, |
IN CONST CHAR16 * | Compare2, | ||
IN CONST BIN_OPERATOR_TYPE | BinOp, | ||
IN CONST BOOLEAN | CaseInsensitive, | ||
IN CONST BOOLEAN | ForceStringCompare | ||
) |
Do a comparison between 2 things.
[in] | Compare1 | The first item to compare. |
[in] | Compare2 | The second item to compare. |
[in] | BinOp | The type of comparison to perform. |
[in] | CaseInsensitive | TRUE to do non-case comparison, FALSE otherwise. |
[in] | ForceStringCompare | TRUE to force string comparison, FALSE otherwise. |