|
|
a85e8e |
From ba80a1fbdd780c9731067d83a68f50232a721614 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
|
|
a85e8e |
Date: Wed, 25 Dec 2013 22:36:28 +0400
|
|
|
a85e8e |
Subject: [PATCH 001/260] fix EFI detection on Windows
|
|
|
a85e8e |
|
|
|
a85e8e |
We are on legacy BIOS if GetFirmwareEnvironmentVariable fails (returns
|
|
|
a85e8e |
zero) *and* extended error information is ERROR_INVALID_FUNCTION.
|
|
|
a85e8e |
|
|
|
a85e8e |
Cf. http://msdn.microsoft.com/en-us/library/windows/desktop/ms724325%28v=vs.85%29.aspx
|
|
|
a85e8e |
---
|
|
|
a85e8e |
ChangeLog | 5 +++++
|
|
|
a85e8e |
grub-core/osdep/windows/platform.c | 2 +-
|
|
|
a85e8e |
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/ChangeLog b/ChangeLog
|
|
|
a85e8e |
index 41bcebfb3..21ec1c77c 100644
|
|
|
a85e8e |
--- a/ChangeLog
|
|
|
a85e8e |
+++ b/ChangeLog
|
|
|
a85e8e |
@@ -1,3 +1,8 @@
|
|
|
a85e8e |
+2013-12-25 Andrey Borzenkov <arvidjaar@gmail.com>
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ * grub-core/osdep/windows/platform.c (get_platform): Fix EFI
|
|
|
a85e8e |
+ detection.
|
|
|
a85e8e |
+
|
|
|
a85e8e |
2013-12-24 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
a85e8e |
|
|
|
a85e8e |
* configure.ac: Set version to 2.02~beta2.
|
|
|
a85e8e |
diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
|
|
|
a85e8e |
index f2b9d7143..d217efe17 100644
|
|
|
a85e8e |
--- a/grub-core/osdep/windows/platform.c
|
|
|
a85e8e |
+++ b/grub-core/osdep/windows/platform.c
|
|
|
a85e8e |
@@ -100,7 +100,7 @@ get_platform (void)
|
|
|
a85e8e |
|
|
|
a85e8e |
if (!func_GetFirmwareEnvironmentVariableW (L"BootOrder", GRUB_EFI_GLOBAL_VARIABLE_GUID_WINDOWS_STR,
|
|
|
a85e8e |
buffer, sizeof (buffer))
|
|
|
a85e8e |
- && GetLastError () != ERROR_INVALID_FUNCTION)
|
|
|
a85e8e |
+ && GetLastError () == ERROR_INVALID_FUNCTION)
|
|
|
a85e8e |
{
|
|
|
a85e8e |
platform = PLAT_BIOS;
|
|
|
a85e8e |
return;
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|