https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ca9fd861aa7e2eb6fd142…
commit ca9fd861aa7e2eb6fd142a71ede1839ea70390ba
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue Apr 3 16:58:44 2018 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Jul 1 14:45:21 2018 +0200
[DRIVERS][NTOS][NDK] Use IO_STACK_LOCATION instead of EXTENDED_IO_STACK_LOCATION and
remove the latter from NDK
---
drivers/filesystems/ext2/inc/ext2fs.h | 1 +
drivers/filesystems/msfs/create.c | 4 +-
drivers/filesystems/npfs/create.c | 8 +-
drivers/filesystems/reiserfs/inc/rfsd.h | 1 +
ntoskrnl/io/iomgr/file.c | 4 +-
sdk/include/ndk/iotypes.h | 256 +-------------------------------
6 files changed, 11 insertions(+), 263 deletions(-)
diff --git a/drivers/filesystems/ext2/inc/ext2fs.h
b/drivers/filesystems/ext2/inc/ext2fs.h
index 10ec2eab5f..08fd465f93 100644
--- a/drivers/filesystems/ext2/inc/ext2fs.h
+++ b/drivers/filesystems/ext2/inc/ext2fs.h
@@ -17,6 +17,7 @@
#ifdef __REACTOS__
#include <ndk/rtlfuncs.h>
#include <pseh/pseh2.h>
+typedef IO_STACK_LOCATION EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
#endif
#include <stdio.h>
#include <time.h>
diff --git a/drivers/filesystems/msfs/create.c b/drivers/filesystems/msfs/create.c
index 1f47eb5c3d..45aa875481 100644
--- a/drivers/filesystems/msfs/create.c
+++ b/drivers/filesystems/msfs/create.c
@@ -107,7 +107,7 @@ NTSTATUS DEFAULTAPI
MsfsCreateMailslot(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
- PEXTENDED_IO_STACK_LOCATION IoStack;
+ PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PMSFS_DEVICE_EXTENSION DeviceExtension;
PMSFS_FCB Fcb;
@@ -119,7 +119,7 @@ MsfsCreateMailslot(PDEVICE_OBJECT DeviceObject,
DPRINT("MsfsCreateMailslot(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
- IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
DeviceExtension = DeviceObject->DeviceExtension;
FileObject = IoStack->FileObject;
Buffer = IoStack->Parameters.CreateMailslot.Parameters;
diff --git a/drivers/filesystems/npfs/create.c b/drivers/filesystems/npfs/create.c
index 96e60e306a..da2f967faf 100644
--- a/drivers/filesystems/npfs/create.c
+++ b/drivers/filesystems/npfs/create.c
@@ -361,7 +361,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
IO_STATUS_BLOCK IoStatus;
- PEXTENDED_IO_STACK_LOCATION IoStack;
+ PIO_STACK_LOCATION IoStack;
UNICODE_STRING FileName;
PFILE_OBJECT FileObject;
PFILE_OBJECT RelatedFileObject;
@@ -375,7 +375,7 @@ NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
TRACE("Entered\n");
InitializeListHead(&DeferredList);
- IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
RelatedFileObject = FileObject->RelatedFileObject;
FileName = FileObject->FileName;
@@ -791,7 +791,7 @@ NTAPI
NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- PEXTENDED_IO_STACK_LOCATION IoStack;
+ PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PFILE_OBJECT RelatedFileObject;
USHORT Disposition, ShareAccess;
@@ -807,7 +807,7 @@ NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
InitializeListHead(&DeferredList);
Process = IoGetRequestorProcess(Irp);
- IoStack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
RelatedFileObject = FileObject->RelatedFileObject;
diff --git a/drivers/filesystems/reiserfs/inc/rfsd.h
b/drivers/filesystems/reiserfs/inc/rfsd.h
index 2f36e786c4..5d8b200d01 100644
--- a/drivers/filesystems/reiserfs/inc/rfsd.h
+++ b/drivers/filesystems/reiserfs/inc/rfsd.h
@@ -26,6 +26,7 @@
#ifdef __REACTOS__
#include <ndk/rtlfuncs.h>
#include <pseh/pseh2.h>
+typedef IO_STACK_LOCATION EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
#endif
typedef struct reiserfs_super_block_v1 RFSD_SUPER_BLOCK, *PRFSD_SUPER_BLOCK;
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c
index 71863ccb42..15504adaca 100644
--- a/ntoskrnl/io/iomgr/file.c
+++ b/ntoskrnl/io/iomgr/file.c
@@ -285,7 +285,7 @@ IopParseDevice(IN PVOID ParseObject,
PFILE_OBJECT FileObject;
PVPB Vpb = NULL;
PIRP Irp;
- PEXTENDED_IO_STACK_LOCATION StackLoc;
+ PIO_STACK_LOCATION StackLoc;
IO_SECURITY_CONTEXT SecurityContext;
IO_STATUS_BLOCK IoStatusBlock;
BOOLEAN DirectOpen = FALSE, OpenCancelled, UseDummyFile;
@@ -673,7 +673,7 @@ IopParseDevice(IN PVOID ParseObject,
SecurityContext.FullCreateOptions = OpenPacket->CreateOptions;
/* Get the I/O Stack location */
- StackLoc = (PEXTENDED_IO_STACK_LOCATION)IoGetNextIrpStackLocation(Irp);
+ StackLoc = IoGetNextIrpStackLocation(Irp);
StackLoc->Control = 0;
/* Check what kind of file this is */
diff --git a/sdk/include/ndk/iotypes.h b/sdk/include/ndk/iotypes.h
index ed4a9facc2..b693b617e0 100644
--- a/sdk/include/ndk/iotypes.h
+++ b/sdk/include/ndk/iotypes.h
@@ -937,261 +937,7 @@ typedef struct _EXTENDED_DRIVER_EXTENSION
PFS_FILTER_CALLBACKS FsFilterCallbacks;
} EXTENDED_DRIVER_EXTENSION, *PEXTENDED_DRIVER_EXTENSION;
-//
-// Extended I/O Stack Location Structure
-//
-typedef struct _EXTENDED_IO_STACK_LOCATION
-{
- UCHAR MajorFunction;
- UCHAR MinorFunction;
- UCHAR Flags;
- UCHAR Control;
- union
- {
- struct
- {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT POINTER_ALIGNMENT FileAttributes;
- USHORT ShareAccess;
- ULONG POINTER_ALIGNMENT EaLength;
- } Create;
- struct
- {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT POINTER_ALIGNMENT Reserved;
- USHORT ShareAccess;
- struct _NAMED_PIPE_CREATE_PARAMETERS *Parameters;
- } CreatePipe;
- struct
- {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT POINTER_ALIGNMENT Reserved;
- USHORT ShareAccess;
- struct _MAILSLOT_CREATE_PARAMETERS *Parameters;
- } CreateMailslot;
- struct
- {
- ULONG Length;
- ULONG POINTER_ALIGNMENT Key;
- LARGE_INTEGER ByteOffset;
- } Read;
- struct
- {
- ULONG Length;
- ULONG POINTER_ALIGNMENT Key;
- LARGE_INTEGER ByteOffset;
- } Write;
- struct
- {
- ULONG Length;
- PUNICODE_STRING FileName;
- FILE_INFORMATION_CLASS FileInformationClass;
- ULONG POINTER_ALIGNMENT FileIndex;
- } QueryDirectory;
- struct
- {
- ULONG Length;
- ULONG POINTER_ALIGNMENT CompletionFilter;
- } NotifyDirectory;
- struct
- {
- ULONG Length;
- ULONG POINTER_ALIGNMENT CompletionFilter;
- enum _DIRECTORY_NOTIFY_INFORMATION_CLASS POINTER_ALIGNMENT
DirectoryNotifyInformationClass;
- } NotifyDirectoryEx;
- struct
- {
- ULONG Length;
- FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
- } QueryFile;
- struct
- {
- ULONG Length;
- FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
- PFILE_OBJECT FileObject;
- union
- {
- struct
- {
- BOOLEAN ReplaceIfExists;
- BOOLEAN AdvanceOnly;
- };
- ULONG ClusterCount;
- HANDLE DeleteHandle;
- };
- } SetFile;
- struct
- {
- ULONG Length;
- PVOID EaList;
- ULONG EaListLength;
- ULONG POINTER_ALIGNMENT EaIndex;
- } QueryEa;
- struct
- {
- ULONG Length;
- } SetEa;
- struct
- {
- ULONG Length;
- FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
- } QueryVolume;
- struct
- {
- ULONG Length;
- FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
- } SetVolume;
- struct
- {
- ULONG OutputBufferLength;
- ULONG POINTER_ALIGNMENT InputBufferLength;
- ULONG POINTER_ALIGNMENT FsControlCode;
- PVOID Type3InputBuffer;
- } FileSystemControl;
- struct
- {
- PLARGE_INTEGER Length;
- ULONG POINTER_ALIGNMENT Key;
- LARGE_INTEGER ByteOffset;
- } LockControl;
- struct
- {
- ULONG OutputBufferLength;
- ULONG POINTER_ALIGNMENT InputBufferLength;
- ULONG POINTER_ALIGNMENT IoControlCode;
- PVOID Type3InputBuffer;
- } DeviceIoControl;
- struct
- {
- SECURITY_INFORMATION SecurityInformation;
- ULONG POINTER_ALIGNMENT Length;
- } QuerySecurity;
- struct
- {
- SECURITY_INFORMATION SecurityInformation;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- } SetSecurity;
- struct
- {
- PVPB Vpb;
- PDEVICE_OBJECT DeviceObject;
- } MountVolume;
- struct
- {
- PVPB Vpb;
- PDEVICE_OBJECT DeviceObject;
- } VerifyVolume;
- struct
- {
- struct _SCSI_REQUEST_BLOCK *Srb;
- } Scsi;
- struct
- {
- ULONG Length;
- PSID StartSid;
- struct _FILE_GET_QUOTA_INFORMATION *SidList;
- ULONG SidListLength;
- } QueryQuota;
- struct
- {
- ULONG Length;
- } SetQuota;
- struct
- {
- DEVICE_RELATION_TYPE Type;
- } QueryDeviceRelations;
- struct
- {
- CONST GUID *InterfaceType;
- USHORT Size;
- USHORT Version;
- PINTERFACE Interface;
- PVOID InterfaceSpecificData;
- } QueryInterface;
- struct
- {
- PDEVICE_CAPABILITIES Capabilities;
- } DeviceCapabilities;
- struct
- {
- PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
- } FilterResourceRequirements;
- struct
- {
- ULONG WhichSpace;
- PVOID Buffer;
- ULONG Offset;
- ULONG POINTER_ALIGNMENT Length;
- } ReadWriteConfig;
- struct
- {
- BOOLEAN Lock;
- } SetLock;
- struct
- {
- BUS_QUERY_ID_TYPE IdType;
- } QueryId;
- struct
- {
- DEVICE_TEXT_TYPE DeviceTextType;
- LCID POINTER_ALIGNMENT LocaleId;
- } QueryDeviceText;
- struct
- {
- BOOLEAN InPath;
- BOOLEAN Reserved[3];
- DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type;
- } UsageNotification;
- struct
- {
- SYSTEM_POWER_STATE PowerState;
- } WaitWake;
- struct
- {
- PPOWER_SEQUENCE PowerSequence;
- } PowerSequence;
- struct
- {
- union
- {
- ULONG SystemContext;
-#if (NTDDI_VERSION >= NTDDI_VISTA)
- SYSTEM_POWER_STATE_CONTEXT SystemPowerStateContext;
-#endif // (NTDDI_VERSION >= NTDDI_VISTA)
- };
- POWER_STATE_TYPE POINTER_ALIGNMENT Type;
- POWER_STATE POINTER_ALIGNMENT State;
- POWER_ACTION POINTER_ALIGNMENT ShutdownType;
- } Power;
- struct
- {
- PCM_RESOURCE_LIST AllocatedResources;
- PCM_RESOURCE_LIST AllocatedResourcesTranslated;
- } StartDevice;
- struct
- {
- ULONG_PTR ProviderId;
- PVOID DataPath;
- ULONG BufferSize;
- PVOID Buffer;
- } WMI;
- struct
- {
- PVOID Argument1;
- PVOID Argument2;
- PVOID Argument3;
- PVOID Argument4;
- } Others;
- } Parameters;
- PDEVICE_OBJECT DeviceObject;
- PFILE_OBJECT FileObject;
- PIO_COMPLETION_ROUTINE CompletionRoutine;
- PVOID Context;
-} EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
-#endif
+#endif // !NTOS_MODE_USER
//
// Firmware Boot File Path