summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/assert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi/assert.c')
-rw-r--r--src/boot/efi/assert.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/boot/efi/assert.c b/src/boot/efi/assert.c
new file mode 100644
index 0000000..bb16d2b
--- /dev/null
+++ b/src/boot/efi/assert.c
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <efi.h>
+#include <efilib.h>
+
+#include "util.h"
+
+void efi_assert(const char *expr, const char *file, unsigned line, const char *function) {
+ log_error_stall(L"systemd-boot assertion '%a' failed at %a:%u, function %a(). Halting.", expr, file, line, function);
+ for (;;)
+ BS->Stall(60 * 1000 * 1000);
+}