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