[FREELDR]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 23 Nov 2012 22:39:12 +0000 (22:39 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 23 Nov 2012 22:39:12 +0000 (22:39 +0000)
When filling LoadOptions, strip the '/' commutator symbol in front of each option. Now we fully comply with Windows when holding LoaderBlock->LoadOptions, and the content of the registry value SystemStartOptions under HKLM\CurrentControlSet\Control display the options without their / symbol.

[WIN32K]
Now, the SystemStartOptions value doesn't contain / anymore.

svn path=/trunk/; revision=57752

reactos/boot/freeldr/freeldr/windows/winldr.c
reactos/win32ss/user/ntuser/display.c

index 25eaa15..e9d03cf 100644 (file)
@@ -85,9 +85,10 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
        //CHAR  SystemRoot[] = "\\WINNT\\";
        //CHAR  ArcBoot[] = "multi(0)disk(0)rdisk(0)partition(1)";
 
-       CHAR    HalPath[] = "\\";
-       CHAR    ArcBoot[256];
-       CHAR    MiscFiles[256];
+       LPSTR LoadOptions, NewLoadOptions;
+       CHAR  HalPath[] = "\\";
+       CHAR  ArcBoot[256];
+       CHAR  MiscFiles[256];
        ULONG i;
        ULONG_PTR PathSeparator;
        PLOADER_PARAMETER_EXTENSION Extension;
@@ -120,9 +121,18 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
        strncpy(LoaderBlock->NtHalPathName, HalPath, MAX_PATH);
        LoaderBlock->NtHalPathName = PaToVa(LoaderBlock->NtHalPathName);
 
-       /* Fill load options */
-       LoaderBlock->LoadOptions = WinLdrSystemBlock->LoadOptions;
+       /* Fill LoadOptions and strip the '/' commutator symbol in front of each option */
+       NewLoadOptions = LoadOptions = LoaderBlock->LoadOptions = WinLdrSystemBlock->LoadOptions;
        strncpy(LoaderBlock->LoadOptions, Options, MAX_OPTIONS_LENGTH);
+
+       do
+       {
+               while (*LoadOptions == '/')
+                       ++LoadOptions;
+
+               *NewLoadOptions++ = *LoadOptions;
+       } while (*LoadOptions++);
+
        LoaderBlock->LoadOptions = PaToVa(LoaderBlock->LoadOptions);
 
        /* Arc devices */
@@ -136,8 +146,8 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
 
                /* Allocate the ARC structure */
                ArcDiskSig = HeapAllocate(FrLdrDefaultHeap,
-                                  sizeof(ARC_DISK_SIGNATURE_EX),
-                                 'giSD');
+                                         sizeof(ARC_DISK_SIGNATURE_EX),
+                                         'giSD');
 
                /* Copy the data over */
                ArcDiskSig->DiskSignature.Signature = reactos_arc_disk_info[i].Signature;
index eb3cdbc..350f497 100644 (file)
@@ -173,7 +173,7 @@ InitVideo()
         if (NT_SUCCESS(Status))
         {
             /* Check if VGA mode is requested. */
-            if (wcsstr(awcBuffer, L"/BASEVIDEO") != 0)
+            if (wcsstr(awcBuffer, L"BASEVIDEO") != 0)
             {
                 ERR("VGA mode requested.\n");
                 gbBaseVideo = TRUE;