mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-27 05:23:34 +01:00
Windows: Fix failed EFI detection on some PCs where BootOrder variable is not defined.
we now report that EFI is not support only when GetFirmwareEnvironmentVariable fails with error ERROR_INVALID_FUNCTION. Proposed by @kriegste on https://github.com/veracrypt/VeraCrypt/issues/360
This commit is contained in:
parent
3a1c8bac59
commit
eb0eec7b39
@ -2636,7 +2636,7 @@ namespace VeraCrypt
|
|||||||
bool EfiBoot::IsEfiBoot() {
|
bool EfiBoot::IsEfiBoot() {
|
||||||
DWORD BootOrderLen;
|
DWORD BootOrderLen;
|
||||||
BootOrderLen = GetFirmwareEnvironmentVariable(L"BootOrder", EfiVarGuid, tempBuf, sizeof(tempBuf));
|
BootOrderLen = GetFirmwareEnvironmentVariable(L"BootOrder", EfiVarGuid, tempBuf, sizeof(tempBuf));
|
||||||
return BootOrderLen != 0;
|
return (BootOrderLen != 0) || (GetLastError() != ERROR_INVALID_FUNCTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EfiBoot::DeleteStartExec(uint16 statrtOrderNum, wchar_t* type) {
|
void EfiBoot::DeleteStartExec(uint16 statrtOrderNum, wchar_t* type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user