[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,8 +2333,7 @@ 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)
{ {
/* FIXME */ /* FIXME */
@ -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,8 +2349,7 @@ 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)
{ {
ULONG MaxEntries, Node; ULONG MaxEntries, Node;
@ -2406,8 +2395,7 @@ QSI_DEF(SystemNumaProcessorMap)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* Class 56 - Prefetcher information */
/* Class 56 - Prefetcher information */
QSI_DEF(SystemPrefetcherInformation) QSI_DEF(SystemPrefetcherInformation)
{ {
/* FIXME */ /* FIXME */
@ -2415,8 +2403,7 @@ 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)
{ {
/* FIXME */ /* FIXME */
@ -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,8 +2419,7 @@ 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)
{ {
ULONG MaxEntries, Node; ULONG MaxEntries, Node;
@ -2488,7 +2473,7 @@ QSI_DEF(SystemNumaAvailableMemory)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* Class 64 - Extended handle information */ /* Class 64 - Extended handle information */
QSI_DEF(SystemExtendedHandleInformation) QSI_DEF(SystemExtendedHandleInformation)
{ {
PSYSTEM_HANDLE_INFORMATION_EX HandleInformation; PSYSTEM_HANDLE_INFORMATION_EX HandleInformation;
@ -2619,7 +2604,7 @@ QSI_DEF(SystemExtendedHandleInformation)
return Status; return Status;
} }
/* Class 70 - System object security mode information */ /* Class 70 - System object security mode information */
QSI_DEF(SystemObjectSecurityMode) QSI_DEF(SystemObjectSecurityMode)
{ {
PULONG ObjectSecurityInfo = (PULONG)Buffer; PULONG ObjectSecurityInfo = (PULONG)Buffer;
@ -2635,7 +2620,7 @@ QSI_DEF(SystemObjectSecurityMode)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
/* Class 73 - Logical processor information */ /* Class 73 - Logical processor information */
QSI_DEF(SystemLogicalProcessorInformation) QSI_DEF(SystemLogicalProcessorInformation)
{ {
LONG i; LONG i;
@ -2719,7 +2704,7 @@ QSI_DEF(SystemLogicalProcessorInformation)
return Status; return Status;
} }
/* Class 76 - System firmware table information */ /* Class 76 - System firmware table information */
QSI_DEF(SystemFirmwareTableInformation) QSI_DEF(SystemFirmwareTableInformation)
{ {
PSYSTEM_FIRMWARE_TABLE_INFORMATION SysFirmwareInfo = (PSYSTEM_FIRMWARE_TABLE_INFORMATION)Buffer; PSYSTEM_FIRMWARE_TABLE_INFORMATION SysFirmwareInfo = (PSYSTEM_FIRMWARE_TABLE_INFORMATION)Buffer;
@ -2839,7 +2824,7 @@ struct _QSSI_CALLS
static static
QSSI_CALLS QSSI_CALLS
CallQS [] = CallQS[] =
{ {
SI_QX(SystemBasicInformation), SI_QX(SystemBasicInformation),
SI_QX(SystemProcessorInformation), SI_QX(SystemProcessorInformation),
@ -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,14 +2968,12 @@ 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,
*/ Length,
FStatus = CallQS [SystemInformationClass].Query(SystemInformation, &ResultLength);
Length,
&ResultLength);
/* Save the result length to the caller */ /* Save the result length to the caller */
if (UnsafeResultLength) if (UnsafeResultLength)
@ -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,18 +3014,16 @@ 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,
*/ SystemInformationLength);
Status = CallQS [SystemInformationClass].Set(SystemInformation,
SystemInformationLength);
} }
} }
} }

View file

@ -210,7 +210,7 @@ typedef enum _HARDERROR_RESPONSE
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE; } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
// //
// System Information Classes for NtQuerySystemInformation // System Information Classes for NtQuerySystemInformation
// //
typedef enum _SYSTEM_INFORMATION_CLASS typedef enum _SYSTEM_INFORMATION_CLASS
{ {
@ -316,7 +316,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
} SYSTEM_INFORMATION_CLASS; } SYSTEM_INFORMATION_CLASS;
// //
// System Information Classes for NtQueryMutant // System Information Classes for NtQueryMutant
// //
typedef enum _MUTANT_INFORMATION_CLASS typedef enum _MUTANT_INFORMATION_CLASS
{ {
@ -325,7 +325,7 @@ typedef enum _MUTANT_INFORMATION_CLASS
} MUTANT_INFORMATION_CLASS; } MUTANT_INFORMATION_CLASS;
// //
// System Information Classes for NtQueryAtom // System Information Classes for NtQueryAtom
// //
typedef enum _ATOM_INFORMATION_CLASS typedef enum _ATOM_INFORMATION_CLASS
{ {
@ -334,7 +334,7 @@ typedef enum _ATOM_INFORMATION_CLASS
} ATOM_INFORMATION_CLASS; } ATOM_INFORMATION_CLASS;
// //
// System Information Classes for NtQueryTimer // System Information Classes for NtQueryTimer
// //
typedef enum _TIMER_INFORMATION_CLASS typedef enum _TIMER_INFORMATION_CLASS
{ {
@ -342,7 +342,7 @@ typedef enum _TIMER_INFORMATION_CLASS
} TIMER_INFORMATION_CLASS; } TIMER_INFORMATION_CLASS;
// //
// System Information Classes for NtQuerySemaphore // System Information Classes for NtQuerySemaphore
// //
typedef enum _SEMAPHORE_INFORMATION_CLASS typedef enum _SEMAPHORE_INFORMATION_CLASS
{ {
@ -350,7 +350,7 @@ typedef enum _SEMAPHORE_INFORMATION_CLASS
} SEMAPHORE_INFORMATION_CLASS; } SEMAPHORE_INFORMATION_CLASS;
// //
// System Information Classes for NtQueryEvent // System Information Classes for NtQueryEvent
// //
typedef enum _EVENT_INFORMATION_CLASS typedef enum _EVENT_INFORMATION_CLASS
{ {