diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-05-17 07:57:05 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-06-03 15:27:20 +0200 |
commit | 45c66f9cdfe40aee78c01ea3f4cdc9573b2c60ed (patch) | |
tree | 459089a29222d5c60ea4f6f61ba77a660255809d /lib/efi_loader/efi_bootmgr.c | |
parent | e37aa7ada39f5291ce92f7d8bc2b66917fb5f8fa (diff) | |
download | u-boot-45c66f9cdfe40aee78c01ea3f4cdc9573b2c60ed.tar.gz |
efi_loader: adjust definitions of variable services
The definitons of the variable services are adjusted:
- use efi_uintn_t instead of unsigned long
- use u16 * instead of s16 * for Unicode strings
- correct definition of QueryVariableInfo
- rename efi_get_next_variable to efi_get_next_variable_name
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r-- | lib/efi_loader/efi_bootmgr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index 153e173757..853358ab93 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -70,17 +70,17 @@ static void parse_load_option(struct load_option *lo, void *ptr) /* free() the result */ static void *get_var(u16 *name, const efi_guid_t *vendor, - unsigned long *size) + efi_uintn_t *size) { efi_guid_t *v = (efi_guid_t *)vendor; efi_status_t ret; void *buf = NULL; *size = 0; - EFI_CALL(ret = rs->get_variable((s16 *)name, v, NULL, size, buf)); + EFI_CALL(ret = rs->get_variable(name, v, NULL, size, buf)); if (ret == EFI_BUFFER_TOO_SMALL) { buf = malloc(*size); - EFI_CALL(ret = rs->get_variable((s16 *)name, v, NULL, size, buf)); + EFI_CALL(ret = rs->get_variable(name, v, NULL, size, buf)); } if (ret != EFI_SUCCESS) { @@ -104,7 +104,7 @@ static void *try_load_entry(uint16_t n, struct efi_device_path **device_path, u16 varname[] = L"Boot0000"; u16 hexmap[] = L"0123456789ABCDEF"; void *load_option, *image = NULL; - unsigned long size; + efi_uintn_t size; varname[4] = hexmap[(n & 0xf000) >> 12]; varname[5] = hexmap[(n & 0x0f00) >> 8]; @@ -147,7 +147,7 @@ void *efi_bootmgr_load(struct efi_device_path **device_path, struct efi_device_path **file_path) { uint16_t *bootorder; - unsigned long size; + efi_uintn_t size; void *image = NULL; int i, num; |