Specifications

Version 2.0
47
EFI_SHELL_PROTOCOL.SetEnv()
Summary
Sets the environment variable.
Prototype
typedef
EFI_STATUS
(EFIAPI *EFI_SHELL_SET_ENV) (
IN CONST CHAR16 *Name,
IN CONST CHAR16 *Value,
IN BOOLEAN Volatile
);
Parameters
Name
Points to the null-terminated environment variable name.
Value
Points to the null-terminated environment variable value. If the value is an
empty string then the environment variable is deleted.
Volatile
Indicates whether the variable is non-volatile (FALSE) or volatile (TRUE).
Description
This function changes the current value of the specified environment variable. If the
environment variable exists and the Value is an empty string, then the environment
variable is deleted. If the environment variable exists and the Value is not an empty
string, then the value of the environment variable is changed. If the environment
variable does not exist and the Value is an empty string, there is no action. If the
environment variable does not exist and the Value is a non-empty string, then the
environment variable is created and assigned the specified value.
For a description of volatile and non-volatile environment variables, see3.6.1.
Status Codes Returned
EFI_SUCCESS The environment variable was successfully updated.