[NDK][NTOS:EX] Minor formatting.

This commit is contained in:
Hermès Bélusca-Maïto 2021-10-24 17:43:47 +02:00
parent d2382e78ef
commit 7692a620e7
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 31 additions and 51 deletions

View file

@ -1287,7 +1287,6 @@ QSI_DEF(SystemNonPagedPoolInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 16 - Handle Information */ /* Class 16 - Handle Information */
QSI_DEF(SystemHandleInformation) QSI_DEF(SystemHandleInformation)
{ {
@ -2070,7 +2069,6 @@ QSI_DEF(SystemCurrentTimeZoneInformation)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
SSI_DEF(SystemCurrentTimeZoneInformation) SSI_DEF(SystemCurrentTimeZoneInformation)
{ {
/* Check user buffer's size */ /* Check user buffer's size */
@ -2229,7 +2227,6 @@ Leave:
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* Class 46 - Set time slip event */ /* Class 46 - Set time slip event */
SSI_DEF(SystemTimeSlipNotification) SSI_DEF(SystemTimeSlipNotification)
{ {
@ -2271,7 +2268,6 @@ SSI_DEF(SystemSessionCreate)
return Status; return Status;
} }
/* Class 48 - Delete an existing session (TSE) */ /* Class 48 - Delete an existing session (TSE) */
SSI_DEF(SystemSessionDetach) SSI_DEF(SystemSessionDetach)
{ {
@ -2293,7 +2289,6 @@ SSI_DEF(SystemSessionDetach)
return MmSessionDelete(SessionId); return MmSessionDelete(SessionId);
} }
/* Class 49 - UNKNOWN */ /* Class 49 - UNKNOWN */
QSI_DEF(SystemSessionInformation) QSI_DEF(SystemSessionInformation)
{ {
@ -2302,7 +2297,6 @@ QSI_DEF(SystemSessionInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 50 - System range start address */ /* Class 50 - System range start address */
QSI_DEF(SystemRangeStartInformation) QSI_DEF(SystemRangeStartInformation)
{ {
@ -2324,7 +2318,6 @@ QSI_DEF(SystemVerifierInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
SSI_DEF(SystemVerifierInformation) SSI_DEF(SystemVerifierInformation)
{ {
/* FIXME */ /* FIXME */
@ -2332,7 +2325,6 @@ SSI_DEF(SystemVerifierInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 52 */ /* Class 52 */
SSI_DEF(SystemVerifierThunkExtend) SSI_DEF(SystemVerifierThunkExtend)
{ {
@ -2341,7 +2333,6 @@ SSI_DEF(SystemVerifierThunkExtend)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 53 - A session's processes */ /* Class 53 - A session's processes */
QSI_DEF(SystemSessionProcessesInformation) QSI_DEF(SystemSessionProcessesInformation)
{ {
@ -2350,7 +2341,6 @@ QSI_DEF(SystemSessionProcessesInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 54 - Load & map in system space */ /* Class 54 - Load & map in system space */
SSI_DEF(SystemLoadGdiDriverInSystemSpaceInformation) SSI_DEF(SystemLoadGdiDriverInSystemSpaceInformation)
{ {
@ -2359,7 +2349,6 @@ SSI_DEF(SystemLoadGdiDriverInSystemSpaceInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 55 - NUMA processor information */ /* Class 55 - NUMA processor information */
QSI_DEF(SystemNumaProcessorMap) QSI_DEF(SystemNumaProcessorMap)
{ {
@ -2406,7 +2395,6 @@ QSI_DEF(SystemNumaProcessorMap)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* Class 56 - Prefetcher information */ /* Class 56 - Prefetcher information */
QSI_DEF(SystemPrefetcherInformation) QSI_DEF(SystemPrefetcherInformation)
{ {
@ -2415,7 +2403,6 @@ QSI_DEF(SystemPrefetcherInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 57 - Extended process information */ /* Class 57 - Extended process information */
QSI_DEF(SystemExtendedProcessInformation) QSI_DEF(SystemExtendedProcessInformation)
{ {
@ -2424,8 +2411,7 @@ QSI_DEF(SystemExtendedProcessInformation)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 58 - Recommended shared data alignment */
/* Class 58 - Recommended shared ata alignment */
QSI_DEF(SystemRecommendedSharedDataAlignment) QSI_DEF(SystemRecommendedSharedDataAlignment)
{ {
/* FIXME */ /* FIXME */
@ -2433,7 +2419,6 @@ QSI_DEF(SystemRecommendedSharedDataAlignment)
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
/* Class 60 - NUMA memory information */ /* Class 60 - NUMA memory information */
QSI_DEF(SystemNumaAvailableMemory) QSI_DEF(SystemNumaAvailableMemory)
{ {
@ -2922,7 +2907,7 @@ CallQS [] =
C_ASSERT(SystemBasicInformation == 0); C_ASSERT(SystemBasicInformation == 0);
#define MIN_SYSTEM_INFO_CLASS (SystemBasicInformation) #define MIN_SYSTEM_INFO_CLASS (SystemBasicInformation)
#define MAX_SYSTEM_INFO_CLASS (sizeof(CallQS) / sizeof(CallQS[0])) #define MAX_SYSTEM_INFO_CLASS RTL_NUMBER_OF(CallQS)
/* /*
* @implemented * @implemented
@ -2949,7 +2934,7 @@ NtQuerySystemInformation(
{ {
#if (NTDDI_VERSION >= NTDDI_VISTA) #if (NTDDI_VERSION >= NTDDI_VISTA)
/* /*
* Check if the request is valid. * Check whether the request is valid.
*/ */
if (SystemInformationClass < MIN_SYSTEM_INFO_CLASS || if (SystemInformationClass < MIN_SYSTEM_INFO_CLASS ||
SystemInformationClass >= MAX_SYSTEM_INFO_CLASS) SystemInformationClass >= MAX_SYSTEM_INFO_CLASS)
@ -2974,7 +2959,7 @@ NtQuerySystemInformation(
#if (NTDDI_VERSION < NTDDI_VISTA) #if (NTDDI_VERSION < NTDDI_VISTA)
/* /*
* Check if the request is valid. * Check whether the request is valid.
*/ */
if (SystemInformationClass < MIN_SYSTEM_INFO_CLASS || if (SystemInformationClass < MIN_SYSTEM_INFO_CLASS ||
SystemInformationClass >= MAX_SYSTEM_INFO_CLASS) SystemInformationClass >= MAX_SYSTEM_INFO_CLASS)
@ -2983,11 +2968,9 @@ NtQuerySystemInformation(
} }
#endif #endif
if (NULL != CallQS [SystemInformationClass].Query) if (CallQS[SystemInformationClass].Query != NULL)
{ {
/* /* Hand the request to a subhandler */
* Hand the request to a subhandler.
*/
FStatus = CallQS[SystemInformationClass].Query(SystemInformation, FStatus = CallQS[SystemInformationClass].Query(SystemInformation,
Length, Length,
&ResultLength); &ResultLength);
@ -3023,8 +3006,7 @@ NtSetSystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
_SEH2_TRY _SEH2_TRY
{ {
/* /*
* If called from user mode, check * If called from user mode, check possible unsafe arguments.
* possible unsafe arguments.
*/ */
if (PreviousMode != KernelMode) if (PreviousMode != KernelMode)
{ {
@ -3032,16 +3014,14 @@ NtSetSystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
} }
/* /*
* Check the request is valid. * Check whether the request is valid.
*/ */
if ((SystemInformationClass >= MIN_SYSTEM_INFO_CLASS) && if ((SystemInformationClass >= MIN_SYSTEM_INFO_CLASS) &&
(SystemInformationClass < MAX_SYSTEM_INFO_CLASS)) (SystemInformationClass < MAX_SYSTEM_INFO_CLASS))
{ {
if (NULL != CallQS [SystemInformationClass].Set) if (CallQS[SystemInformationClass].Set != NULL)
{ {
/* /* Hand the request to a subhandler */
* Hand the request to a subhandler.
*/
Status = CallQS[SystemInformationClass].Set(SystemInformation, Status = CallQS[SystemInformationClass].Set(SystemInformation,
SystemInformationLength); SystemInformationLength);
} }