mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
[NTOSKRNL]
Implement SystemTimeAdjustmentInformation case in NtSetSystemInformation. This silences the annoying messages caused by VBoxService svn path=/trunk/; revision=54081
This commit is contained in:
parent
072e367a5d
commit
f3a426e89f
3 changed files with 42 additions and 25 deletions
|
@ -1391,7 +1391,7 @@ QSI_DEF(SystemTimeAdjustmentInformation)
|
|||
/* Give time values to our caller */
|
||||
TimeInfo->TimeIncrement = KeMaximumIncrement;
|
||||
TimeInfo->TimeAdjustment = KeTimeAdjustment;
|
||||
TimeInfo->Enable = TRUE;
|
||||
TimeInfo->Enable = !KiTimeAdjustmentEnabled;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -1399,8 +1399,8 @@ QSI_DEF(SystemTimeAdjustmentInformation)
|
|||
SSI_DEF(SystemTimeAdjustmentInformation)
|
||||
{
|
||||
KPROCESSOR_MODE PreviousMode = KeGetPreviousMode();
|
||||
/*PSYSTEM_SET_TIME_ADJUST_INFORMATION TimeInfo =
|
||||
(PSYSTEM_SET_TIME_ADJUST_INFORMATION)Buffer;*/
|
||||
PSYSTEM_SET_TIME_ADJUST_INFORMATION TimeInfo =
|
||||
(PSYSTEM_SET_TIME_ADJUST_INFORMATION)Buffer;
|
||||
|
||||
/* Check size of a buffer, it must match our expectations */
|
||||
if (sizeof(SYSTEM_SET_TIME_ADJUST_INFORMATION) != Size)
|
||||
|
@ -1416,9 +1416,24 @@ SSI_DEF(SystemTimeAdjustmentInformation)
|
|||
}
|
||||
}
|
||||
|
||||
/* TODO: Set time adjustment information */
|
||||
DPRINT1("Setting of SystemTimeAdjustmentInformation is not implemented yet!\n");
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
/* FIXME: behaviour suggests the member be named 'Disable' */
|
||||
if (TimeInfo->Enable)
|
||||
{
|
||||
/* Disable time adjustment and set default value */
|
||||
KiTimeAdjustmentEnabled = FALSE;
|
||||
KeTimeAdjustment = KeMaximumIncrement;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Check if a valid time adjustment value is given */
|
||||
if (TimeInfo->TimeAdjustment == 0) return STATUS_INVALID_PARAMETER_2;
|
||||
|
||||
/* Enable time adjustment and set the adjustment value */
|
||||
KiTimeAdjustmentEnabled = TRUE;
|
||||
KeTimeAdjustment = TimeInfo->TimeAdjustment;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* Class 29 - Summary Memory Information */
|
||||
|
|
|
@ -132,6 +132,7 @@ extern PVOID KeUserExceptionDispatcher;
|
|||
extern PVOID KeRaiseUserExceptionDispatcher;
|
||||
extern ULONG KeTimeIncrement;
|
||||
extern ULONG KeTimeAdjustment;
|
||||
extern BOOLEAN KiTimeAdjustmentEnabled;
|
||||
extern LONG KiTickOffset;
|
||||
extern ULONG_PTR KiBugCheckData[5];
|
||||
extern ULONG KiFreezeFlag;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
LONG KiTickOffset;
|
||||
ULONG KeTimeAdjustment;
|
||||
BOOLEAN KiTimeAdjustmentEnabled = FALSE;
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue