mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06: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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user