From 3f75d107259e249ce03de6145225ad7d96d7037f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 23 Nov 2012 22:39:12 +0000 Subject: [PATCH] [FREELDR] 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 | 24 +++++++++++++------ reactos/win32ss/user/ntuser/display.c | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/windows/winldr.c b/reactos/boot/freeldr/freeldr/windows/winldr.c index 25eaa15ed12..e9d03cfb146 100644 --- a/reactos/boot/freeldr/freeldr/windows/winldr.c +++ b/reactos/boot/freeldr/freeldr/windows/winldr.c @@ -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; diff --git a/reactos/win32ss/user/ntuser/display.c b/reactos/win32ss/user/ntuser/display.c index eb3cdbc7c14..350f49717ff 100644 --- a/reactos/win32ss/user/ntuser/display.c +++ b/reactos/win32ss/user/ntuser/display.c @@ -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;