https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e168d60bc50058ec0cf78275d333ce80f90c1ffd
commit e168d60bc50058ec0cf78275d333ce80f90c1ffd Author: Adam Słaboń <asail...@protonmail.com> AuthorDate: Sun Sep 1 08:54:28 2024 +0000 Commit: GitHub <nore...@github.com> CommitDate: Sun Sep 1 11:54:28 2024 +0300 [FREELDR] Fix boot timeout regression on AMD64 (#7281) Initialize the BootMgrInfo struct globally, so the TimeOut value is guaranteed to be negative when no Multiboot cmdline is provided. This could happen when BootMain is called with a NULL pointer: https://git.reactos.org/?p=reactos.git;a=blob;f=boot/freeldr/freeldr/arch/amd64/entry.S;hb=163f3407c8fa93ce06773fdf9fc53064506bd05e#l73 so CmdLine == NULL and LoadSettings is called with NULL, thus the CmdLineParse isn't run. Fixes boot timeout regression introduced in commit 7bee32d2372feb55949714eec5c92ca7ef2754bf which occured only on AMD64 builds. --- boot/freeldr/freeldr/settings.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/boot/freeldr/freeldr/settings.c b/boot/freeldr/freeldr/settings.c index 82051714bcc..7f1e44e51af 100644 --- a/boot/freeldr/freeldr/settings.c +++ b/boot/freeldr/freeldr/settings.c @@ -15,7 +15,7 @@ static CCHAR DebugString[256]; static CCHAR DefaultOs[256]; -BOOTMGRINFO BootMgrInfo = {0}; +BOOTMGRINFO BootMgrInfo = {NULL, NULL, -1, 0}; /* FUNCTIONS ******************************************************************/ @@ -26,12 +26,6 @@ CmdLineParse( PCHAR End, Setting; ULONG_PTR Length, Offset = 0; - /* Set defaults */ - BootMgrInfo.DebugString = NULL; - BootMgrInfo.DefaultOs = NULL; - BootMgrInfo.TimeOut = -1; - // BootMgrInfo.FrLdrSection = 0; - /* * Get the debug string, in the following format: * "debug=option1=XXX;option2=YYY;..."