@@ -85,7 +85,7 @@ WarnDeprecated(
8585 CHAR msgString [300 ];
8686
8787 /* If the user didn't cancel the timeout, don't display the warning */
88- if (BootMgrInfo . TimeOut >= 0 )
88+ if (GetBootMgrInfo () -> TimeOut >= 0 )
8989 return ;
9090
9191 va_start (ap , MsgFmt );
@@ -183,6 +183,7 @@ BuildArgvForOsLoader(
183183 PCHAR * Argv ;
184184 PCHAR * Args ;
185185 PCHAR SettingName , SettingValue ;
186+ PCCHAR BootPath = FrLdrGetBootPath ();
186187
187188 * pArgc = 0 ;
188189
@@ -208,7 +209,7 @@ BuildArgvForOsLoader(
208209 /* i == 0: Program name */
209210 // TODO: Provide one in the future...
210211 /* i == 1: SystemPartition : from where FreeLdr has been started */
211- Size += (strlen ("SystemPartition=" ) + strlen (FrLdrBootPath ) + 1 ) * sizeof (CHAR );
212+ Size += (strlen ("SystemPartition=" ) + strlen (BootPath ) + 1 ) * sizeof (CHAR );
212213 /* i == 2: LoadIdentifier : ASCII string that may be used
213214 * to associate an identifier with a set of load parameters */
214215 if (LoadIdentifier )
@@ -236,7 +237,7 @@ BuildArgvForOsLoader(
236237 /* i == 1: SystemPartition */
237238 {
238239 strcpy (SettingName , "SystemPartition=" );
239- strcat (SettingName , FrLdrBootPath );
240+ strcat (SettingName , BootPath );
240241
241242 * Args ++ = SettingName ;
242243 SettingName += (strlen (SettingName ) + 1 );
@@ -333,7 +334,7 @@ MainBootMenuKeyPressFilter(
333334 IN PVOID Context OPTIONAL )
334335{
335336 /* Any key-press cancels the global timeout */
336- BootMgrInfo . TimeOut = -1 ;
337+ GetBootMgrInfo () -> TimeOut = -1 ;
337338
338339 switch (KeyPress )
339340 {
@@ -394,7 +395,7 @@ VOID RunLoader(VOID)
394395#endif
395396
396397 /* Debugger main initialization */
397- DebugInit (BootMgrInfo . DebugString );
398+ DebugInit (GetBootMgrInfo () -> DebugString );
398399
399400 /* UI main initialization */
400401 if (!UiInitialize (TRUE))
@@ -427,7 +428,7 @@ VOID RunLoader(VOID)
427428 }
428429
429430 /* Find all the message box settings and run them */
430- UiShowMessageBoxesInSection (BootMgrInfo . FrLdrSection );
431+ UiShowMessageBoxesInSection (GetBootMgrInfo () -> FrLdrSection );
431432
432433 for (;;)
433434 {
@@ -442,7 +443,7 @@ VOID RunLoader(VOID)
442443 OperatingSystemDisplayNames ,
443444 OperatingSystemCount ,
444445 DefaultOperatingSystem ,
445- BootMgrInfo . TimeOut ,
446+ GetBootMgrInfo () -> TimeOut ,
446447 & SelectedOperatingSystem ,
447448 FALSE,
448449 MainBootMenuKeyPressFilter ,
@@ -455,12 +456,12 @@ VOID RunLoader(VOID)
455456 /* Load the chosen operating system */
456457 LoadOperatingSystem (& OperatingSystemList [SelectedOperatingSystem ]);
457458
458- BootMgrInfo . TimeOut = -1 ;
459+ GetBootMgrInfo () -> TimeOut = -1 ;
459460
460461 /* If we get there, the OS loader failed. As it may have
461462 * messed up the display, re-initialize the UI. */
462463#ifndef _M_ARM
463- UiVtbl . UnInitialize ( );
464+ UiUnInitialize ( "" );
464465#endif
465466 UiInitialize (TRUE);
466467 }
0 commit comments