boot1.efi: provide generic exit() and stub getchar()

panic() is expecting us to have exit and getchar, lets provide those.
This commit is contained in:
Toomas Soome 2019-10-15 08:33:05 +00:00
parent fcd69db27d
commit abc23d5932
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353544

View File

@ -293,6 +293,18 @@ add_device(dev_info_t **devinfop, dev_info_t *devinfo)
dev->next = devinfo;
}
void
efi_exit(EFI_STATUS s)
{
BS->Exit(IH, s, 0, NULL);
}
void
exit(int error __unused)
{
efi_exit(EFI_LOAD_ERROR);
}
/*
* OK. We totally give up. Exit back to EFI with a sensible status so
* it can try the next option on the list.
@ -308,7 +320,12 @@ efi_panic(EFI_STATUS s, const char *fmt, ...)
va_end(ap);
printf("\n");
BS->Exit(IH, s, 0, NULL);
efi_exit(s);
}
int getchar(void)
{
return (-1);
}
void