diff options
author | Michael Brown | 2014-07-31 12:21:09 +0200 |
---|---|---|
committer | Michael Brown | 2014-07-31 12:57:31 +0200 |
commit | 60891f699ae268ef6ca425013b2427769a5f5fc2 (patch) | |
tree | b00bc550ae61776a71a7c502d63dbd379b66a0ac /src/interface/efi/efi_pci.c | |
parent | [efi] Use efi_handle_name() instead of efi_handle_devpath_text() (diff) | |
download | ipxe-60891f699ae268ef6ca425013b2427769a5f5fc2.tar.gz ipxe-60891f699ae268ef6ca425013b2427769a5f5fc2.tar.xz ipxe-60891f699ae268ef6ca425013b2427769a5f5fc2.zip |
[efi] Use efi_handle_name() instead of efi_devpath_text() where applicable
Using efi_devpath_text() is marginally more efficient if we already
have the device path protocol available, but the mild increase in
efficiency is not worth compromising the clarity of the pattern:
DBGC ( device, "THING %p %s ...", device, efi_handle_name ( device ) );
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_pci.c')
-rw-r--r-- | src/interface/efi/efi_pci.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c index 5b58c9b6..1cd4e63b 100644 --- a/src/interface/efi/efi_pci.c +++ b/src/interface/efi/efi_pci.c @@ -291,15 +291,14 @@ static int efipci_start ( struct efi_device *efidev ) { EFI_OPEN_PROTOCOL_EXCLUSIVE ), pci ) ) != 0 ) { DBGC ( device, "EFIPCI %p %s could not open PCI device: %s\n", - device, efi_devpath_text ( efidev->path ), - strerror ( rc ) ); + device, efi_handle_name ( device ), strerror ( rc ) ); goto err_open; } /* Find driver */ if ( ( rc = pci_find_driver ( pci ) ) != 0 ) { DBGC ( device, "EFIPCI %p %s has no driver\n", - device, efi_devpath_text ( efidev->path ) ); + device, efi_handle_name ( device ) ); goto err_find_driver; } @@ -310,12 +309,12 @@ static int efipci_start ( struct efi_device *efidev ) { /* Probe driver */ if ( ( rc = pci_probe ( pci ) ) != 0 ) { DBGC ( device, "EFIPCI %p %s could not probe driver \"%s\": " - "%s\n", device, efi_devpath_text ( efidev->path ), + "%s\n", device, efi_handle_name ( device ), pci->id->name, strerror ( rc ) ); goto err_probe; } - DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n", device, - efi_devpath_text ( efidev->path ), pci->id->name ); + DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n", + device, efi_handle_name ( device ), pci->id->name ); efidev_set_drvdata ( efidev, pci ); return 0; |