[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.
This commit is contained in:
Michael Brown
2008-11-19 19:22:49 +00:00
parent d9b3d09910
commit 3f85626fa9
9 changed files with 81 additions and 31 deletions
+2 -1
View File
@@ -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",