* [PATCH] fix EFI detection on Windows
@ 2013-12-25 18:26 Andrey Borzenkov
2013-12-25 18:29 ` Vladimir 'phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2013-12-25 18:26 UTC (permalink / raw)
To: grub-devel
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
---
grub-core/osdep/windows/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
index f2b9d71..d217efe 100644
--- a/grub-core/osdep/windows/platform.c
+++ b/grub-core/osdep/windows/platform.c
@@ -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;
--
tg: (e8f0782..) u/windows-efi-detection (depends on: master)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix EFI detection on Windows
2013-12-25 18:26 [PATCH] fix EFI detection on Windows Andrey Borzenkov
@ 2013-12-25 18:29 ` Vladimir 'phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2013-12-25 18:29 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
go ahead
On Dec 25, 2013 7:27 PM, "Andrey Borzenkov" <arvidjaar@gmail.com> wrote:
> 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
>
> ---
> grub-core/osdep/windows/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/osdep/windows/platform.c
> b/grub-core/osdep/windows/platform.c
> index f2b9d71..d217efe 100644
> --- a/grub-core/osdep/windows/platform.c
> +++ b/grub-core/osdep/windows/platform.c
> @@ -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;
> --
> tg: (e8f0782..) u/windows-efi-detection (depends on: master)
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: Type: text/html, Size: 1818 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-25 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-25 18:26 [PATCH] fix EFI detection on Windows Andrey Borzenkov
2013-12-25 18:29 ` Vladimir 'phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).