ShellPkg/IsVolatileEnv: Handle memory allocation failure

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Ruiyu Ni
2016-07-08 15:18:14 +08:00
parent b2c036a7f0
commit 31e5b912b9
5 changed files with 56 additions and 31 deletions

View File

@ -34,19 +34,18 @@ extern ENV_VAR_LIST gShellEnvVarList;
/**
Reports whether an environment variable is Volatile or Non-Volatile
This will use the Runtime Services call GetVariable to to search for the variable.
Reports whether an environment variable is Volatile or Non-Volatile.
@param EnvVarName The name of the environment variable in question
@param Volatile Return TRUE if the environment variable is volatile
@retval TRUE This environment variable is Volatile
@retval FALSE This environment variable is NON-Volatile
@retval EFI_SUCCESS The volatile attribute is returned successfully
@retval others Some errors happened.
**/
BOOLEAN
EFIAPI
EFI_STATUS
IsVolatileEnv (
IN CONST CHAR16 *EnvVarName
IN CONST CHAR16 *EnvVarName,
OUT BOOLEAN *Volatile
);
/**