mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- Add some UNIMPLEMENTED macros to highlight API's being called
- Reformat the code, no other changes svn path=/trunk/; revision=27382
This commit is contained in:
parent
8db103104e
commit
d090403690
1 changed files with 204 additions and 210 deletions
|
@ -30,8 +30,7 @@ BOOLEAN PopAcpiPresent = FALSE;
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
PoCallDriver(
|
PoCallDriver(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
|
||||||
IN OUT PIRP Irp)
|
IN OUT PIRP Irp)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -46,12 +45,12 @@ PoCallDriver(
|
||||||
*/
|
*/
|
||||||
PULONG
|
PULONG
|
||||||
STDCALL
|
STDCALL
|
||||||
PoRegisterDeviceForIdleDetection(
|
PoRegisterDeviceForIdleDetection(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
|
||||||
IN ULONG ConservationIdleTime,
|
IN ULONG ConservationIdleTime,
|
||||||
IN ULONG PerformanceIdleTime,
|
IN ULONG PerformanceIdleTime,
|
||||||
IN DEVICE_POWER_STATE State)
|
IN DEVICE_POWER_STATE State)
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,17 +59,17 @@ PoRegisterDeviceForIdleDetection(
|
||||||
*/
|
*/
|
||||||
PVOID
|
PVOID
|
||||||
STDCALL
|
STDCALL
|
||||||
PoRegisterSystemState(
|
PoRegisterSystemState(IN PVOID StateHandle,
|
||||||
IN PVOID StateHandle,
|
|
||||||
IN EXECUTION_STATE Flags)
|
IN EXECUTION_STATE Flags)
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS STDCALL
|
NTSTATUS
|
||||||
PopRequestPowerIrpCompletion(
|
STDCALL
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
PopRequestPowerIrpCompletion(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp,
|
IN PIRP Irp,
|
||||||
IN PVOID Context)
|
IN PVOID Context)
|
||||||
{
|
{
|
||||||
|
@ -80,8 +79,7 @@ PopRequestPowerIrpCompletion(
|
||||||
Stack = IoGetNextIrpStackLocation(Irp);
|
Stack = IoGetNextIrpStackLocation(Irp);
|
||||||
RequestPowerItem = (PREQUEST_POWER_ITEM)Context;
|
RequestPowerItem = (PREQUEST_POWER_ITEM)Context;
|
||||||
|
|
||||||
RequestPowerItem->CompletionRoutine(
|
RequestPowerItem->CompletionRoutine(DeviceObject,
|
||||||
DeviceObject,
|
|
||||||
Stack->MinorFunction,
|
Stack->MinorFunction,
|
||||||
RequestPowerItem->PowerState,
|
RequestPowerItem->PowerState,
|
||||||
RequestPowerItem->Context,
|
RequestPowerItem->Context,
|
||||||
|
@ -89,6 +87,7 @@ PopRequestPowerIrpCompletion(
|
||||||
|
|
||||||
ExFreePool(&Irp->IoStatus);
|
ExFreePool(&Irp->IoStatus);
|
||||||
ExFreePool(Context);
|
ExFreePool(Context);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,8 +96,7 @@ PopRequestPowerIrpCompletion(
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
PoRequestPowerIrp(
|
PoRequestPowerIrp(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
|
||||||
IN UCHAR MinorFunction,
|
IN UCHAR MinorFunction,
|
||||||
IN POWER_STATE PowerState,
|
IN POWER_STATE PowerState,
|
||||||
IN PREQUEST_POWER_COMPLETE CompletionFunction,
|
IN PREQUEST_POWER_COMPLETE CompletionFunction,
|
||||||
|
@ -130,8 +128,7 @@ PoRequestPowerIrp(
|
||||||
/* Always call the top of the device stack */
|
/* Always call the top of the device stack */
|
||||||
TopDeviceObject = IoGetAttachedDeviceReference(DeviceObject);
|
TopDeviceObject = IoGetAttachedDeviceReference(DeviceObject);
|
||||||
|
|
||||||
Irp = IoBuildSynchronousFsdRequest(
|
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP,
|
||||||
IRP_MJ_PNP,
|
|
||||||
TopDeviceObject,
|
TopDeviceObject,
|
||||||
NULL,
|
NULL,
|
||||||
0,
|
0,
|
||||||
|
@ -178,6 +175,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
PoSetDeviceBusy(IN PULONG IdlePointer)
|
PoSetDeviceBusy(IN PULONG IdlePointer)
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
*IdlePointer = 0;
|
*IdlePointer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +183,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
PopCleanupPowerState(IN PPOWER_STATE PowerState)
|
PopCleanupPowerState(IN PPOWER_STATE PowerState)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
//UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -193,8 +191,7 @@ PopCleanupPowerState(IN PPOWER_STATE PowerState)
|
||||||
*/
|
*/
|
||||||
POWER_STATE
|
POWER_STATE
|
||||||
STDCALL
|
STDCALL
|
||||||
PoSetPowerState(
|
PoSetPowerState(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
|
||||||
IN POWER_STATE_TYPE Type,
|
IN POWER_STATE_TYPE Type,
|
||||||
IN POWER_STATE State)
|
IN POWER_STATE State)
|
||||||
{
|
{
|
||||||
|
@ -213,9 +210,9 @@ PoSetPowerState(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
PoSetSystemState(
|
PoSetSystemState(IN EXECUTION_STATE Flags)
|
||||||
IN EXECUTION_STATE Flags)
|
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -223,9 +220,9 @@ PoSetSystemState(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
PoStartNextPowerIrp(
|
PoStartNextPowerIrp(IN PIRP Irp)
|
||||||
IN PIRP Irp)
|
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -233,15 +230,14 @@ PoStartNextPowerIrp(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
PoUnregisterSystemState(
|
PoUnregisterSystemState(IN PVOID StateHandle)
|
||||||
IN PVOID StateHandle)
|
|
||||||
{
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
PopSetSystemPowerState(
|
PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState)
|
||||||
SYSTEM_POWER_STATE PowerState)
|
|
||||||
{
|
{
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
|
@ -254,7 +250,8 @@ PopSetSystemPowerState(
|
||||||
if (!PopAcpiPresent) return STATUS_NOT_IMPLEMENTED;
|
if (!PopAcpiPresent) return STATUS_NOT_IMPLEMENTED;
|
||||||
|
|
||||||
Status = IopGetSystemPowerDeviceObject(&DeviceObject);
|
Status = IopGetSystemPowerDeviceObject(&DeviceObject);
|
||||||
if (!NT_SUCCESS(Status)) {
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
CPRINT("No system power driver available\n");
|
CPRINT("No system power driver available\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
@ -284,6 +281,7 @@ PopSetSystemPowerState(
|
||||||
IrpSp->Parameters.Power.Type = SystemPowerState;
|
IrpSp->Parameters.Power.Type = SystemPowerState;
|
||||||
IrpSp->Parameters.Power.State.SystemState = PowerState;
|
IrpSp->Parameters.Power.State.SystemState = PowerState;
|
||||||
|
|
||||||
|
DPRINT("Calling ACPI driver");
|
||||||
Status = PoCallDriver(Fdo, Irp);
|
Status = PoCallDriver(Fdo, Irp);
|
||||||
if (Status == STATUS_PENDING)
|
if (Status == STATUS_PENDING)
|
||||||
{
|
{
|
||||||
|
@ -395,8 +393,7 @@ PoInitializePrcb(IN PKPRCB Prcb)
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtInitiatePowerAction (
|
NtInitiatePowerAction (IN POWER_ACTION SystemAction,
|
||||||
IN POWER_ACTION SystemAction,
|
|
||||||
IN SYSTEM_POWER_STATE MinSystemState,
|
IN SYSTEM_POWER_STATE MinSystemState,
|
||||||
IN ULONG Flags,
|
IN ULONG Flags,
|
||||||
IN BOOLEAN Asynchronous)
|
IN BOOLEAN Asynchronous)
|
||||||
|
@ -410,13 +407,11 @@ NtInitiatePowerAction (
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
NtPowerInformation(
|
NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel,
|
||||||
IN POWER_INFORMATION_LEVEL PowerInformationLevel,
|
|
||||||
IN PVOID InputBuffer OPTIONAL,
|
IN PVOID InputBuffer OPTIONAL,
|
||||||
IN ULONG InputBufferLength,
|
IN ULONG InputBufferLength,
|
||||||
OUT PVOID OutputBuffer OPTIONAL,
|
OUT PVOID OutputBuffer OPTIONAL,
|
||||||
IN ULONG OutputBufferLength
|
IN ULONG OutputBufferLength)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
@ -427,6 +422,7 @@ NtPowerInformation(
|
||||||
PowerInformationLevel,
|
PowerInformationLevel,
|
||||||
InputBuffer, InputBufferLength,
|
InputBuffer, InputBufferLength,
|
||||||
OutputBuffer, OutputBufferLength);
|
OutputBuffer, OutputBufferLength);
|
||||||
|
|
||||||
switch (PowerInformationLevel)
|
switch (PowerInformationLevel)
|
||||||
{
|
{
|
||||||
case SystemBatteryState:
|
case SystemBatteryState:
|
||||||
|
@ -459,9 +455,7 @@ NtPowerInformation(
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
STDCALL
|
STDCALL
|
||||||
PoQueueShutdownWorkItem(
|
PoQueueShutdownWorkItem(IN PWORK_QUEUE_ITEM WorkItem)
|
||||||
IN PWORK_QUEUE_ITEM WorkItem
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue