[FREELDR] Whitespace, minor code styles and comments fixes only.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 4 Aug 2019 15:29:07 +0000 (17:29 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 4 Aug 2019 15:47:04 +0000 (17:47 +0200)
boot/freeldr/freeldr/ntldr/setupldr.c
boot/freeldr/freeldr/ntldr/winldr.c

index 10bfe3d..20a7eff 100644 (file)
@@ -73,7 +73,7 @@ SetupLdrLoadNlsData(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR
         return;
     }
 
-    TRACE("NLS data %s %s %s\n", AnsiName, OemName, LangName);
+    TRACE("NLS data '%s' '%s' '%s'\n", AnsiName, OemName, LangName);
 
 #if DBG
     {
@@ -130,7 +130,7 @@ SetupLdrScanBootDrivers(PLIST_ENTRY BootDriverListHead, HINF InfHandle, LPCSTR S
                                                 ServiceName);
                 if (!Success)
                 {
-                    ERR("could not add boot driver %s, %s\n", SearchPath, DriverName);
+                    ERR("Could not add boot driver '%s', '%s'\n", SearchPath, DriverName);
                     return;
                 }
             }
@@ -191,8 +191,7 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
     UiDrawProgressBarCenter(1, 100, "Loading ReactOS Setup...");
 
     /* Read the system path is set in the .ini file */
-    if (!HasSection ||
-        !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
+    if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
     {
         /*
          * IMPROVE: I don't want to call MachDiskGetBootPath here as a
@@ -203,7 +202,7 @@ LoadReactOSSetup(IN OperatingSystemItem* OperatingSystem,
          */
         // MachDiskGetBootPath(BootPath, sizeof(BootPath));
         // strcpy(BootPath, SectionName);
-        BootPath[0] = '\0';
+        BootPath[0] = ANSI_NULL;
     }
 
     /*
index c9bdd84..d888634 100644 (file)
@@ -99,9 +99,9 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
     strncpy(ArcBoot, BootPath, PathSeparator);
     ArcBoot[PathSeparator] = ANSI_NULL;
 
-    TRACE("ArcBoot: %s\n", ArcBoot);
-    TRACE("SystemRoot: %s\n", SystemRoot);
-    TRACE("Options: %s\n", Options);
+    TRACE("ArcBoot: '%s'\n", ArcBoot);
+    TRACE("SystemRoot: '%s'\n", SystemRoot);
+    TRACE("Options: '%s'\n", Options);
 
     /* Fill ARC BootDevice */
     LoaderBlock->ArcBootDeviceName = WinLdrSystemBlock->ArcBootDeviceName;
@@ -122,7 +122,7 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
     strncpy(LoaderBlock->NtHalPathName, HalPath, MAX_PATH);
     LoaderBlock->NtHalPathName = PaToVa(LoaderBlock->NtHalPathName);
 
-    /* Fill LoadOptions and strip the '/' commutator symbol in front of each option */
+    /* Fill LoadOptions and strip the '/' switch symbol in front of each option */
     NewLoadOptions = LoadOptions = LoaderBlock->LoadOptions = WinLdrSystemBlock->LoadOptions;
     strncpy(LoaderBlock->LoadOptions, Options, MAX_OPTIONS_LENGTH);
 
@@ -252,7 +252,7 @@ WinLdrLoadDeviceDriver(PLIST_ENTRY LoadOrderListHead,
         DriverPath[0] = ANSI_NULL;
     }
 
-    TRACE("DriverPath: %s, DllName: %s, LPB\n", DriverPath, DllName);
+    TRACE("DriverPath: '%s', DllName: '%s', LPB\n", DriverPath, DllName);
 
     // Check if driver is already loaded
     Success = WinLdrCheckForLoadedDll(LoadOrderListHead, DllName, DriverDTE);
@@ -506,7 +506,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
         /* Skip possible initial whitespace */
         Options += strspn(Options, " \t");
 
-        /* Check whether a new commutator starts and it is either KERNEL or HAL */
+        /* Check whether a new option starts and it is either KERNEL or HAL */
         if (*Options != '/' || (++Options,
             !(_strnicmp(Options, "KERNEL=", 7) == 0 ||
               _strnicmp(Options, "HAL=",    4) == 0)) )
@@ -524,7 +524,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
                 break;
             }
 
-            /* We have found either KERNEL or HAL commutator */
+            /* We have found either KERNEL or HAL options */
             if (_strnicmp(Options, "KERNEL=", 7) == 0)
             {
                 Options += 7; i -= 7;
@@ -589,7 +589,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
             /* Skip possible initial whitespace */
             Options += strspn(Options, " \t");
 
-            /* Check whether a new commutator starts and it is the DEBUGPORT one */
+            /* Check whether a new option starts and it is the DEBUGPORT one */
             if (*Options != '/' || _strnicmp(++Options, "DEBUGPORT=", 10) != 0)
             {
                 /* Search for another whitespace */
@@ -598,7 +598,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
             }
             else
             {
-                /* We found the DEBUGPORT commutator. Move to the port name. */
+                /* We found the DEBUGPORT option. Move to the port name. */
                 Options += 10;
                 break;
             }
@@ -607,7 +607,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
         if (Options)
         {
             /*
-             * We have found the DEBUGPORT commutator. Parse the port name.
+             * We have found the DEBUGPORT option. Parse the port name.
              * Format: /DEBUGPORT=COM1 or /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log or /DEBUGPORT=FOO
              * If we only have /DEBUGPORT= (i.e. without any port name), defaults it to "COM".
              */
@@ -673,8 +673,7 @@ LoadAndBootWindows(IN OperatingSystemItem* OperatingSystem,
     UiDrawProgressBarCenter(1, 100, "Loading NT...");
 
     /* Read the system path is set in the .ini file */
-    if (!HasSection ||
-        !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
+    if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath)))
     {
         strcpy(BootPath, SectionName);
     }