19 lines
451 B
C
19 lines
451 B
C
//---
|
|
// elf/error - error engine
|
|
//---
|
|
#include "fxBoot/terminal.h"
|
|
#include "./src/hypervisor/internal/elf.h"
|
|
|
|
/* hypervisor_elf_loader_error(): Display error information */
|
|
int hypervisor_elf_loader_error(const struct hel_error_db *db,
|
|
const char *prefix, int errnum)
|
|
{
|
|
for (int i = 0; db[i].strerror != NULL; ++i) {
|
|
if (db[i].id != errnum)
|
|
continue;
|
|
terminal_write("%s %s\n", prefix, db[i].strerror);
|
|
return (0);
|
|
}
|
|
return (-1);
|
|
}
|