XTLDR Rewrite #7

Merged
belliash merged 184 commits from xtldr_rewrite into master 2024-01-09 18:51:04 +01:00
Showing only changes of commit 9f36d397f0 - Show all commits

View File

@ -78,11 +78,15 @@ BlpConfigUpdateGlobalConfiguration(IN PWCHAR Options)
Argument += 6; Argument += 6;
Length = RtlWideStringLength(Argument, 0); Length = RtlWideStringLength(Argument, 0);
/* Store debug port configuration if not set already */
if(BlpConfiguration.Debug == NULL)
{
/* Save debug port in global configuration */ /* Save debug port in global configuration */
BlMemoryAllocatePool(Length, (PVOID *)&BlpConfiguration.Debug); BlMemoryAllocatePool(Length, (PVOID *)&BlpConfiguration.Debug);
RtlCopyMemory(BlpConfiguration.Debug, Argument, (Length * sizeof(WCHAR)) - 1); RtlCopyMemory(BlpConfiguration.Debug, Argument, (Length * sizeof(WCHAR)) - 1);
BlpConfiguration.Debug[Length] = '\0'; BlpConfiguration.Debug[Length] = '\0';
} }
}
else if(RtlWideStringCompare(Argument, L"SHELL", 5) == 0) else if(RtlWideStringCompare(Argument, L"SHELL", 5) == 0)
{ {
/* Force shell mode */ /* Force shell mode */
@ -94,11 +98,15 @@ BlpConfigUpdateGlobalConfiguration(IN PWCHAR Options)
Argument += 6; Argument += 6;
Length = RtlWideStringLength(Argument, 0); Length = RtlWideStringLength(Argument, 0);
/* Store theme configuration if not set already */
if(BlpConfiguration.Theme == NULL)
{
/* Save theme in global configuration */ /* Save theme in global configuration */
BlMemoryAllocatePool(Length, (PVOID *)&BlpConfiguration.Theme); BlMemoryAllocatePool(Length, (PVOID *)&BlpConfiguration.Theme);
RtlCopyMemory(BlpConfiguration.Theme, Argument, (Length * sizeof(WCHAR)) - 1); RtlCopyMemory(BlpConfiguration.Theme, Argument, (Length * sizeof(WCHAR)) - 1);
BlpConfiguration.Theme[Length] = '\0'; BlpConfiguration.Theme[Length] = '\0';
} }
}
else if(RtlWideStringCompare(Argument, L"TIMEOUT=", 8) == 0) else if(RtlWideStringCompare(Argument, L"TIMEOUT=", 8) == 0)
{ {
/* Skip to the argument value */ /* Skip to the argument value */