summaryrefslogtreecommitdiff
path: root/include/efi_api.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-10-07 05:26:26 +0200
committerAlexander Graf <agraf@suse.de>2018-10-16 15:47:05 +0200
commit0801d4d2fbceb04b4f1983fdd7c2dd5ae728fd74 (patch)
treee9654cd7f843b92ec43762d7491f7451a4a7f86c /include/efi_api.h
parent3ce7829792c50d1e5add3d8ef88883e8298aa4eb (diff)
efi_loader: correct signature of GetPosition, SetPosition
The UEFI spec requires that file positions are passed as u64 in GetPosition() and SetPosition(). Check if the file handle points to a directory in GetPosition(). Provide a unit test for GetPosition() and SetPosition(). Fix Coverity warning CID 184079 (CONSTANT_EXPRESSION_RESULT). Add comments. Fixes: b6dd57773719 ("efi_loader: use correct types in EFI_FILE_PROTOCOL") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_api.h')
-rw-r--r--include/efi_api.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/efi_api.h b/include/efi_api.h
index bea19a5a12..e850b951eb 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -914,9 +914,9 @@ struct efi_file_handle {
efi_status_t (EFIAPI *write)(struct efi_file_handle *file,
efi_uintn_t *buffer_size, void *buffer);
efi_status_t (EFIAPI *getpos)(struct efi_file_handle *file,
- efi_uintn_t *pos);
+ u64 *pos);
efi_status_t (EFIAPI *setpos)(struct efi_file_handle *file,
- efi_uintn_t pos);
+ u64 pos);
efi_status_t (EFIAPI *getinfo)(struct efi_file_handle *file,
const efi_guid_t *info_type, efi_uintn_t *buffer_size,
void *buffer);