diff --git a/gnu-efi-3.0/inc/efilib.h b/gnu-efi-3.0/inc/efilib.h index 574042d..e0c6375 100644 --- a/gnu-efi-3.0/inc/efilib.h +++ b/gnu-efi-3.0/inc/efilib.h @@ -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 diff --git a/gnu-efi-3.0/lib/misc.c b/gnu-efi-3.0/lib/misc.c index 32f48cc..48823bb 100644 --- a/gnu-efi-3.0/lib/misc.c +++ b/gnu-efi-3.0/lib/misc.c @@ -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,