Blame SOURCES/0236-efi-fix-GetVariable-return-status-check-in-81ca24a.patch

a85e8e
From 7e5c1057944796b36d4b6683b757ba166ad047c9 Mon Sep 17 00:00:00 2001
a85e8e
From: Ignat Korchagin <ignat@cloudflare.com>
a85e8e
Date: Fri, 24 Jul 2015 20:46:02 +0300
a85e8e
Subject: [PATCH 236/260] efi: fix GetVariable return status check in 81ca24a
a85e8e
a85e8e
GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
a85e8e
zero; commit incorrectly checked for EFI_SUCCESS.
a85e8e
---
a85e8e
 grub-core/kern/efi/efi.c | 2 +-
a85e8e
 1 file changed, 1 insertion(+), 1 deletion(-)
a85e8e
a85e8e
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
a85e8e
index 0cd64cdb5..101307fc7 100644
a85e8e
--- a/grub-core/kern/efi/efi.c
a85e8e
+++ b/grub-core/kern/efi/efi.c
a85e8e
@@ -243,7 +243,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
a85e8e
 
a85e8e
   status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
a85e8e
 
a85e8e
-  if (status != GRUB_EFI_SUCCESS || !datasize)
a85e8e
+  if (status != GRUB_EFI_BUFFER_TOO_SMALL || !datasize)
a85e8e
     {
a85e8e
       grub_free (var16);
a85e8e
       return NULL;
a85e8e
-- 
a85e8e
2.13.0
a85e8e