@ -113,7 +113,7 @@ static char *mem2hex(char *hexstr, const u8 *mem, int count)
return hexstr ;
return hexstr ;
}
}
static efi_status_t efi_to_native ( char * native , s 16 * variable_name ,
static efi_status_t efi_to_native ( char * native , u 16 * variable_name ,
efi_guid_t * vendor )
efi_guid_t * vendor )
{
{
size_t len ;
size_t len ;
@ -176,9 +176,9 @@ static const char *parse_attr(const char *str, u32 *attrp)
}
}
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetVariable.28.29 */
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetVariable.28.29 */
efi_status_t EFIAPI efi_get_variable ( s 16 * variable_name ,
efi_status_t EFIAPI efi_get_variable ( u 16 * variable_name , efi_guid_t * vendor ,
efi_guid_t * vendor , u32 * attributes ,
u32 * attributes , efi_uintn_t * data_size ,
unsigned long * data_size , void * data )
void * data )
{
{
char native_name [ MAX_NATIVE_VAR_NAME + 1 ] ;
char native_name [ MAX_NATIVE_VAR_NAME + 1 ] ;
efi_status_t ret ;
efi_status_t ret ;
@ -250,9 +250,9 @@ efi_status_t EFIAPI efi_get_variable(s16 *variable_name,
}
}
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetNextVariableName.28.29 */
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#GetNextVariableName.28.29 */
efi_status_t EFIAPI efi_get_next_variable (
efi_status_t EFIAPI efi_get_next_variable_name ( efi_uintn_t * variable_name_size ,
unsigned long * variable_name_siz e ,
u16 * variable_name ,
s16 * variable_name , efi_guid_t * vendor )
efi_guid_t * vendor )
{
{
EFI_ENTRY ( " %p \" %ls \" %pUl " , variable_name_size , variable_name , vendor ) ;
EFI_ENTRY ( " %p \" %ls \" %pUl " , variable_name_size , variable_name , vendor ) ;
@ -260,16 +260,16 @@ efi_status_t EFIAPI efi_get_next_variable(
}
}
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#SetVariable.28.29 */
/* http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES#SetVariable.28.29 */
efi_status_t EFIAPI efi_set_variable ( s 16 * variable_name ,
efi_status_t EFIAPI efi_set_variable ( u 16 * variable_name , efi_guid_t * vendor ,
efi_guid_t * vendor , u32 attributes ,
u32 attributes , efi_uintn_t data_size ,
unsigned long data_size , void * data )
void * data )
{
{
char native_name [ MAX_NATIVE_VAR_NAME + 1 ] ;
char native_name [ MAX_NATIVE_VAR_NAME + 1 ] ;
efi_status_t ret = EFI_SUCCESS ;
efi_status_t ret = EFI_SUCCESS ;
char * val , * s ;
char * val , * s ;
u32 attr ;
u32 attr ;
EFI_ENTRY ( " \" %ls \" %pUl %x %l u %p " , variable_name , vendor , attributes ,
EFI_ENTRY ( " \" %ls \" %pUl %x %z u %p " , variable_name , vendor , attributes ,
data_size , data ) ;
data_size , data ) ;
if ( ! variable_name | | ! vendor )
if ( ! variable_name | | ! vendor )