- Formatting fix. No code change

svn path=/trunk/; revision=38566
This commit is contained in:
Dmitry Chapyshev 2009-01-04 16:18:29 +00:00
parent 2494ca79f9
commit 6c670fb344

View file

@ -216,7 +216,7 @@ ExVerifySuite(SUITE_TYPE SuiteType)
NTSTATUS
NTAPI
NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
NtQuerySystemEnvironmentValue(IN PUNICODE_STRING VariableName,
OUT PWSTR ValueBuffer,
IN ULONG ValueBufferLength,
IN OUT PULONG ReturnLength OPTIONAL)
@ -234,20 +234,19 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
PreviousMode = ExGetPreviousMode();
if(PreviousMode != KernelMode)
if (PreviousMode != KernelMode)
{
_SEH2_TRY
{
ProbeForRead(VariableName,
sizeof(UNICODE_STRING),
sizeof(ULONG));
ProbeForWrite(ValueBuffer,
ValueBufferLength,
sizeof(WCHAR));
if(ReturnLength != NULL)
{
ProbeForWriteUlong(ReturnLength);
}
if (ReturnLength != NULL) ProbeForWriteUlong(ReturnLength);
}
_SEH2_EXCEPT(ExSystemExceptionFilter())
{
@ -255,10 +254,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
}
_SEH2_END;
if(!NT_SUCCESS(Status))
{
return Status;
}
if (!NT_SUCCESS(Status)) return Status;
}
/*
@ -267,16 +263,15 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
Status = ProbeAndCaptureUnicodeString(&WName,
PreviousMode,
VariableName);
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
/*
* according to ntinternals the SeSystemEnvironmentName privilege is required!
*/
if(!SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
if (!SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
PreviousMode))
{
ReleaseCapturedUnicodeString(&WName,
PreviousMode);
ReleaseCapturedUnicodeString(&WName, PreviousMode);
DPRINT1("NtQuerySystemEnvironmentValue: Caller requires the SeSystemEnvironmentPrivilege privilege!\n");
return STATUS_PRIVILEGE_NOT_HELD;
}
@ -285,12 +280,9 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
* convert the value name to ansi
*/
Status = RtlUnicodeStringToAnsiString(&AName, &WName, TRUE);
ReleaseCapturedUnicodeString(&WName,
PreviousMode);
if(!NT_SUCCESS(Status))
{
return Status;
}
ReleaseCapturedUnicodeString(&WName, PreviousMode);
if (!NT_SUCCESS(Status)) return Status;
/*
* Create a temporary buffer for the value
@ -308,7 +300,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
Result = HalGetEnvironmentVariable(AName.Buffer,
(USHORT)ValueBufferLength,
Value);
if(!Result)
if (!Result)
{
RtlFreeAnsiString(&AName);
ExFreePool(Value);
@ -330,7 +322,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
}
_SEH2_END;
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
/*
* Copy the result back to the caller.
@ -339,7 +331,7 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
{
RtlCopyMemory(ValueBuffer, WValue.Buffer, WValue.Length);
ValueBuffer[WValue.Length / sizeof(WCHAR)] = L'\0';
if(ReturnLength != NULL)
if (ReturnLength != NULL)
{
*ReturnLength = WValue.Length + sizeof(WCHAR);
}
@ -364,8 +356,9 @@ NtQuerySystemEnvironmentValue (IN PUNICODE_STRING VariableName,
}
NTSTATUS NTAPI
NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
NTSTATUS
NTAPI
NtSetSystemEnvironmentValue(IN PUNICODE_STRING VariableName,
IN PUNICODE_STRING Value)
{
UNICODE_STRING CapturedName, CapturedValue;
@ -383,17 +376,17 @@ NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
Status = ProbeAndCaptureUnicodeString(&CapturedName,
PreviousMode,
VariableName);
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
Status = ProbeAndCaptureUnicodeString(&CapturedValue,
PreviousMode,
Value);
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
/*
* according to ntinternals the SeSystemEnvironmentName privilege is required!
*/
if(SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
if (SeSinglePrivilegeCheck(SeSystemEnvironmentPrivilege,
PreviousMode))
{
/*
@ -402,12 +395,12 @@ NtSetSystemEnvironmentValue (IN PUNICODE_STRING VariableName,
Status = RtlUnicodeStringToAnsiString(&AName,
&CapturedName,
TRUE);
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
Status = RtlUnicodeStringToAnsiString(&AValue,
&CapturedValue,
TRUE);
if(NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
ARC_STATUS Result = HalSetEnvironmentVariable(AName.Buffer,
AValue.Buffer);
@ -485,14 +478,14 @@ QSI_DEF(SystemBasicInformation)
PSYSTEM_BASIC_INFORMATION Sbi
= (PSYSTEM_BASIC_INFORMATION) Buffer;
*ReqSize = sizeof (SYSTEM_BASIC_INFORMATION);
/*
* Check user buffer's size
*/
if (Size != sizeof (SYSTEM_BASIC_INFORMATION))
*ReqSize = sizeof(SYSTEM_BASIC_INFORMATION);
/* Check user buffer's size */
if (Size != sizeof(SYSTEM_BASIC_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
RtlZeroMemory(Sbi, Size);
Sbi->Reserved = 0;
Sbi->TimerResolution = KeMaximumIncrement;
@ -505,7 +498,8 @@ QSI_DEF(SystemBasicInformation)
Sbi->MaximumUserModeAddress = (ULONG_PTR)MmHighestUserAddress;
Sbi->ActiveProcessorsAffinityMask = KeActiveProcessors;
Sbi->NumberOfProcessors = KeNumberProcessors;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 1 - Processor Information */
@ -514,13 +508,13 @@ QSI_DEF(SystemProcessorInformation)
PSYSTEM_PROCESSOR_INFORMATION Spi
= (PSYSTEM_PROCESSOR_INFORMATION) Buffer;
PKPRCB Prcb;
*ReqSize = sizeof (SYSTEM_PROCESSOR_INFORMATION);
/*
* Check user buffer's size
*/
if (Size < sizeof (SYSTEM_PROCESSOR_INFORMATION))
*ReqSize = sizeof(SYSTEM_PROCESSOR_INFORMATION);
/* Check user buffer's size */
if (Size < sizeof(SYSTEM_PROCESSOR_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
Prcb = KeGetCurrentPrcb();
Spi->ProcessorArchitecture = KeProcessorArchitecture;
@ -532,7 +526,7 @@ QSI_DEF(SystemProcessorInformation)
DPRINT("Arch %d Level %d Rev 0x%x\n", Spi->ProcessorArchitecture,
Spi->ProcessorLevel, Spi->ProcessorRevision);
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 2 - Performance Information */
@ -544,13 +538,12 @@ QSI_DEF(SystemPerformanceInformation)
PEPROCESS TheIdleProcess;
*ReqSize = sizeof (SYSTEM_PERFORMANCE_INFORMATION);
/*
* Check user buffer's size
*/
if (Size < sizeof (SYSTEM_PERFORMANCE_INFORMATION))
*ReqSize = sizeof(SYSTEM_PERFORMANCE_INFORMATION);
/* Check user buffer's size */
if (Size < sizeof(SYSTEM_PERFORMANCE_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
TheIdleProcess = PsIdleProcess;
@ -565,22 +558,21 @@ QSI_DEF(SystemPerformanceInformation)
Spi->IoOtherOperationCount = IoOtherOperationCount;
Spi->AvailablePages = MmStats.NrFreePages;
/*
Add up all the used "Committed" memory + pagefile.
Not sure this is right. 8^\
/*
* Add up all the used "Committed" memory + pagefile.
* Not sure this is right. 8^\
*/
Spi->CommittedPages = MiMemoryConsumers[MC_PPOOL].PagesUsed +
MiMemoryConsumers[MC_NPPOOL].PagesUsed+
MiMemoryConsumers[MC_CACHE].PagesUsed+
MiMemoryConsumers[MC_USER].PagesUsed+
MiUsedSwapPages;
/*
Add up the full system total + pagefile.
All this make Taskmgr happy but not sure it is the right numbers.
This too, fixes some of GlobalMemoryStatusEx numbers.
*/
Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages +
MiMemoryConsumers[MC_NPPOOL].PagesUsed +
MiMemoryConsumers[MC_CACHE].PagesUsed +
MiMemoryConsumers[MC_USER].PagesUsed +
MiUsedSwapPages;
/*
* Add up the full system total + pagefile.
* All this make Taskmgr happy but not sure it is the right numbers.
* This too, fixes some of GlobalMemoryStatusEx numbers.
*/
Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages + MiUsedSwapPages;
Spi->PeakCommitment = 0; /* FIXME */
Spi->PageFaultCount = 0; /* FIXME */
@ -657,7 +649,7 @@ QSI_DEF(SystemPerformanceInformation)
Spi->SecondLevelTbFills = 0; /* FIXME */
Spi->SystemCalls = 0; /* FIXME */
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 3 - Time Of Day Information */
@ -703,7 +695,7 @@ QSI_DEF(SystemPathInformation)
/* FIXME: QSI returns STATUS_BREAKPOINT. Why? */
DPRINT1("NtQuerySystemInformation - SystemPathInformation not implemented\n");
return (STATUS_BREAKPOINT);
return STATUS_BREAKPOINT;
}
/* Class 5 - Process Information */
@ -739,7 +731,7 @@ QSI_DEF(SystemProcessInformation)
PSYSTEM_PROCESS_INFORMATION SpiCur;
int curSize;
ANSI_STRING imgName;
int inLen=32; // image name len in bytes
int inLen = 32; // image name len in bytes
PLIST_ENTRY current_entry;
PETHREAD current;
PSYSTEM_THREAD_INFORMATION ThreadInfo;
@ -865,7 +857,7 @@ QSI_DEF(SystemCallCountInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemCallCountInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 7 - Device Information */
@ -875,16 +867,15 @@ QSI_DEF(SystemDeviceInformation)
= (PSYSTEM_DEVICE_INFORMATION) Buffer;
PCONFIGURATION_INFORMATION ConfigInfo;
*ReqSize = sizeof (SYSTEM_DEVICE_INFORMATION);
/*
* Check user buffer's size
*/
if (Size < sizeof (SYSTEM_DEVICE_INFORMATION))
*ReqSize = sizeof(SYSTEM_DEVICE_INFORMATION);
/* Check user buffer's size */
if (Size < sizeof(SYSTEM_DEVICE_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
ConfigInfo = IoGetConfigurationInformation ();
ConfigInfo = IoGetConfigurationInformation();
Sdi->NumberOfDisks = ConfigInfo->DiskCount;
Sdi->NumberOfFloppies = ConfigInfo->FloppyCount;
@ -893,7 +884,7 @@ QSI_DEF(SystemDeviceInformation)
Sdi->NumberOfSerialPorts = ConfigInfo->SerialCount;
Sdi->NumberOfParallelPorts = ConfigInfo->ParallelCount;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 8 - Processor Performance Information */
@ -907,7 +898,7 @@ QSI_DEF(SystemProcessorPerformanceInformation)
LARGE_INTEGER CurrentTime;
PKPRCB Prcb;
*ReqSize = KeNumberProcessors * sizeof (SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
*ReqSize = KeNumberProcessors * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION);
/* Check user buffer's size */
if (Size < *ReqSize)
@ -937,23 +928,23 @@ QSI_DEF(SystemProcessorPerformanceInformation)
/* Class 9 - Flags Information */
QSI_DEF(SystemFlagsInformation)
{
if (sizeof (SYSTEM_FLAGS_INFORMATION) != Size)
if (sizeof(SYSTEM_FLAGS_INFORMATION) != Size)
{
* ReqSize = sizeof (SYSTEM_FLAGS_INFORMATION);
*ReqSize = sizeof(SYSTEM_FLAGS_INFORMATION);
return (STATUS_INFO_LENGTH_MISMATCH);
}
((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags = NtGlobalFlag;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
SSI_DEF(SystemFlagsInformation)
{
if (sizeof (SYSTEM_FLAGS_INFORMATION) != Size)
if (sizeof(SYSTEM_FLAGS_INFORMATION) != Size)
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
NtGlobalFlag = ((PSYSTEM_FLAGS_INFORMATION) Buffer)->Flags;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 10 - Call Time Information */
@ -961,7 +952,7 @@ QSI_DEF(SystemCallTimeInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemCallTimeInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 11 - Module Information */
@ -980,7 +971,7 @@ QSI_DEF(SystemLocksInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemLocksInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 13 - Stack Trace Information */
@ -988,7 +979,7 @@ QSI_DEF(SystemStackTraceInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemStackTraceInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 14 - Paged Pool Information */
@ -996,7 +987,7 @@ QSI_DEF(SystemPagedPoolInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemPagedPoolInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 15 - Non Paged Pool Information */
@ -1004,7 +995,7 @@ QSI_DEF(SystemNonPagedPoolInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemNonPagedPoolInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1020,10 +1011,10 @@ QSI_DEF(SystemHandleInformation)
DPRINT("NtQuerySystemInformation - SystemHandleInformation\n");
if (Size < sizeof (SYSTEM_HANDLE_INFORMATION))
if (Size < sizeof(SYSTEM_HANDLE_INFORMATION))
{
* ReqSize = sizeof (SYSTEM_HANDLE_INFORMATION);
return (STATUS_INFO_LENGTH_MISMATCH);
*ReqSize = sizeof(SYSTEM_HANDLE_INFORMATION);
return STATUS_INFO_LENGTH_MISMATCH;
}
DPRINT("SystemHandleInformation 1\n");
@ -1037,9 +1028,9 @@ QSI_DEF(SystemHandleInformation)
hCount = hCount + (pr->ObjectTable ? ObpGetHandleCountByHandleTable(pr->ObjectTable) : 0);
pr = PsGetNextProcess(pr);
if ((pr == syspr) || (pr == NULL))
break;
} while ((pr != syspr) && (pr != NULL));
if ((pr == syspr) || (pr == NULL)) break;
}
while ((pr != syspr) && (pr != NULL));
if(pr != NULL)
{
@ -1048,9 +1039,9 @@ QSI_DEF(SystemHandleInformation)
DPRINT("SystemHandleInformation 2\n");
curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+
( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) ));
curSize = sizeof(SYSTEM_HANDLE_INFORMATION) +
((sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO)));
Shi->NumberOfHandles = hCount;
@ -1081,24 +1072,21 @@ QSI_DEF(SystemHandleInformation)
pr = PsGetNextProcess(pr);
if ((pr == syspr) || (pr == NULL))
break;
} while ((pr != syspr) && (pr != NULL));
if(pr != NULL)
{
ObDereferenceObject(pr);
if ((pr == syspr) || (pr == NULL)) break;
}
while ((pr != syspr) && (pr != NULL));
if(pr != NULL) ObDereferenceObject(pr);
DPRINT("SystemHandleInformation 4\n");
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/*
SSI_DEF(SystemHandleInformation)
{
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
*/
@ -1107,7 +1095,7 @@ QSI_DEF(SystemObjectInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemObjectInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 18 - Information */
@ -1116,10 +1104,10 @@ QSI_DEF(SystemPageFileInformation)
UNICODE_STRING FileName; /* FIXME */
SYSTEM_PAGEFILE_INFORMATION *Spfi = (SYSTEM_PAGEFILE_INFORMATION *) Buffer;
if (Size < sizeof (SYSTEM_PAGEFILE_INFORMATION))
if (Size < sizeof(SYSTEM_PAGEFILE_INFORMATION))
{
* ReqSize = sizeof (SYSTEM_PAGEFILE_INFORMATION);
return (STATUS_INFO_LENGTH_MISMATCH);
* ReqSize = sizeof(SYSTEM_PAGEFILE_INFORMATION);
return STATUS_INFO_LENGTH_MISMATCH;
}
RtlInitUnicodeString(&FileName, NULL); /* FIXME */
@ -1131,7 +1119,7 @@ QSI_DEF(SystemPageFileInformation)
Spfi->TotalInUse = MiUsedSwapPages;
Spfi->PeakUsage = MiUsedSwapPages; /* FIXME */
Spfi->PageFileName = FileName;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 19 - Vdm Instemul Information */
@ -1139,7 +1127,7 @@ QSI_DEF(SystemVdmInstemulInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemVdmInstemulInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 20 - Vdm Bop Information */
@ -1147,7 +1135,7 @@ QSI_DEF(SystemVdmBopInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemVdmBopInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 21 - File Cache Information */
@ -1155,10 +1143,10 @@ QSI_DEF(SystemFileCacheInformation)
{
SYSTEM_FILECACHE_INFORMATION *Sci = (SYSTEM_FILECACHE_INFORMATION *) Buffer;
if (Size < sizeof (SYSTEM_FILECACHE_INFORMATION))
if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
{
* ReqSize = sizeof (SYSTEM_FILECACHE_INFORMATION);
return (STATUS_INFO_LENGTH_MISMATCH);
*ReqSize = sizeof(SYSTEM_FILECACHE_INFORMATION);
return STATUS_INFO_LENGTH_MISMATCH;
}
RtlZeroMemory(Sci, sizeof(SYSTEM_FILECACHE_INFORMATION));
@ -1176,18 +1164,18 @@ QSI_DEF(SystemFileCacheInformation)
Sci->MinimumWorkingSet = 0; /* FIXME */
Sci->MaximumWorkingSet = 0; /* FIXME */
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
SSI_DEF(SystemFileCacheInformation)
{
if (Size < sizeof (SYSTEM_FILECACHE_INFORMATION))
if (Size < sizeof(SYSTEM_FILECACHE_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemFileCacheInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 22 - Pool Tag Information */
@ -1195,7 +1183,7 @@ QSI_DEF(SystemPoolTagInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemPoolTagInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 23 - Interrupt Information for all processors */
@ -1209,7 +1197,7 @@ QSI_DEF(SystemInterruptInformation)
if(Size < KeNumberProcessors * sizeof(SYSTEM_INTERRUPT_INFORMATION))
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
ti = KeQueryTimeIncrement();
@ -1239,14 +1227,14 @@ QSI_DEF(SystemDpcBehaviourInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemDpcBehaviourInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
SSI_DEF(SystemDpcBehaviourInformation)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemDpcBehaviourInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 25 - Full Memory Information */
@ -1256,12 +1244,13 @@ QSI_DEF(SystemFullMemoryInformation)
PEPROCESS TheIdleProcess;
* ReqSize = sizeof (ULONG);
*ReqSize = sizeof(ULONG);
if (sizeof (ULONG) != Size)
if (sizeof(ULONG) != Size)
{
return (STATUS_INFO_LENGTH_MISMATCH);
return STATUS_INFO_LENGTH_MISMATCH;
}
DPRINT("SystemFullMemoryInformation\n");
TheIdleProcess = PsIdleProcess;
@ -1278,7 +1267,7 @@ QSI_DEF(SystemFullMemoryInformation)
*Spi = MiMemoryConsumers[MC_USER].PagesUsed;
return (STATUS_SUCCESS);
return STATUS_SUCCESS;
}
/* Class 26 - Load Image */
@ -1421,7 +1410,7 @@ QSI_DEF(SystemSummaryMemoryInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemSummaryMemoryInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 30 - Next Event Id Information */
@ -1429,7 +1418,7 @@ QSI_DEF(SystemNextEventIdInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemNextEventIdInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 31 - Event Ids Information */
@ -1437,7 +1426,7 @@ QSI_DEF(SystemEventIdsInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemEventIdsInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 32 - Crash Dump Information */
@ -1445,7 +1434,7 @@ QSI_DEF(SystemCrashDumpInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemCrashDumpInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 33 - Exception Information */
@ -1453,7 +1442,7 @@ QSI_DEF(SystemExceptionInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemExceptionInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 34 - Crash Dump State Information */
@ -1461,7 +1450,7 @@ QSI_DEF(SystemCrashDumpStateInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemCrashDumpStateInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 35 - Kernel Debugger Information */
@ -1486,7 +1475,7 @@ QSI_DEF(SystemContextSwitchInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemContextSwitchInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 37 - Registry Quota Information */
@ -1512,7 +1501,7 @@ SSI_DEF(SystemRegistryQuotaInformation)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemRegistryQuotaInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 38 - Load And Call Image */
@ -1595,7 +1584,7 @@ SSI_DEF(SystemPrioritySeperation)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemPrioritySeperation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 40 - Plug Play Bus Information */
@ -1603,7 +1592,7 @@ QSI_DEF(SystemPlugPlayBusInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemPlugPlayBusInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 41 - Dock Information */
@ -1611,7 +1600,7 @@ QSI_DEF(SystemDockInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemDockInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 42 - Power Information */
@ -1619,7 +1608,7 @@ QSI_DEF(SystemPowerInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemPowerInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 43 - Processor Speed Information */
@ -1627,15 +1616,15 @@ QSI_DEF(SystemProcessorSpeedInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemProcessorSpeedInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
/* Class 44 - Current Time Zone Information */
QSI_DEF(SystemCurrentTimeZoneInformation)
{
* ReqSize = sizeof (TIME_ZONE_INFORMATION);
*ReqSize = sizeof(TIME_ZONE_INFORMATION);
if (sizeof (TIME_ZONE_INFORMATION) != Size)
if (sizeof(TIME_ZONE_INFORMATION) != Size)
{
return STATUS_INFO_LENGTH_MISMATCH;
}
@ -1652,7 +1641,7 @@ QSI_DEF(SystemCurrentTimeZoneInformation)
SSI_DEF(SystemCurrentTimeZoneInformation)
{
/* Check user buffer's size */
if (Size < sizeof (TIME_ZONE_INFORMATION))
if (Size < sizeof(TIME_ZONE_INFORMATION))
{
return STATUS_INFO_LENGTH_MISMATCH;
}
@ -1666,7 +1655,7 @@ QSI_DEF(SystemLookasideInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemLookasideInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1675,7 +1664,7 @@ SSI_DEF(SystemSetTimeSlipEvent)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemSetTimSlipEvent not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1684,7 +1673,7 @@ SSI_DEF(SystemCreateSession)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemCreateSession not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1693,7 +1682,7 @@ SSI_DEF(SystemDeleteSession)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemDeleteSession not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1702,7 +1691,7 @@ QSI_DEF(SystemInvalidInfoClass4)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemInvalidInfoClass4 not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1711,7 +1700,7 @@ QSI_DEF(SystemRangeStartInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemRangeStartInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1720,7 +1709,7 @@ QSI_DEF(SystemVerifierInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemVerifierInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1728,7 +1717,7 @@ SSI_DEF(SystemVerifierInformation)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemVerifierInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1737,7 +1726,7 @@ SSI_DEF(SystemAddVerifier)
{
/* FIXME */
DPRINT1("NtSetSystemInformation - SystemAddVerifier not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1746,7 +1735,7 @@ QSI_DEF(SystemSessionProcessesInformation)
{
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemSessionProcessInformation not implemented\n");
return (STATUS_NOT_IMPLEMENTED);
return STATUS_NOT_IMPLEMENTED;
}
@ -1837,7 +1826,7 @@ C_ASSERT(SystemBasicInformation == 0);
* @implemented
*/
NTSTATUS NTAPI
NtQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
OUT PVOID SystemInformation,
IN ULONG Length,
OUT PULONG UnsafeResultLength)
@ -1895,17 +1884,15 @@ NtQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
}
_SEH2_END;
return (FStatus);
return FStatus;
}
NTSTATUS
NTAPI
NtSetSystemInformation (
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
NtSetSystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
IN PVOID SystemInformation,
IN ULONG SystemInformationLength
)
IN ULONG SystemInformationLength)
{
PAGED_CODE();
@ -1930,32 +1917,28 @@ NtSetSystemInformation (
/*
* Check the request is valid.
*/
if ( (SystemInformationClass >= MIN_SYSTEM_INFO_CLASS)
&& (SystemInformationClass < MAX_SYSTEM_INFO_CLASS)
)
if ((SystemInformationClass >= MIN_SYSTEM_INFO_CLASS) &&
(SystemInformationClass < MAX_SYSTEM_INFO_CLASS))
{
if (NULL != CallQS [SystemInformationClass].Set)
{
/*
* Hand the request to a subhandler.
*/
return CallQS [SystemInformationClass].Set (
SystemInformation,
SystemInformationLength
);
return CallQS [SystemInformationClass].Set(SystemInformation,
SystemInformationLength);
}
}
return (STATUS_INVALID_INFO_CLASS);
return STATUS_INVALID_INFO_CLASS;
}
NTSTATUS
NTAPI
NtFlushInstructionCache (
IN HANDLE ProcessHandle,
NtFlushInstructionCache(IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
IN ULONG NumberOfBytesToFlush
)
IN ULONG NumberOfBytesToFlush)
{
PAGED_CODE();