aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_pci.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-11-18 19:45:44 -0800
committerMichael Brown <mcb30@etherboot.org>2008-11-19 19:22:49 +0000
commit3f85626fa95cb356a655d3538db6f05231f07003 (patch)
treee460ab7fbb1525c43bdbab1018a70f57c8d252a7 /src/interface/efi/efi_pci.c
parentd9b3d0991091b8dd568b17221e335ecf81beb02f (diff)
downloadipxe-3f85626fa95cb356a655d3538db6f05231f07003.tar.gz
[efi] Add efi_strerror()
EFI_STATUS is defined as an INTN, which maps to UINT32 (i.e. unsigned int) on i386 and UINT64 (i.e. unsigned long) on x86_64. This would require a cast each time the error status is printed. Add efi_strerror() to avoid this ickiness and simultaneously enable prettier reporting of EFI status codes.
Diffstat (limited to 'src/interface/efi/efi_pci.c')
-rw-r--r--src/interface/efi/efi_pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c
index 308a53888..f87b54071 100644
--- a/src/interface/efi/efi_pci.c
+++ b/src/interface/efi/efi_pci.c
@@ -46,9 +46,9 @@ int efipci_read ( struct pci_device *pci, unsigned long location,
efipci_address ( pci, location ), 1,
value ) ) != 0 ) {
DBG ( "EFIPCI config read from %02x:%02x.%x offset %02lx "
- "failed: %x\n", pci->bus, PCI_SLOT ( pci->devfn ),
+ "failed: %s\n", pci->bus, PCI_SLOT ( pci->devfn ),
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
- efirc );
+ efi_strerror ( efirc ) );
return -EIO;
}
@@ -63,9 +63,9 @@ int efipci_write ( struct pci_device *pci, unsigned long location,
efipci_address ( pci, location ), 1,
&value ) ) != 0 ) {
DBG ( "EFIPCI config write to %02x:%02x.%x offset %02lx "
- "failed: %x\n", pci->bus, PCI_SLOT ( pci->devfn ),
+ "failed: %s\n", pci->bus, PCI_SLOT ( pci->devfn ),
PCI_FUNC ( pci->devfn ), EFIPCI_OFFSET ( location ),
- efirc );
+ efi_strerror ( efirc ) );
return -EIO;
}