mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
[efi] Eliminate uses of HandleProtocol()
It is now simpler to use efi_open() than to use HandleProtocol() to obtain an ephemeral protocol instance. Remove all remaining uses of HandleProtocol() to simplify the code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1000,10 +1000,8 @@ static int efi_file_path_claim ( struct efi_file_path *file ) {
|
||||
}
|
||||
|
||||
/* Locate device path protocol on this handle */
|
||||
if ( ( ( efirc = bs->HandleProtocol ( handle,
|
||||
&efi_device_path_protocol_guid,
|
||||
&old ) ) != 0 ) ) {
|
||||
rc = -EEFI ( efirc );
|
||||
if ( ( rc = efi_open ( handle, &efi_device_path_protocol_guid,
|
||||
&old ) != 0 ) ) {
|
||||
DBGC ( file, "EFIFILE %s could not locate %s: %s\n",
|
||||
efi_file_name ( &file->file ),
|
||||
efi_devpath_text ( file->path ), strerror ( rc ) );
|
||||
|
||||
Reference in New Issue
Block a user