efi_loader: correct signature of GetPosition, SetPosition
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 7 Oct 2018 03:26:26 +0000 (05:26 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 16 Oct 2018 13:47:05 +0000 (15:47 +0200)
commit0801d4d2fbceb04b4f1983fdd7c2dd5ae728fd74
treee9654cd7f843b92ec43762d7491f7451a4a7f86c
parent3ce7829792c50d1e5add3d8ef88883e8298aa4eb
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>
include/efi_api.h
lib/efi_loader/efi_file.c
lib/efi_selftest/efi_selftest_block_device.c