From abc23d5932ae92bdf32c7d39958049e0fa0ba259 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 15 Oct 2019 08:33:05 +0000 Subject: [PATCH] boot1.efi: provide generic exit() and stub getchar() panic() is expecting us to have exit and getchar, lets provide those. --- stand/efi/boot1/boot1.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index b0c85c5dfee1..22bff7f10fba 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -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