mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 12:31:51 +00:00
Missed these guys.
svn path=/trunk/; revision=55694
This commit is contained in:
parent
d68458a259
commit
fa51806949
5 changed files with 17 additions and 48 deletions
|
@ -326,7 +326,7 @@ CheckVolume(
|
|||
NtDrivePath[wcslen(NtDrivePath)-1] = 0;
|
||||
RtlInitUnicodeString(&DrivePathU, NtDrivePath);
|
||||
|
||||
DPRINT1("AUTOCHK: Checking %wZ\n", &DrivePathU);
|
||||
DPRINT("AUTOCHK: Checking %wZ\n", &DrivePathU);
|
||||
Status = ChkdskFunc(&DrivePathU,
|
||||
TRUE, // FixErrors
|
||||
TRUE, // Verbose
|
||||
|
|
|
@ -96,7 +96,7 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken)
|
|||
}
|
||||
|
||||
/* Parse the specified and get the name and arguments out of it */
|
||||
DPRINT1("SMSS:PFILE: Paging file specifier `%wZ' \n", PageFileToken);
|
||||
DPRINT("SMSS:PFILE: Paging file specifier `%wZ' \n", PageFileToken);
|
||||
Status = SmpParseCommandLine(PageFileToken,
|
||||
NULL,
|
||||
&PageFileName,
|
||||
|
@ -212,7 +212,7 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken)
|
|||
/* This means no duplicates exist, so insert our descriptor! */
|
||||
InsertTailList(&SmpPagingFileDescriptorList, &Descriptor->Entry);
|
||||
SmpNumberOfPagingFiles++;
|
||||
DPRINT1("SMSS:PFILE: Created descriptor for `%wZ' (`%wZ') \n",
|
||||
DPRINT("SMSS:PFILE: Created descriptor for `%wZ' (`%wZ') \n",
|
||||
PageFileToken, &Descriptor->Name);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ SmpGetPagingFileSize(IN PUNICODE_STRING FileName,
|
|||
HANDLE FileHandle;
|
||||
FILE_STANDARD_INFORMATION StandardInfo;
|
||||
|
||||
DPRINT1("SMSS:PFILE: Trying to get size for `%wZ'\n", FileName);
|
||||
DPRINT("SMSS:PFILE: Trying to get size for `%wZ'\n", FileName);
|
||||
Size->QuadPart = 0;
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
@ -350,7 +350,7 @@ SmpGetVolumeFreeSpace(IN PSMP_VOLUME_DESCRIPTOR Volume)
|
|||
VolumeName.Length = wcslen(PathString) * sizeof(WCHAR);
|
||||
VolumeName.MaximumLength = VolumeName.Length + sizeof(UNICODE_NULL);
|
||||
VolumeName.Buffer[STANDARD_DRIVE_LETTER_OFFSET] = Volume->DriveLetter;
|
||||
DPRINT1("SMSS:PFILE: Querying volume `%wZ' for free space \n", &VolumeName);
|
||||
DPRINT("SMSS:PFILE: Querying volume `%wZ' for free space \n", &VolumeName);
|
||||
|
||||
/* Open the volume */
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
@ -395,10 +395,6 @@ SmpGetVolumeFreeSpace(IN PSMP_VOLUME_DESCRIPTOR Volume)
|
|||
SizeInfo.SectorsPerAllocationUnit;
|
||||
FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector;
|
||||
Volume->FreeSpace = FinalFreeSpace;
|
||||
DPRINT1("AUs: %I64x Sectors: %lx Bytes Per Sector: %lx\n",
|
||||
SizeInfo.AvailableAllocationUnits.QuadPart,
|
||||
SizeInfo.SectorsPerAllocationUnit,
|
||||
SizeInfo.BytesPerSector);
|
||||
|
||||
/* Check if there's less than 32MB free so we don't starve the disk */
|
||||
if (FinalFreeSpace.QuadPart <= 0x2000000)
|
||||
|
@ -460,7 +456,7 @@ SmpCreatePagingFile(IN PUNICODE_STRING Name,
|
|||
Status = NtCreatePagingFile(Name, MinSize, MaxSize, Priority);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("SMSS:PFILE: NtCreatePagingFile (%wZ, %I64X, %I64X) succeeded. \n",
|
||||
DPRINT("SMSS:PFILE: NtCreatePagingFile (%wZ, %I64X, %I64X) succeeded. \n",
|
||||
Name,
|
||||
MinSize->QuadPart,
|
||||
MaxSize->QuadPart);
|
||||
|
@ -508,7 +504,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
|
|||
if (!(Descriptor->Flags & SMP_PAGEFILE_DUMP_PROCESSED))
|
||||
{
|
||||
/* Try to find a crash dump and extract it */
|
||||
DPRINT1("SMSS:PFILE: Checking for crash dump in `%wZ' on boot volume \n",
|
||||
DPRINT("SMSS:PFILE: Checking for crash dump in `%wZ' on boot volume \n",
|
||||
&Descriptor->Name);
|
||||
SmpCheckForCrashDump(&Descriptor->Name);
|
||||
|
||||
|
@ -521,7 +517,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
|
|||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Queried free space for boot volume `%wC: %I64x'\n",
|
||||
DPRINT("Queried free space for boot volume `%wC: %I64x'\n",
|
||||
Volume->DriveLetter, Volume->FreeSpace.QuadPart);
|
||||
}
|
||||
|
||||
|
@ -532,7 +528,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
|
|||
else
|
||||
{
|
||||
/* Crashdumps can only be on the boot volume */
|
||||
DPRINT1("SMSS:PFILE: Skipping crash dump checking for `%wZ' on non boot"
|
||||
DPRINT("SMSS:PFILE: Skipping crash dump checking for `%wZ' on non boot"
|
||||
"volume `%wC' \n",
|
||||
&Descriptor->Name,
|
||||
Volume->DriveLetter);
|
||||
|
@ -545,10 +541,10 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
|
|||
/* Check how big we can make the pagefile */
|
||||
Status = SmpGetPagingFileSize(&Descriptor->Name, &PageFileSize);
|
||||
if (PageFileSize.QuadPart > 0) ShouldDelete = TRUE;
|
||||
DPRINT1("SMSS:PFILE: Detected size %I64X for future paging file `%wZ'\n",
|
||||
DPRINT("SMSS:PFILE: Detected size %I64X for future paging file `%wZ'\n",
|
||||
PageFileSize,
|
||||
&Descriptor->Name);
|
||||
DPRINT1("SMSS:PFILE: Free space on volume `%wC' is %I64X \n",
|
||||
DPRINT("SMSS:PFILE: Free space on volume `%wC' is %I64X \n",
|
||||
Volume->DriveLetter,
|
||||
Volume->FreeSpace.QuadPart);
|
||||
|
||||
|
@ -562,7 +558,7 @@ SmpCreatePagingFileOnFixedDrive(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor,
|
|||
{
|
||||
Descriptor->ActualMaxSize = PageFileSize;
|
||||
}
|
||||
DPRINT1("SMSS:PFILE: min %I64X, max %I64X, real min %I64X \n",
|
||||
DPRINT("SMSS:PFILE: min %I64X, max %I64X, real min %I64X \n",
|
||||
Descriptor->ActualMinSize.QuadPart,
|
||||
Descriptor->ActualMaxSize.QuadPart,
|
||||
MinimumSize->QuadPart);
|
||||
|
@ -697,7 +693,7 @@ SmpValidatePagingFileSizes(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor)
|
|||
/* Capture the min and max */
|
||||
MinSize = Descriptor->MinSize.QuadPart;
|
||||
MaxSize = Descriptor->MaxSize.QuadPart;
|
||||
DPRINT1("SMSS:PFILE: Validating sizes for `%wZ' %I64X %I64X\n",
|
||||
DPRINT("SMSS:PFILE: Validating sizes for `%wZ' %I64X %I64X\n",
|
||||
&Descriptor->Name, MinSize, MaxSize);
|
||||
|
||||
/* Don't let minimum be bigger than maximum */
|
||||
|
@ -732,7 +728,7 @@ SmpValidatePagingFileSizes(IN PSMP_PAGEFILE_DESCRIPTOR Descriptor)
|
|||
if (WasTooBig)
|
||||
{
|
||||
/* Notify debugger output and write a flag in the descriptor */
|
||||
DPRINT1("SMSS:PFILE: Trimmed size of `%wZ' to maximum allowed \n",
|
||||
DPRINT("SMSS:PFILE: Trimmed size of `%wZ' to maximum allowed \n",
|
||||
&Descriptor->Name);
|
||||
Descriptor->Flags |= SMP_PAGEFILE_WAS_TOO_BIG;
|
||||
}
|
||||
|
@ -972,10 +968,6 @@ SmpCreateVolumeDescriptors(VOID)
|
|||
SizeInfo.SectorsPerAllocationUnit;
|
||||
FinalFreeSpace.QuadPart = FreeSpace.QuadPart * SizeInfo.BytesPerSector;
|
||||
Volume->FreeSpace = FinalFreeSpace;
|
||||
DPRINT1("AUs: %I64x Sectors: %lx Bytes Per Sector: %lx\n",
|
||||
SizeInfo.AvailableAllocationUnits.QuadPart,
|
||||
SizeInfo.SectorsPerAllocationUnit,
|
||||
SizeInfo.BytesPerSector);
|
||||
|
||||
/* Check if there's less than 32MB free so we don't starve the disk */
|
||||
if (FinalFreeSpace.QuadPart <= 0x2000000)
|
||||
|
@ -992,7 +984,7 @@ SmpCreateVolumeDescriptors(VOID)
|
|||
/* All done, add this volume to our descriptor list */
|
||||
InsertTailList(&SmpVolumeDescriptorList, &Volume->Entry);
|
||||
Volume->Flags |= SMP_VOLUME_INSERTED;
|
||||
DPRINT1("SMSS:PFILE: Created volume descriptor for`%wZ' \n", &VolumePath);
|
||||
DPRINT("SMSS:PFILE: Created volume descriptor for`%wZ' \n", &VolumePath);
|
||||
}
|
||||
|
||||
/* We must've found at least the boot volume */
|
||||
|
@ -1045,7 +1037,7 @@ SmpCreatePagingFiles(VOID)
|
|||
if (Descriptor->Flags & SMP_PAGEFILE_SYSTEM_MANAGED)
|
||||
{
|
||||
/* This is a system-managed descriptor. Create the correct file */
|
||||
DPRINT1("SMSS:PFILE: Creating a system managed paging file (`%wZ')\n",
|
||||
DPRINT("SMSS:PFILE: Creating a system managed paging file (`%wZ')\n",
|
||||
&Descriptor->Name);
|
||||
Status = SmpCreateSystemManagedPagingFile(Descriptor, FALSE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -1062,7 +1054,7 @@ SmpCreatePagingFiles(VOID)
|
|||
SmpValidatePagingFileSizes(Descriptor);
|
||||
|
||||
/* Check if this is an ANY pagefile or a FIXED pagefile */
|
||||
DPRINT1("SMSS:PFILE: Creating a normal paging file (`%wZ') \n",
|
||||
DPRINT("SMSS:PFILE: Creating a normal paging file (`%wZ') \n",
|
||||
&Descriptor->Name);
|
||||
if (Descriptor->Name.Buffer[STANDARD_DRIVE_LETTER_OFFSET] == L'?')
|
||||
{
|
||||
|
|
|
@ -204,14 +204,12 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
|
|||
if (SbApiMsg->h.ClientId.UniqueProcess == SmUniqueProcessId)
|
||||
{
|
||||
/* No need to get any handle -- assume session 0 */
|
||||
DPRINT1("SM connecting to SM\n");
|
||||
ProcessHandle = NULL;
|
||||
SessionId = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reference the foreign process */
|
||||
DPRINT1("Incoming request from %lx\n", SbApiMsg->h.ClientId.UniqueProcess);
|
||||
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
|
||||
Status = NtOpenProcess(&ProcessHandle,
|
||||
PROCESS_QUERY_INFORMATION,
|
||||
|
@ -274,7 +272,6 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
|
|||
|
||||
/* Now send the actual accept reply (which could be a rejection) */
|
||||
PortView.Length = sizeof(PortView);
|
||||
DPRINT1("Accepting: %d connection with context: %p\n", Accept, ClientContext);
|
||||
Status = NtAcceptConnectPort(&PortHandle,
|
||||
ClientContext,
|
||||
&SbApiMsg->h,
|
||||
|
@ -303,7 +300,6 @@ SmpHandleConnectionRequest(IN HANDLE SmApiPort,
|
|||
SbApiMsg->ConnectionInfo.SbApiPortName[119] = UNICODE_NULL;
|
||||
RtlCreateUnicodeString(&SubsystemPort,
|
||||
SbApiMsg->ConnectionInfo.SbApiPortName);
|
||||
DPRINT1("Connecting back to %wZ\n", &SubsystemPort);
|
||||
Status = NtConnectPort(&CidSubsystem->SbApiPort,
|
||||
&SubsystemPort,
|
||||
&SecurityQos,
|
||||
|
@ -363,7 +359,6 @@ SmpApiLoop(IN PVOID Parameter)
|
|||
while (TRUE)
|
||||
{
|
||||
/* Begin waiting on a request */
|
||||
DPRINT1("API Loop: %p\n", SmApiPort);
|
||||
Status = NtReplyWaitReceivePort(SmApiPort,
|
||||
(PVOID*)&ClientContext,
|
||||
&ReplyMsg->h,
|
||||
|
@ -383,7 +378,6 @@ SmpApiLoop(IN PVOID Parameter)
|
|||
/* A new connection */
|
||||
case LPC_CONNECTION_REQUEST:
|
||||
/* Create the right structures for it */
|
||||
DPRINT1("New connection request\n");
|
||||
SmpHandleConnectionRequest(SmApiPort, (PSB_API_MSG)&RequestMsg);
|
||||
ReplyMsg = NULL;
|
||||
break;
|
||||
|
@ -423,7 +417,6 @@ SmpApiLoop(IN PVOID Parameter)
|
|||
else
|
||||
{
|
||||
/* It's totally okay, so call the dispatcher for it */
|
||||
DPRINT1("Calling dispatcher for ID: %lx\n", RequestMsg.ApiNumber);
|
||||
Status = SmpApiDispatch[RequestMsg.ApiNumber](&RequestMsg,
|
||||
ClientContext,
|
||||
SmApiPort);
|
||||
|
|
|
@ -47,7 +47,6 @@ SmpExecuteImage(IN PUNICODE_STRING FileName,
|
|||
NTSTATUS Status;
|
||||
RTL_USER_PROCESS_INFORMATION LocalProcessInfo;
|
||||
PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
|
||||
DPRINT1("Executing image: %wZ\n", FileName);
|
||||
|
||||
/* Use the input process information if we have it, otherwise use local */
|
||||
ProcessInfo = ProcessInformation;
|
||||
|
|
|
@ -150,7 +150,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
PVOID State;
|
||||
PSB_CREATE_PROCESS_MSG CreateProcess = &SbApiMsg.CreateProcess;
|
||||
PSB_CREATE_SESSION_MSG CreateSession = &SbApiMsg.CreateSession;
|
||||
DPRINT1("Loading subsystem: %wZ\n", FileName);
|
||||
|
||||
/* Make sure this is a found subsystem */
|
||||
if (Flags & SMP_INVALID_PATH)
|
||||
|
@ -202,7 +201,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
|
||||
/* Allocate a new subsystem! */
|
||||
NewSubsystem = RtlAllocateHeap(SmpHeap, SmBaseTag, sizeof(SMP_SUBSYSTEM));
|
||||
DPRINT1("new subsystem created: %p\n", NewSubsystem);
|
||||
if (!NewSubsystem)
|
||||
{
|
||||
RtlLeaveCriticalSection(&SmpKnownSubSysLock);
|
||||
|
@ -279,7 +277,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
else
|
||||
{
|
||||
/* This must be CSRSS itself, so just launch it and that's it */
|
||||
DPRINT1("Executing CSRSS\n");
|
||||
Status = SmpExecuteImage(FileName,
|
||||
Directory,
|
||||
CommandLine,
|
||||
|
@ -314,7 +311,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
SmpWindowsSubSysProcess = ProcessInformation.ProcessHandle;
|
||||
}
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
DPRINT1("CSRSS is up and running: %lx %lx\n", SmpWindowsSubSysProcessId, SmpWindowsSubSysProcess);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -399,7 +395,6 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
}
|
||||
|
||||
/* Okay, everything looks good to go, initialize this subsystem now! */
|
||||
DPRINT1("Resuming the subsystem!\n");
|
||||
Status = NtResumeThread(ProcessInformation.ThreadHandle, NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -436,15 +431,12 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName,
|
|||
else
|
||||
{
|
||||
/* This a session 0 subsystem, just wait for it to initialize */
|
||||
DPRINT1("Waiting on the subsystem to initialize...\n");
|
||||
NtWaitForSingleObject(NewSubsystem->Event, FALSE, NULL);
|
||||
DPRINT1("Subsystem is ready!!!\n");
|
||||
}
|
||||
|
||||
/* Subsystem is created, resumed, and initialized. Close handles and exit */
|
||||
NtClose(ProcessInformation.ThreadHandle);
|
||||
Status = STATUS_SUCCESS;
|
||||
DPRINT1("Returning success\n");
|
||||
goto Quickie2;
|
||||
|
||||
Quickie:
|
||||
|
@ -537,7 +529,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
{
|
||||
/* Execute each one and move on */
|
||||
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
|
||||
DPRINT1("SetupExecute entry: %wZ\n", &RegEntry->Name);
|
||||
SmpExecuteCommand(&RegEntry->Name, 0, NULL, 0);
|
||||
NextEntry = NextEntry->Flink;
|
||||
}
|
||||
|
@ -548,7 +539,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
{
|
||||
/* Get the entry and check if this is the special Win32k entry */
|
||||
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
|
||||
DPRINT1("Subsystem: %wZ\n", &RegEntry->Name);
|
||||
if (!_wcsicmp(RegEntry->Name.Buffer, L"Kmode"))
|
||||
{
|
||||
/* Translate it */
|
||||
|
@ -581,7 +571,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
AttachedSessionId = *MuSessionId;
|
||||
|
||||
/* Start Win32k.sys on this session */
|
||||
DPRINT1("Starting win32k.sys...\n");
|
||||
RtlInitUnicodeString(&DestinationString,
|
||||
L"\\SystemRoot\\System32\\win32k.sys");
|
||||
Status = NtSetSystemInformation(SystemExtendServiceTableInformation,
|
||||
|
@ -608,7 +597,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
{
|
||||
/* Get each entry and check if it's the internal debug or not */
|
||||
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
|
||||
DPRINT1("Subsystem (required): %wZ\n", &RegEntry->Name);
|
||||
if (_wcsicmp(RegEntry->Name.Buffer, L"debug"))
|
||||
{
|
||||
/* Load the required subsystem */
|
||||
|
@ -641,7 +629,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
{
|
||||
/* Get the custom initial command */
|
||||
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
|
||||
DPRINT1("Initial command found: %wZ\n", &RegEntry->Name);
|
||||
|
||||
/* Write the initial command and wait for 5 seconds (why??!) */
|
||||
*InitialCommand = RegEntry->Name;
|
||||
|
@ -653,7 +640,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
/* Use the default Winlogon initial command */
|
||||
RtlInitUnicodeString(InitialCommand, L"winlogon.exe");
|
||||
InitialCommandBuffer[0] = UNICODE_NULL;
|
||||
DPRINT1("Initial command found: %wZ\n", InitialCommand);
|
||||
|
||||
/* Check if there's a debugger for Winlogon */
|
||||
Status2 = LdrQueryImageFileExecutionOptions(InitialCommand,
|
||||
|
@ -678,7 +664,6 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId,
|
|||
{
|
||||
/* Execute each one */
|
||||
RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry);
|
||||
DPRINT1("Initial command (custom): %wZ\n", &RegEntry->Name);
|
||||
SmpExecuteCommand(&RegEntry->Name, *MuSessionId, NULL, 0);
|
||||
NextEntry = NextEntry->Flink;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue