VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-01-28 23:24:00 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:36:53 +0200
commit8051ac7985a2cef1e561fdf1f4258ae640d3735b (patch)
treee310d34e634de82d9601d0cfb114e512a19ab4b0 /Library
parent0d88d54f987fa0e464177febbc04c93257a17b40 (diff)
downloadVeraCrypt-DCS-8051ac7985a2cef1e561fdf1f4258ae640d3735b.tar.gz
VeraCrypt-DCS-8051ac7985a2cef1e561fdf1f4258ae640d3735b.zip
DcsDriver config key supported (install/remove dirver)
Diffstat (limited to 'Library')
-rw-r--r--Library/CommonLib/EfiVar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/CommonLib/EfiVar.c b/Library/CommonLib/EfiVar.c
index 2a6e59e..fad6eb5 100644
--- a/Library/CommonLib/EfiVar.c
+++ b/Library/CommonLib/EfiVar.c
@@ -80,7 +80,11 @@ BootOrderInsert(
UINTN i;
UINTN j;
res = EfiGetVar(OrderVarName, &gEfiGlobalVariableGuid, &varBootOrder, &varBootOrderSize, &varBootOrderAttr);
- if (EFI_ERROR(res)) return res;
+ if (EFI_ERROR(res)) {
+ res = EfiSetVar(OrderVarName, &gEfiGlobalVariableGuid, &value, 2,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS);
+ return res;
+ }
BootOrderCount = varBootOrderSize / sizeof(UINT16);
varBootOrderNew = MEM_ALLOC((BootOrderCount + 1) * sizeof(UINT16));
if (BootOrderCount < index) index = BootOrderCount - 1;