efi: fix GetVariable return status check in 81ca24a

GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
zero; commit incorrectly checked for EFI_SUCCESS.
This commit is contained in:
Ignat Korchagin 2015-07-24 20:46:02 +03:00 committed by Andrei Borzenkov
parent 333855c646
commit d5847bf594

View file

@ -238,7 +238,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
if (status != GRUB_EFI_SUCCESS || !datasize)
if (status != GRUB_EFI_BUFFER_TOO_SMALL || !datasize)
{
grub_free (var16);
return NULL;