The branch main has been updated by vexeduxr:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=cd9b43edd5a716fdb764adc281a4a09c617148f0

commit cd9b43edd5a716fdb764adc281a4a09c617148f0
Author:     Ahmad Khalifa <vexed...@freebsd.org>
AuthorDate: 2025-09-09 17:19:33 +0000
Commit:     Ahmad Khalifa <vexed...@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;

Reply via email to