Added support for SetVariable to store volatile variable,
and SetNVVariable to store non volatile variable. Signed-off-by: Sylvain Chouleur <sylvain.chouleur@gmail.com> Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
This commit is contained in:
parent
5f765e9208
commit
27cdb74865
@ -522,6 +522,21 @@ LibDeleteVariable (
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
LibSetNVVariable (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *VarGuid,
|
||||
IN UINTN DataSize,
|
||||
IN VOID *Data
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
LibSetVariable (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *VarGuid,
|
||||
IN UINTN DataSize,
|
||||
IN VOID *Data
|
||||
);
|
||||
EFI_STATUS
|
||||
LibInsertToTailOfBootOrder (
|
||||
IN UINT16 BootOption,
|
||||
IN BOOLEAN OnlyInsertIfEmpty
|
||||
|
@ -321,6 +321,48 @@ LibDeleteVariable (
|
||||
return (Status);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
LibSetNVVariable (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *VarGuid,
|
||||
IN UINTN DataSize,
|
||||
IN VOID *Data
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = uefi_call_wrapper(
|
||||
RT->SetVariable,
|
||||
5,
|
||||
VarName, VarGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||
DataSize, Data
|
||||
);
|
||||
ASSERT (!EFI_ERROR(Status));
|
||||
return (Status);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
LibSetVariable (
|
||||
IN CHAR16 *VarName,
|
||||
IN EFI_GUID *VarGuid,
|
||||
IN UINTN DataSize,
|
||||
IN VOID *Data
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = uefi_call_wrapper(
|
||||
RT->SetVariable,
|
||||
5,
|
||||
VarName, VarGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
DataSize, Data
|
||||
);
|
||||
ASSERT (!EFI_ERROR(Status));
|
||||
return (Status);
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
LibInsertToTailOfBootOrder (
|
||||
IN UINT16 BootOption,
|
||||
|
Loading…
Reference in New Issue
Block a user