diff options
| author | Michael Brown | 2008-11-19 04:45:44 +0100 |
|---|---|---|
| committer | Michael Brown | 2008-11-19 20:22:49 +0100 |
| commit | 3f85626fa95cb356a655d3538db6f05231f07003 (patch) | |
| tree | e460ab7fbb1525c43bdbab1018a70f57c8d252a7 /src/interface/efi/efi_console.c | |
| parent | [i386] Move iSCSI and AoE boot code to arch/i386/interface/pcbios (diff) | |
| download | ipxe-3f85626fa95cb356a655d3538db6f05231f07003.tar.gz ipxe-3f85626fa95cb356a655d3538db6f05231f07003.tar.xz ipxe-3f85626fa95cb356a655d3538db6f05231f07003.zip | |
[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_console.c')
| -rw-r--r-- | src/interface/efi/efi_console.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/efi/efi_console.c b/src/interface/efi/efi_console.c index df774e496..b78de618d 100644 --- a/src/interface/efi/efi_console.c +++ b/src/interface/efi/efi_console.c @@ -224,7 +224,8 @@ static int efi_getchar ( void ) { /* Read key from real EFI console */ if ( ( efirc = conin->ReadKeyStroke ( conin, &key ) ) != 0 ) { - DBG ( "EFI could not read keystroke: %x\n", efirc ); + DBG ( "EFI could not read keystroke: %s\n", + efi_strerror ( efirc ) ); return 0; } DBG2 ( "EFI read key stroke with unicode %04x scancode %04x\n", |
