* @v protocol Protocol GUID
*/
void dbg_efi_protocol ( EFI_HANDLE handle, EFI_GUID *protocol ) {
- EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
VOID *interface;
- EFI_STATUS efirc;
int rc;
/* Get protocol instance */
- if ( ( efirc = bs->HandleProtocol ( handle, protocol,
- &interface ) ) != 0 ) {
- rc = -EEFI ( efirc );
+ if ( ( rc = efi_open ( handle, protocol, &interface ) ) != 0 ) {
printf ( "HANDLE %s could not identify %s: %s\n",
efi_handle_name ( handle ),
efi_guid_ntoa ( protocol ), strerror ( rc ) );
}
/* 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 ) );