mirror of
https://github.com/ipxe/ipxe
synced 2026-02-03 22:49:29 +03:00
[efi] Extend efi_locate_device() to allow searching up the device path
Extend the functionality of efi_locate_device() to allow callers to find instances of the protocol that may exist further up the device path. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -222,7 +222,7 @@ static int nii_pci_open ( struct nii_nic *nii ) {
|
||||
|
||||
/* Locate PCI I/O protocol */
|
||||
if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid,
|
||||
&pci_device ) ) != 0 ) {
|
||||
&pci_device, 0 ) ) != 0 ) {
|
||||
DBGC ( nii, "NII %s could not locate PCI I/O protocol: %s\n",
|
||||
nii->dev.name, strerror ( rc ) );
|
||||
goto err_locate;
|
||||
|
||||
@@ -80,7 +80,7 @@ static int chained_locate ( struct chained_protocol *chained ) {
|
||||
|
||||
/* Locate handle supporting this protocol */
|
||||
if ( ( rc = efi_locate_device ( device, chained->protocol,
|
||||
&parent ) ) != 0 ) {
|
||||
&parent, 0 ) ) != 0 ) {
|
||||
DBGC ( device, "CHAINED %s does not support %s: %s\n",
|
||||
efi_handle_name ( device ),
|
||||
efi_guid_ntoa ( chained->protocol ), strerror ( rc ) );
|
||||
|
||||
Reference in New Issue
Block a user