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:
parent
333855c646
commit
d5847bf594
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue