setvar variable-name [–guid guid][-bs][-rs][-nv] [=data]
Options:
variable-name The name of the UEFI variable to modify or display.
-guid Specifies the GUID of the UEFI variable to modify or display. If not present, then the GUID EFI_GLOBAL_VARIABLE, as defined in chapter 3.2 of the UEFI specification.
-bs Indicates that the variable is a boot variable. Should only be present for new variables, otherwise it is ignored.
-rt Indicates that the variable is a runtime variable. Should only be present for new variables, otherwise it is ignored.
-nv Indicates that the variable is non-volatile. If not present, then the variable is assumed to be volatile. Should only be present for new variables, otherwise it is ignored.
=data New data for the variable. If there is nothing after the ‘=’ then the variable is deleted. If = is not present, then the current value of the variable is dumped as hex bytes. The data may consist of zero or more of the following:
xx[xx]: Hexadecimal bytes
"ascii-string" ASCII-string with no null-terminator
L"UCS2-string" UCS-2 encoded string with no null-terminator
--device Device path text format, as specified by the EFI Device Path Display Format Overview section of the UEFI Specification.
Description:
This command changes the UEFI variable specified by name and guid. If = is specified, but data is not, the variable is deleted, if it exists. If = is not specified, then the current variable contents are displayed. If =data is specified, then the variable’s value is changed to the value specified by data.
-bs, -rt and –nv are only useful if the variable already exists. If the variable already exists and the attributes cannot be changed, then -1 is returned.
Return Value:
- SHELL_SUCCESS The shell has stored the variable and its data with the defined attributes.\r\n"
- SHELL_INVALID_PARAMETER Incorrect attributes were used.
- SHELL_OUT_OF_RESOURCES Insufficient resources were available for storing the variable and its data.
- SHELL_DEVICE_ERROR The variable could not be saved due to a hardware error.
- SHELL_WRITE_PROTECTED The variable in question is read-only.
- SHELL_WRITE_PROTECTED The variable in question cannot be deleted.
- SHELL_NOT_FOUND The variable could not be found.
沒有留言:
張貼留言