From e87a74f131228c7dfeda7f6d7f5581905a829312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 4 Apr 2026 17:55:19 +0200 Subject: [PATCH] [FREELDR] LaunchSecondStageLoader(): Always return ESUCCESS if rosload.exe started correctly... instead of returning an erroneous value, since the rosload.exe entry point `RunLoader()` doesn't return any value. This allows exiting from rosload.exe and NOT having the `LaunchSecondStageLoader()` returning 0, for example, which would then be interpreted as an error condition and showing the "Unable to load second stage loader." error box. --- boot/freeldr/freeldr/freeldr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/freeldr/freeldr/freeldr.c b/boot/freeldr/freeldr/freeldr.c index e39cf7e84aa..c104dc42e43 100644 --- a/boot/freeldr/freeldr/freeldr.c +++ b/boot/freeldr/freeldr/freeldr.c @@ -85,7 +85,8 @@ LaunchSecondStageLoader(VOID) /* Call the entrypoint */ printf("Launching rosload.exe...\n"); EntryPoint = VaToPa(RosloadDTE->EntryPoint); - return (*EntryPoint)(); + (*EntryPoint)(); + return ESUCCESS; } VOID __cdecl BootMain(IN PCCH CmdLine)