mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
efi_loader: eliminate efi_get_(non)volatile_variable
Eliminate superfluous functions efi_get_volatile_variable() and efi_get_nonvolatile_variable(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -600,8 +600,7 @@ static
|
|||||||
efi_status_t EFIAPI efi_get_variable_common(u16 *variable_name,
|
efi_status_t EFIAPI efi_get_variable_common(u16 *variable_name,
|
||||||
const efi_guid_t *vendor,
|
const efi_guid_t *vendor,
|
||||||
u32 *attributes,
|
u32 *attributes,
|
||||||
efi_uintn_t *data_size, void *data,
|
efi_uintn_t *data_size, void *data)
|
||||||
bool is_non_volatile)
|
|
||||||
{
|
{
|
||||||
char *native_name;
|
char *native_name;
|
||||||
efi_status_t ret;
|
efi_status_t ret;
|
||||||
@@ -684,27 +683,6 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
efi_status_t EFIAPI efi_get_volatile_variable(u16 *variable_name,
|
|
||||||
const efi_guid_t *vendor,
|
|
||||||
u32 *attributes,
|
|
||||||
efi_uintn_t *data_size,
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
return efi_get_variable_common(variable_name, vendor, attributes,
|
|
||||||
data_size, data, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
efi_status_t EFIAPI efi_get_nonvolatile_variable(u16 *variable_name,
|
|
||||||
const efi_guid_t *vendor,
|
|
||||||
u32 *attributes,
|
|
||||||
efi_uintn_t *data_size,
|
|
||||||
void *data)
|
|
||||||
{
|
|
||||||
return efi_get_variable_common(variable_name, vendor, attributes,
|
|
||||||
data_size, data, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* efi_efi_get_variable() - retrieve value of a UEFI variable
|
* efi_efi_get_variable() - retrieve value of a UEFI variable
|
||||||
*
|
*
|
||||||
@@ -729,12 +707,8 @@ efi_status_t EFIAPI efi_get_variable(u16 *variable_name,
|
|||||||
EFI_ENTRY("\"%ls\" %pUl %p %p %p", variable_name, vendor, attributes,
|
EFI_ENTRY("\"%ls\" %pUl %p %p %p", variable_name, vendor, attributes,
|
||||||
data_size, data);
|
data_size, data);
|
||||||
|
|
||||||
ret = efi_get_volatile_variable(variable_name, vendor, attributes,
|
ret = efi_get_variable_common(variable_name, vendor, attributes,
|
||||||
data_size, data);
|
data_size, data);
|
||||||
if (ret == EFI_NOT_FOUND)
|
|
||||||
ret = efi_get_nonvolatile_variable(variable_name, vendor,
|
|
||||||
attributes, data_size, data);
|
|
||||||
|
|
||||||
return EFI_EXIT(ret);
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user