@@ -138,20 +138,20 @@ LoadReactOSSetup(
138138 ARC_STATUS Status ;
139139 PCSTR ArgValue ;
140140 PCSTR SystemPartition ;
141- PCHAR File ;
142- CHAR FileName [MAX_PATH ];
143- CHAR BootPath [MAX_PATH ];
144- CHAR BootOptions2 [256 ];
145- PCSTR LoadOptions ;
146- PSTR BootOptions ;
141+ PCSTR SystemPath ;
142+ PSTR FileName ;
147143 BOOLEAN BootFromFloppy ;
148144 BOOLEAN Success ;
149- ULONG i , ErrorLine ;
150145 HINF InfHandle ;
151146 INFCONTEXT InfContext ;
147+ ULONG i , ErrorLine ;
152148 PLOADER_PARAMETER_BLOCK LoaderBlock ;
153149 PSETUP_LOADER_BLOCK SetupBlock ;
154- PCSTR SystemPath ;
150+ CHAR BootPath [MAX_PATH ];
151+ CHAR FilePath [MAX_PATH ];
152+ CHAR BootOptions2 [256 ];
153+ PSTR BootOptions ;
154+ PCSTR LoadOptions ;
155155
156156 static PCSTR SourcePaths [] =
157157 {
@@ -208,17 +208,17 @@ LoadReactOSSetup(
208208 if (strrchr (BootPath , ')' ) == NULL )
209209 {
210210 /* Temporarily save the boot path */
211- RtlStringCbCopyA (FileName , sizeof (FileName ), BootPath );
211+ RtlStringCbCopyA (FilePath , sizeof (FilePath ), BootPath );
212212
213213 /* This is not a full path: prepend the SystemPartition */
214214 RtlStringCbCopyA (BootPath , sizeof (BootPath ), SystemPartition );
215215
216216 /* Append a path separator if needed */
217- if (* FileName != '\\' && * FileName != '/' )
217+ if (* FilePath != '\\' && * FilePath != '/' )
218218 RtlStringCbCatA (BootPath , sizeof (BootPath ), "\\" );
219219
220220 /* Append the remaining path */
221- RtlStringCbCatA (BootPath , sizeof (BootPath ), FileName );
221+ RtlStringCbCatA (BootPath , sizeof (BootPath ), FilePath );
222222 }
223223
224224 /* Append a path separator if needed */
@@ -235,26 +235,26 @@ LoadReactOSSetup(
235235
236236 TRACE ("BootOptions: '%s'\n" , BootOptions2 );
237237
238- /* Check if a ramdisk file was given */
239- File = strstr (BootOptions2 , "/RDPATH=" );
240- if (File )
238+ /* Check if a RAM disk file was given */
239+ FileName = strstr (BootOptions2 , "/RDPATH=" );
240+ if (FileName )
241241 {
242- /* Load the ramdisk */
242+ /* Load the RAM disk */
243243 Status = RamDiskInitialize (FALSE, BootOptions2 , SystemPartition );
244244 if (Status != ESUCCESS )
245245 {
246- File += 8 ;
246+ FileName += 8 ;
247247 UiMessageBox ("Failed to load RAM disk file '%.*s'" ,
248- strcspn (File , " \t" ), File );
248+ strcspn (FileName , " \t" ), FileName );
249249 return Status ;
250250 }
251251 }
252252
253253 /* Check if we booted from floppy */
254254 BootFromFloppy = strstr (BootPath , "fdisk" ) != NULL ;
255255
256- /* Open 'txtsetup.sif' from any of source paths */
257- File = BootPath + strlen (BootPath );
256+ /* Open 'txtsetup.sif' from any of the source paths */
257+ FileName = BootPath + strlen (BootPath );
258258 for (i = BootFromFloppy ? 0 : 1 ; ; i ++ )
259259 {
260260 SystemPath = SourcePaths [i ];
@@ -263,10 +263,10 @@ LoadReactOSSetup(
263263 UiMessageBox ("Failed to open txtsetup.sif" );
264264 return ENOENT ;
265265 }
266- RtlStringCbCopyA (File , sizeof (BootPath ) - (File - BootPath )* sizeof (CHAR ), SystemPath );
267- RtlStringCbCopyA (FileName , sizeof (FileName ), BootPath );
268- RtlStringCbCatA (FileName , sizeof (FileName ), "txtsetup.sif" );
269- if (InfOpenFile (& InfHandle , FileName , & ErrorLine ))
266+ RtlStringCbCopyA (FileName , sizeof (BootPath ) - (FileName - BootPath )* sizeof (CHAR ), SystemPath );
267+ RtlStringCbCopyA (FilePath , sizeof (FilePath ), BootPath );
268+ RtlStringCbCatA (FilePath , sizeof (FilePath ), "txtsetup.sif" );
269+ if (InfOpenFile (& InfHandle , FilePath , & ErrorLine ))
270270 {
271271 break ;
272272 }
@@ -308,14 +308,14 @@ LoadReactOSSetup(
308308 /* Allocate and minimalist-initialize LPB */
309309 AllocateAndInitLPB (& LoaderBlock );
310310
311- /* Allocate and initialize setup loader block */
311+ /* Allocate and initialize the setup loader block */
312312 SetupBlock = & WinLdrSystemBlock -> SetupBlock ;
313313 LoaderBlock -> SetupLdrBlock = SetupBlock ;
314314
315315 /* Set textmode setup flag */
316316 SetupBlock -> Flags = SETUPLDR_TEXT_MODE ;
317317
318- /* Load the system hive "setupreg.hiv" for setup */
318+ /* Load the "setupreg.hiv" setup system hive */
319319 UiDrawBackdrop ();
320320 UiDrawProgressBarCenter (15 , 100 , "Loading setup system hive..." );
321321 Success = WinLdrInitSystemHive (LoaderBlock , BootPath , TRUE);
@@ -325,9 +325,9 @@ LoadReactOSSetup(
325325 return ENOEXEC ;
326326
327327 /* Load NLS data, they are in the System32 directory of the installation medium */
328- RtlStringCbCopyA (FileName , sizeof (FileName ), BootPath );
329- RtlStringCbCatA (FileName , sizeof (FileName ), "system32\\" );
330- SetupLdrLoadNlsData (LoaderBlock , InfHandle , FileName );
328+ RtlStringCbCopyA (FilePath , sizeof (FilePath ), BootPath );
329+ RtlStringCbCatA (FilePath , sizeof (FilePath ), "system32\\" );
330+ SetupLdrLoadNlsData (LoaderBlock , InfHandle , FilePath );
331331
332332 // UiDrawStatusText("Press F6 if you need to install a 3rd-party SCSI or RAID driver...");
333333
0 commit comments