--- trunk/reactos/drivers/storage/atapi/atapi.c 2006-01-07 21:45:51 UTC (rev 20672)
+++ trunk/reactos/drivers/storage/atapi/atapi.c 2006-01-07 21:50:29 UTC (rev 20673)
@@ -63,6 +63,10 @@
#define VERSION "0.0.1"
+NTSTATUS NTAPI
+DriverEntry(IN PDRIVER_OBJECT DriverObject,
+ IN PUNICODE_STRING RegistryPath);
+
// ------------------------------------------------------- File Static Data
#ifdef ENABLE_DMA
@@ -98,9 +102,9 @@
PUCHAR DataBuffer;
ULONG DataTransferLength;
- BOOLEAN FASTCALL (*Handler)(IN struct _ATAPI_MINIPORT_EXTENSION* DevExt);
+ BOOLEAN (FASTCALL *Handler)(IN struct _ATAPI_MINIPORT_EXTENSION* DevExt);
#ifdef ENABLE_DMA
- BOOL UseDma;
+ BOOLEAN UseDma;
ULONG PRDCount;
ULONG PRDMaxCount;
PPRD PRDTable;
@@ -168,7 +172,7 @@
static BOOLEAN
AtapiInitDma(PATAPI_MINIPORT_EXTENSION DevExt,
PSCSI_REQUEST_BLOCK Srb,
- BYTE cmd);
+ UCHAR cmd);
#endif
static ULONG STDCALL
@@ -208,8 +212,8 @@
static VOID
AtapiExecuteCommand(PATAPI_MINIPORT_EXTENSION DevExt,
- BYTE command,
- BOOLEAN FASTCALL (*Handler)(PATAPI_MINIPORT_EXTENSION));
+ UCHAR command,
+ BOOLEAN (FASTCALL *Handler)(PATAPI_MINIPORT_EXTENSION));
static BOOLEAN STDCALL
AtapiInterrupt(IN PVOID DeviceExtension);
@@ -338,7 +342,7 @@
// RETURNS:
// NTSTATUS
-STDCALL NTSTATUS
+NTSTATUS NTAPI
DriverEntry(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
@@ -1106,7 +1110,7 @@
AtapiInterrupt(IN PVOID DeviceExtension)
{
PATAPI_MINIPORT_EXTENSION DevExt;
- BYTE Status;
+ UCHAR Status;
DevExt = (PATAPI_MINIPORT_EXTENSION)DeviceExtension;
if (DevExt->Handler == NULL)
@@ -1149,7 +1153,7 @@
AtapiConfigDma(PATAPI_MINIPORT_EXTENSION DeviceExtension, ULONG UnitNumber)
{
BOOLEAN Result = FALSE;
- BYTE Status;
+ UCHAR Status;
if (UnitNumber < 2)
{
@@ -2156,7 +2160,7 @@
#ifdef ENABLE_DMA
if (DeviceExtension->UseDma)
{
- BYTE DmaCommand;
+ UCHAR DmaCommand;
/* start DMA */
DmaCommand = IDEReadDMACommand(DeviceExtension->BusMasterRegisterBase);
IDEWriteDMACommand(DeviceExtension->BusMasterRegisterBase, DmaCommand|0x01);
@@ -2382,7 +2386,7 @@
UCHAR Command;
ULONG Retries;
UCHAR Status;
- BOOLEAN FASTCALL (*Handler)(PATAPI_MINIPORT_EXTENSION DevExt);
+ BOOLEAN (FASTCALL *Handler)(PATAPI_MINIPORT_EXTENSION DevExt);
DPRINT("AtapiReadWrite() called!\n");
DPRINT("SCSIOP_WRITE: TargetId: %lu\n",
@@ -2585,7 +2589,7 @@
#ifdef ENABLE_DMA
if (DeviceExtension->UseDma)
{
- BYTE DmaCommand;
+ UCHAR DmaCommand;
/* start DMA */
DmaCommand = IDEReadDMACommand(DeviceExtension->BusMasterRegisterBase);
IDEWriteDMACommand(DeviceExtension->BusMasterRegisterBase, DmaCommand|0x01);
@@ -2602,7 +2606,7 @@
/* Wait for controller ready */
for (Retries = 0; Retries < IDE_MAX_WRITE_RETRIES; Retries++)
{
- BYTE Status = IDEReadStatus(DeviceExtension->CommandPortBase);
+ UCHAR Status = IDEReadStatus(DeviceExtension->CommandPortBase);
if (!(Status & IDE_SR_BUSY) || (Status & IDE_SR_ERR))
{
break;
@@ -2989,12 +2993,12 @@
static BOOLEAN FASTCALL
AtapiDmaPacketInterrupt(PATAPI_MINIPORT_EXTENSION DevExt)
{
- BYTE SrbStatus;
- BYTE DmaCommand;
- BYTE DmaStatus;
- BYTE Status;
- BYTE Error;
- BYTE SensKey;
+ UCHAR SrbStatus;
+ UCHAR DmaCommand;
+ UCHAR DmaStatus;
+ UCHAR Status;
+ UCHAR Error;
+ UCHAR SensKey;
DPRINT("AtapiPacketDmaInterrupt\n");
@@ -3043,16 +3047,16 @@
AtapiPacketInterrupt(PATAPI_MINIPORT_EXTENSION DevExt)
{
PSCSI_REQUEST_BLOCK Srb;
- BYTE Status;
- BYTE IntReason;
+ UCHAR Status;
+ UCHAR IntReason;
ULONG TransferSize;
ULONG JunkSize = 0;
- BOOL IsLastBlock;
- PBYTE TargetAddress;
+ BOOLEAN IsLastBlock;
+ PUCHAR TargetAddress;
ULONG Retries;
- BYTE SrbStatus;
- BYTE Error;
- BYTE SensKey;
+ UCHAR SrbStatus;
+ UCHAR Error;
+ UCHAR SensKey;
DPRINT("AtapiPacketInterrupt()\n");
@@ -3183,7 +3187,7 @@
static BOOLEAN FASTCALL
AtapiNoDataInterrupt(PATAPI_MINIPORT_EXTENSION DevExt)
{
- BYTE Status;
+ UCHAR Status;
DPRINT("AtapiNoDataInterrupt()\n");
@@ -3199,9 +3203,9 @@
static BOOLEAN FASTCALL
AtapiDmaInterrupt(PATAPI_MINIPORT_EXTENSION DevExt)
{
- BYTE DmaCommand;
- BYTE DmaStatus;
- BYTE Status;
+ UCHAR DmaCommand;
+ UCHAR DmaStatus;
+ UCHAR Status;
DPRINT("AtapiDmaInterrupt()\n");
@@ -3448,8 +3452,8 @@
static VOID
AtapiExecuteCommand(PATAPI_MINIPORT_EXTENSION DevExt,
- BYTE command,
- BOOLEAN FASTCALL (*Handler)(PATAPI_MINIPORT_EXTENSION))
+ UCHAR command,
+ BOOLEAN (FASTCALL *Handler)(PATAPI_MINIPORT_EXTENSION))
{
if (DevExt->Handler != NULL)
{
@@ -3464,7 +3468,7 @@
static BOOLEAN
AtapiInitDma(PATAPI_MINIPORT_EXTENSION DevExt,
PSCSI_REQUEST_BLOCK Srb,
- BYTE cmd)
+ UCHAR cmd)
{
PVOID StartAddress;
PVOID EndAddress;
@@ -3472,7 +3476,7 @@
SCSI_PHYSICAL_ADDRESS PhysicalAddress;
ULONG Length;
ULONG tmpLength;
- BYTE Status;
+ UCHAR Status;
DPRINT("AtapiInitDma()\n");
--- trunk/reactos/drivers/storage/include/class2.h 2006-01-07 21:45:51 UTC (rev 20672)
+++ trunk/reactos/drivers/storage/include/class2.h 2006-01-07 21:50:29 UTC (rev 20673)
@@ -18,36 +18,36 @@
struct _CLASS_INIT_DATA;
-typedef VOID STDCALL
-(*PCLASS_ERROR)(IN PDEVICE_OBJECT DeviceObject,
+typedef VOID
+(STDCALL *PCLASS_ERROR)(IN PDEVICE_OBJECT DeviceObject,
IN PSCSI_REQUEST_BLOCK Srb,
IN OUT NTSTATUS *Status,
IN OUT BOOLEAN *Retry);
-typedef BOOLEAN STDCALL
-(*PCLASS_DEVICE_CALLBACK)(IN PINQUIRYDATA);
+typedef BOOLEAN
+(STDCALL *PCLASS_DEVICE_CALLBACK)(IN PINQUIRYDATA);
-typedef NTSTATUS STDCALL
-(*PCLASS_READ_WRITE)(IN PDEVICE_OBJECT DeviceObject,
+typedef NTSTATUS
+(STDCALL *PCLASS_READ_WRITE)(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-typedef BOOLEAN STDCALL
-(*PCLASS_FIND_DEVICES)(IN PDRIVER_OBJECT DriverObject,
+typedef BOOLEAN
+(STDCALL *PCLASS_FIND_DEVICES)(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath,
IN struct _CLASS_INIT_DATA *InitializationData,
IN PDEVICE_OBJECT PortDeviceObject,
IN ULONG PortNumber);
-typedef NTSTATUS STDCALL
-(*PCLASS_DEVICE_CONTROL)(IN PDEVICE_OBJECT DeviceObject,
+typedef NTSTATUS
+(STDCALL *PCLASS_DEVICE_CONTROL)(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-typedef NTSTATUS STDCALL
-(*PCLASS_SHUTDOWN_FLUSH)(IN PDEVICE_OBJECT DeviceObject,
+typedef NTSTATUS
+(STDCALL *PCLASS_SHUTDOWN_FLUSH)(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
-typedef NTSTATUS STDCALL
-(*PCLASS_CREATE_CLOSE)(IN PDEVICE_OBJECT DeviceObject,
+typedef NTSTATUS
+(STDCALL *PCLASS_CREATE_CLOSE)(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);