git: cd9b43edd5a7 - main - loader/efi: return error from efi_find_framebuffer
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Sep 2025 17:30:32 UTC
The branch main has been updated by vexeduxr:
URL: https://cgit.FreeBSD.org/src/commit/?id=cd9b43edd5a716fdb764adc281a4a09c617148f0
commit cd9b43edd5a716fdb764adc281a4a09c617148f0
Author: Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2025-09-09 17:19:33 +0000
Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2025-09-09 17:19:33 +0000
loader/efi: return error from efi_find_framebuffer
Also return actual errno values in other code paths.
(suggested by tsoome)
Reviewed by: tsoome, imp
Differential Revision: https://reviews.freebsd.org/D52432
---
stand/efi/loader/framebuffer.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c
index 141a29305f7c..fc61ed15ba3c 100644
--- a/stand/efi/loader/framebuffer.c
+++ b/stand/efi/loader/framebuffer.c
@@ -630,7 +630,7 @@ efi_find_framebuffer(teken_gfx_t *gfx_state)
gfx_state->tg_fb_type = FB_UGA;
gfx_state->tg_private = uga;
} else {
- return (1);
+ return (efi_status_to_errno(status));
}
}
@@ -644,9 +644,12 @@ efi_find_framebuffer(teken_gfx_t *gfx_state)
break;
default:
- return (1);
+ return (EINVAL);
}
+ if (rv != 0)
+ return (rv);
+
gfx_state->tg_fb.fb_addr = efifb.fb_addr;
gfx_state->tg_fb.fb_size = efifb.fb_size;
gfx_state->tg_fb.fb_height = efifb.fb_height;