mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 00:44:31 -08:00
18 lines
370 B
C
18 lines
370 B
C
#include <efi.h>
|
|
|
|
struct ErrorCode {
|
|
EFI_STATUS code;
|
|
const CHAR16 *desc;
|
|
};
|
|
|
|
extern struct ErrorCode ErrorCodeTable[];
|
|
|
|
const CHAR16 *util_error_message(EFI_STATUS status) {
|
|
int32_t i = -1;
|
|
while (ErrorCodeTable[++i].desc != NULL) {
|
|
if (ErrorCodeTable[i].code == status)
|
|
return ErrorCodeTable[i].desc;
|
|
}
|
|
|
|
return L"Unknown";
|
|
} |