mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 03:48:17 +00:00
Use W32API.
svn path=/trunk/; revision=15995
This commit is contained in:
parent
580b785a18
commit
ef09f86407
|
@ -52,7 +52,6 @@
|
||||||
#include <ddk/srb.h>
|
#include <ddk/srb.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
#include <ntos/kefuncs.h>
|
|
||||||
|
|
||||||
#include "atapi.h"
|
#include "atapi.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="atapi" type="kernelmodedriver" installbase="system32/drivers" installname="atapi.sys">
|
<module name="atapi" type="kernelmodedriver" installbase="system32/drivers" installname="atapi.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<include base="atapi">.</include>
|
<include base="atapi">.</include>
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
|
|
|
@ -35,9 +35,12 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/class2.h>
|
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
|
#include <ddk/ntdddisk.h>
|
||||||
|
#include <ddk/ntddcdrm.h>
|
||||||
|
#include <ddk/class2.h>
|
||||||
#include <ntos/minmax.h>
|
#include <ntos/minmax.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -134,7 +137,7 @@ VOID STDCALL
|
||||||
CdromTimerRoutine(IN PDEVICE_OBJECT DeviceObject,
|
CdromTimerRoutine(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PVOID Context);
|
IN PVOID Context);
|
||||||
|
|
||||||
VOID
|
VOID STDCALL
|
||||||
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PVOID Context);
|
IN PVOID Context);
|
||||||
|
|
||||||
|
@ -1633,7 +1636,7 @@ CdromTimerRoutine(IN PDEVICE_OBJECT DeviceObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID STDCALL
|
||||||
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
CdromWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PVOID Context)
|
IN PVOID Context)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="cdrom" type="kernelmodedriver" installbase="system32/drivers" installname="cdrom.sys">
|
<module name="cdrom" type="kernelmodedriver" installbase="system32/drivers" installname="cdrom.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<library>class2</library>
|
<library>class2</library>
|
||||||
|
|
|
@ -33,12 +33,15 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ddk/ntdddisk.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/class2.h>
|
#include <ddk/class2.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||||
|
|
||||||
#define VERSION "0.0.2"
|
#define VERSION "0.0.2"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="class2" type="kernelmodedriver" installbase="system32/drivers" installname="class2.sys">
|
<module name="class2" type="kernelmodedriver" installbase="system32/drivers" installname="class2.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<importlibrary definition="class2.def" />
|
<importlibrary definition="class2.def" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
|
|
|
@ -28,9 +28,11 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ddk/ntdddisk.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/class2.h>
|
#include <ddk/class2.h>
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="disk" type="kernelmodedriver" installbase="system32/drivers" installname="disk.sys" warnings="true">
|
<module name="disk" type="kernelmodedriver" installbase="system32/drivers" installname="disk.sys" warnings="true">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<linkerflag>-lgcc</linkerflag>
|
<linkerflag>-lgcc</linkerflag>
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/class2.h>
|
#include <ddk/ntdddisk.h>
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
|
#include <ddk/class2.h>
|
||||||
|
#include <ntos.h>
|
||||||
#include <napi/core.h>
|
#include <napi/core.h>
|
||||||
#include "../scsiport/scsiport_int.h"
|
#include "../scsiport/scsiport_int.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="diskdump" type="kernelmodedriver" installbase="system32/drivers" installname="diskdump.sys">
|
<module name="diskdump" type="kernelmodedriver" installbase="system32/drivers" installname="diskdump.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library definition="diskdump.def" />
|
<library definition="diskdump.def" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
|
|
|
@ -29,13 +29,11 @@
|
||||||
#define MAX_DRIVES_PER_CONTROLLER 4
|
#define MAX_DRIVES_PER_CONTROLLER 4
|
||||||
#define MAX_CONTROLLERS 4
|
#define MAX_CONTROLLERS 4
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
/* MS doesn't prototype this but the w2k kernel exports it */
|
/* MS doesn't prototype this but the w2k kernel exports it */
|
||||||
int _cdecl swprintf(const WCHAR *, ...);
|
int _cdecl swprintf(const WCHAR *, ...);
|
||||||
|
|
||||||
/* need ioctls in ddk build mode */
|
/* need ioctls in ddk build mode */
|
||||||
#include <ntdddisk.h>
|
#include <ntdddisk.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* missing from ros headers */
|
/* missing from ros headers */
|
||||||
/* TODO: fix this right */
|
/* TODO: fix this right */
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="floppy" type="kernelmodedriver" installbase="system32/drivers" installname="floppy.sys">
|
<module name="floppy" type="kernelmodedriver" installbase="system32/drivers" installname="floppy.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<include base="floppy">.</include>
|
<include base="floppy">.</include>
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
#include <ntos/minmax.h>
|
#include <ntos/minmax.h>
|
||||||
#include <rosrtl/string.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -2337,7 +2337,8 @@ SpiBuildDeviceMap (PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
|
||||||
{
|
{
|
||||||
PSCSI_PORT_LUN_EXTENSION LunExtension;
|
PSCSI_PORT_LUN_EXTENSION LunExtension;
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
UNICODE_STRING KeyName;
|
UNICODE_STRING KeyName =
|
||||||
|
RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi");
|
||||||
UNICODE_STRING ValueName;
|
UNICODE_STRING ValueName;
|
||||||
WCHAR NameBuffer[64];
|
WCHAR NameBuffer[64];
|
||||||
ULONG Disposition;
|
ULONG Disposition;
|
||||||
|
@ -2365,8 +2366,6 @@ SpiBuildDeviceMap (PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open or create the 'Scsi' subkey */
|
/* Open or create the 'Scsi' subkey */
|
||||||
RtlRosInitUnicodeStringFromLiteral(&KeyName,
|
|
||||||
L"\\Registry\\Machine\\Hardware\\DeviceMap\\Scsi");
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
OBJ_CASE_INSENSITIVE | OBJ_OPENIF,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="scsiport" type="kernelmodedriver" installbase="system32/drivers" installname="scsiport.sys">
|
<module name="scsiport" type="kernelmodedriver" installbase="system32/drivers" installname="scsiport.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<importlibrary definition="scsiport.def" />
|
<importlibrary definition="scsiport.def" />
|
||||||
<include base="scsiport">.</include>
|
<include base="scsiport">.</include>
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#define VERSION "0.0.3"
|
#define VERSION "0.0.3"
|
||||||
|
|
||||||
|
#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)x)%PAGE_SIZE) ? ((((ULONG_PTR)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG_PTR)x) )
|
||||||
|
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||||
|
|
||||||
typedef enum _SCSI_PORT_TIMER_STATES
|
typedef enum _SCSI_PORT_TIMER_STATES
|
||||||
{
|
{
|
||||||
IDETimerIdle,
|
IDETimerIdle,
|
||||||
|
|
Loading…
Reference in a new issue