git: 101a35e84da3 - main - efi: translate errno to EFI status on exit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Sep 2025 17:30:35 UTC
The branch main has been updated by vexeduxr:
URL: https://cgit.FreeBSD.org/src/commit/?id=101a35e84da311000b9ee12341bbd80bc4c7a721
commit 101a35e84da311000b9ee12341bbd80bc4c7a721
Author: Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2025-09-09 17:19:59 +0000
Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2025-09-09 17:19:59 +0000
efi: translate errno to EFI status on exit
Translate the given errno to an efi status instead of always exiting
with EFI_LOAD_ERROR.
---
stand/efi/boot1/boot1.c | 4 ++--
stand/efi/loader/efi_main.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c
index b93c6b425160..c906b430c0d6 100644
--- a/stand/efi/boot1/boot1.c
+++ b/stand/efi/boot1/boot1.c
@@ -299,9 +299,9 @@ efi_exit(EFI_STATUS s)
}
void
-exit(int error __unused)
+exit(int error)
{
- efi_exit(EFI_LOAD_ERROR);
+ efi_exit(errno_to_efi_status(error));
}
/*
diff --git a/stand/efi/loader/efi_main.c b/stand/efi/loader/efi_main.c
index 2a5120dc89d7..6eea6f25c152 100644
--- a/stand/efi/loader/efi_main.c
+++ b/stand/efi/loader/efi_main.c
@@ -49,7 +49,7 @@ void
exit(int status)
{
- efi_exit(EFI_LOAD_ERROR);
+ efi_exit(errno_to_efi_status(status));
}
static CHAR16 *