ReactOS  0.4.14-dev-991-g696cdc6
power.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS VT100 emulator
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: drivers/base/green/power.c
5  * PURPOSE: IRP_MJ_POWER operations
6  * PROGRAMMERS: Copyright 2006 Hervé Poussineau (hpoussin@reactos.org)
7  */
8 
9 #include "green.h"
10 
11 #define NDEBUG
12 #include <debug.h>
13 
17  IN PIRP Irp)
18 {
20  PIO_STACK_LOCATION Stack;
21  ULONG_PTR Information = Irp->IoStatus.Information;
22  NTSTATUS Status = Irp->IoStatus.Status;
23 
26 
27  switch (Stack->MinorFunction)
28  {
29  case IRP_MN_SET_POWER: /* 0x02 */
30  {
31  DPRINT("IRP_MJ_POWER / IRP_MN_SET_POWER\n");
32  if (Type == GreenFDO)
33  {
36  }
37  else
38  {
39  DPRINT1("IRP_MJ_POWER / IRP_MN_SET_POWER / Unknown type 0x%lx\n",
40  Type);
41  ASSERT(FALSE);
42  }
43  break;
44  }
45  default:
46  {
47  DPRINT1("IRP_MJ_POWER / unknown minor function 0x%lx\n", Stack->MinorFunction);
48  break;
49  }
50  }
51 
52  Irp->IoStatus.Status = Status;
53  Irp->IoStatus.Information = Information;
54  if (Status != STATUS_PENDING)
56 
57  return Status;
58 }
#define IN
Definition: typedefs.h:39
Type
Definition: Type.h:6
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
uint32_t ULONG_PTR
Definition: typedefs.h:64
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
#define STATUS_PENDING
Definition: ntstatus.h:82
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
Definition: green.h:26
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define IRP_MN_SET_POWER
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
Definition: power.c:626
GREEN_DEVICE_TYPE
Definition: green.h:21
NTSTATUS GreenPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: power.c:15
#define DPRINT1
Definition: precomp.h:8
#define IO_NO_INCREMENT
Definition: iotypes.h:566
return STATUS_SUCCESS
Definition: btrfs.c:2938
Iosb Information
Definition: create.c:4377