fix EFI detection on Windows
We are on legacy BIOS if GetFirmwareEnvironmentVariable fails (returns zero) *and* extended error information is ERROR_INVALID_FUNCTION. Cf. http://msdn.microsoft.com/en-us/library/windows/desktop/ms724325%28v=vs.85%29.aspx
This commit is contained in:
parent
e8f07821cc
commit
a6e7719bbe
2 changed files with 6 additions and 1 deletions
|
@ -100,7 +100,7 @@ get_platform (void)
|
|||
|
||||
if (!func_GetFirmwareEnvironmentVariableW (L"BootOrder", GRUB_EFI_GLOBAL_VARIABLE_GUID_WINDOWS_STR,
|
||||
buffer, sizeof (buffer))
|
||||
&& GetLastError () != ERROR_INVALID_FUNCTION)
|
||||
&& GetLastError () == ERROR_INVALID_FUNCTION)
|
||||
{
|
||||
platform = PLAT_BIOS;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue