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

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