[PSDK/DDK]: Last couple of fixes to headers. Classpnp can compile (and link) now.
authorSir Richard <sir_richard@svn.reactos.org>
Sat, 25 Sep 2010 05:46:31 +0000 (05:46 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Sat, 25 Sep 2010 05:46:31 +0000 (05:46 +0000)
svn path=/trunk/; revision=48865

reactos/include/ddk/classpnp.h
reactos/include/psdk/ntddstor.h

index b6bbc9d..368f390 100644 (file)
 #define SRB_CLASS_FLAGS_PAGING            0x40000000
 #define SRB_CLASS_FLAGS_FREE_MDL          0x80000000
 
 #define SRB_CLASS_FLAGS_PAGING            0x40000000
 #define SRB_CLASS_FLAGS_FREE_MDL          0x80000000
 
+#define ASSERT_FDO(x) \
+    ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)
+
+#define ASSERT_PDO(x) \
+    ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo))
+
 #define IS_CLEANUP_REQUEST(majorFunction)   \
   ((majorFunction == IRP_MJ_CLOSE) ||       \
    (majorFunction == IRP_MJ_CLEANUP) ||     \
 #define IS_CLEANUP_REQUEST(majorFunction)   \
   ((majorFunction == IRP_MJ_CLOSE) ||       \
    (majorFunction == IRP_MJ_CLEANUP) ||     \
 
 #define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1
 
 
 #define DEFAULT_FAILURE_PREDICTION_PERIOD 60 * 60 * 1
 
+static inline ULONG CountOfSetBitsUChar(UCHAR _X)
+{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
+static inline ULONG CountOfSetBitsULong(ULONG _X)
+{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
+static inline ULONG CountOfSetBitsULong32(ULONG32 _X)
+{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
+static inline ULONG CountOfSetBitsULong64(ULONG64 _X)
+{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
+static inline ULONG CountOfSetBitsUlongPtr(ULONG_PTR _X)
+{ ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
+
 typedef enum _MEDIA_CHANGE_DETECTION_STATE {
   MediaUnknown,
   MediaPresent,
 typedef enum _MEDIA_CHANGE_DETECTION_STATE {
   MediaUnknown,
   MediaPresent,
@@ -771,6 +788,14 @@ ClassIoComplete(
   PIRP Irp,
   PVOID Context);
 
   PIRP Irp,
   PVOID Context);
 
+SCSIPORTAPI
+NTSTATUS
+NTAPI
+ClassIoCompleteAssociated(
+  PDEVICE_OBJECT DeviceObject,
+  PIRP Irp,
+  PVOID Context);
+
 SCSIPORTAPI
 BOOLEAN
 NTAPI
 SCSIPORTAPI
 BOOLEAN
 NTAPI
@@ -860,6 +885,13 @@ NTAPI
 ClassClaimDevice(
   PDEVICE_OBJECT LowerDeviceObject,
   BOOLEAN Release);
 ClassClaimDevice(
   PDEVICE_OBJECT LowerDeviceObject,
   BOOLEAN Release);
+  
+SCSIPORTAPI
+NTSTATUS
+NTAPI
+ClassInternalIoControl (
+  PDEVICE_OBJECT DeviceObject,
+  PIRP Irp);
 
 SCSIPORTAPI
 VOID
 
 SCSIPORTAPI
 VOID
index 6b74133..3d5081e 100644 (file)
@@ -124,10 +124,10 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_RESET_BUS \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_RESET_BUS \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
 
 #define IOCTL_STORAGE_RESET_DEVICE \
 
 #define IOCTL_STORAGE_RESET_DEVICE \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
 
 #define IOCTL_STORAGE_GET_DEVICE_NUMBER \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_GET_DEVICE_NUMBER \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)