Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2019 08:33:06 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353544 - head/stand/efi/boot1
Message-ID:  <201910150833.x9F8X6Wn097372@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Tue Oct 15 08:33:05 2019
New Revision: 353544
URL: https://svnweb.freebsd.org/changeset/base/353544

Log:
  boot1.efi: provide generic exit() and stub getchar()
  
  panic() is expecting us to have exit and getchar, lets provide those.

Modified:
  head/stand/efi/boot1/boot1.c

Modified: head/stand/efi/boot1/boot1.c
==============================================================================
--- head/stand/efi/boot1/boot1.c	Tue Oct 15 06:19:33 2019	(r353543)
+++ head/stand/efi/boot1/boot1.c	Tue Oct 15 08:33:05 2019	(r353544)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910150833.x9F8X6Wn097372>