mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
Merge EXTENDED_IO_STACK_LOCATION into IO_STACK_LOCATION and fix the resulting errors.
svn path=/trunk/; revision=12301
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dirctl.c,v 1.17 2004/11/06 13:41:58 ekohl Exp $
|
||||
/* $Id: dirctl.c,v 1.18 2004/12/23 12:36:27 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -570,14 +570,14 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||
PCCB Ccb;
|
||||
FCB TempFcb;
|
||||
BOOLEAN First = FALSE;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
DPRINT("CdfsQueryDirectory() called\n");
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = Stack->FileObject;
|
||||
|
||||
Ccb = (PCCB)FileObject->FsContext2;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: fsctrl.c,v 1.4 2003/08/07 11:47:32 silverblade Exp $
|
||||
/* $Id: fsctrl.c,v 1.5 2004/12/23 12:37:04 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -22,7 +22,7 @@ NTSTATUS STDCALL
|
||||
MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
PFILE_OBJECT FileObject;
|
||||
PMSFS_MAILSLOT Mailslot;
|
||||
PMSFS_FCB Fcb;
|
||||
@@ -30,7 +30,7 @@ MsfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
|
||||
DPRINT1("MsfsFileSystemControl(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
|
||||
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = IoStack->FileObject;
|
||||
Fcb = FileObject->FsContext;
|
||||
Mailslot = Fcb->Mailslot;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: fsctrl.c,v 1.16 2004/10/11 12:37:04 ekohl Exp $
|
||||
/* $Id: fsctrl.c,v 1.17 2004/12/23 12:38:16 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -110,7 +110,7 @@ NpfsDisconnectPipe(PNPFS_FCB Fcb)
|
||||
DPRINT("NpfsDisconnectPipe()\n");
|
||||
|
||||
if (Fcb->PipeState == FILE_PIPE_DISCONNECTED_STATE)
|
||||
return(STATUS_SUCCESS);
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ NpfsDisconnectPipe(PNPFS_FCB Fcb)
|
||||
Fcb->OtherSide = NULL;
|
||||
|
||||
DPRINT("Pipe disconnected\n");
|
||||
return(STATUS_SUCCESS);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (Fcb->PipeState == FILE_PIPE_CLOSING_STATE)
|
||||
@@ -135,10 +135,10 @@ NpfsDisconnectPipe(PNPFS_FCB Fcb)
|
||||
/* FIXME: remove data queue(s) */
|
||||
|
||||
DPRINT("Pipe disconnected\n");
|
||||
return(STATUS_SUCCESS);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,10 +191,6 @@ NpfsWaitPipe(PIRP Irp,
|
||||
}
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
NpfsGetState(
|
||||
PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp)
|
||||
/*
|
||||
* FUNCTION: Return current state of a pipe
|
||||
* ARGUMENTS:
|
||||
@@ -203,6 +199,9 @@ NpfsGetState(
|
||||
* RETURNS:
|
||||
* Status of operation
|
||||
*/
|
||||
static NTSTATUS
|
||||
NpfsGetState(PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
PNPFS_GET_STATE Reply;
|
||||
@@ -214,10 +213,10 @@ NpfsGetState(
|
||||
|
||||
/* Validate parameters */
|
||||
if (OutputBufferLength >= sizeof(NPFS_GET_STATE))
|
||||
{
|
||||
Fcb = IrpSp->FileObject->FsContext;
|
||||
Reply = (PNPFS_GET_STATE)Irp->AssociatedIrp.SystemBuffer;
|
||||
Pipe = Fcb->Pipe;
|
||||
{
|
||||
Fcb = IrpSp->FileObject->FsContext;
|
||||
Reply = (PNPFS_GET_STATE)Irp->AssociatedIrp.SystemBuffer;
|
||||
Pipe = Fcb->Pipe;
|
||||
|
||||
if (Pipe->PipeWriteMode == FILE_PIPE_MESSAGE_MODE)
|
||||
{
|
||||
@@ -265,10 +264,6 @@ NpfsGetState(
|
||||
}
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
NpfsSetState(
|
||||
PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp)
|
||||
/*
|
||||
* FUNCTION: Set state of a pipe
|
||||
* ARGUMENTS:
|
||||
@@ -277,6 +272,9 @@ NpfsSetState(
|
||||
* RETURNS:
|
||||
* Status of operation
|
||||
*/
|
||||
static NTSTATUS
|
||||
NpfsSetState(PIRP Irp,
|
||||
PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
ULONG InputBufferLength;
|
||||
PNPFS_SET_STATE Request;
|
||||
@@ -339,9 +337,6 @@ NpfsSetState(
|
||||
}
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
NpfsPeekPipe(PIRP Irp,
|
||||
PIO_STACK_LOCATION IoStack)
|
||||
/*
|
||||
* FUNCTION: Peek at a pipe (get information about messages)
|
||||
* ARGUMENTS:
|
||||
@@ -350,6 +345,9 @@ NpfsPeekPipe(PIRP Irp,
|
||||
* RETURNS:
|
||||
* Status of operation
|
||||
*/
|
||||
static NTSTATUS
|
||||
NpfsPeekPipe(PIRP Irp,
|
||||
PIO_STACK_LOCATION IoStack)
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
PNPFS_PIPE Pipe;
|
||||
@@ -365,7 +363,7 @@ NpfsPeekPipe(PIRP Irp,
|
||||
if (OutputBufferLength < sizeof(FILE_PIPE_PEEK_BUFFER))
|
||||
{
|
||||
DPRINT("Buffer too small\n");
|
||||
return(STATUS_INVALID_PARAMETER);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Fcb = IoStack->FileObject->FsContext;
|
||||
@@ -374,7 +372,7 @@ NpfsPeekPipe(PIRP Irp,
|
||||
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
@@ -383,7 +381,7 @@ NTSTATUS STDCALL
|
||||
NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status;
|
||||
PNPFS_DEVICE_EXTENSION DeviceExt;
|
||||
@@ -393,7 +391,7 @@ NpfsFileSystemControl(PDEVICE_OBJECT DeviceObject,
|
||||
DPRINT("NpfsFileSystemContol(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
|
||||
|
||||
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
DPRINT("IoStack: %p\n", IoStack);
|
||||
FileObject = IoStack->FileObject;
|
||||
DPRINT("FileObject: %p\n", FileObject);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dirctl.c,v 1.8 2004/06/05 08:28:37 navaraf Exp $
|
||||
/* $Id: dirctl.c,v 1.9 2004/12/23 12:38:41 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -494,14 +494,14 @@ NtfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||
PCCB Ccb;
|
||||
// FCB TempFcb;
|
||||
BOOLEAN First = FALSE;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
DPRINT1("NtfsQueryDirectory() called\n");
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
FileObject = Stack->FileObject;
|
||||
|
||||
Ccb = (PCCB)FileObject->FsContext2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: dir.c,v 1.36 2004/12/05 16:31:50 gvg Exp $
|
||||
* $Id: dir.c,v 1.37 2004/12/23 12:39:16 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -313,8 +313,8 @@ NTSTATUS DoQuery (PVFAT_IRP_CONTEXT IrpContext)
|
||||
VFAT_DIRENTRY_CONTEXT DirContext;
|
||||
WCHAR LongNameBuffer[MAX_PATH];
|
||||
WCHAR ShortNameBuffer[13];
|
||||
|
||||
PEXTENDED_IO_STACK_LOCATION Stack = (PEXTENDED_IO_STACK_LOCATION) IrpContext->Stack;
|
||||
|
||||
PIO_STACK_LOCATION Stack = IrpContext->Stack;
|
||||
|
||||
pCcb = (PVFATCCB) IrpContext->FileObject->FsContext2;
|
||||
pFcb = (PVFATFCB) IrpContext->FileObject->FsContext;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: volume.c,v 1.28 2004/12/05 16:31:51 gvg Exp $
|
||||
/* $Id: volume.c,v 1.29 2004/12/23 12:39:16 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -382,7 +382,7 @@ NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PVOID SystemBuffer;
|
||||
ULONG BufferLength;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack = (PEXTENDED_IO_STACK_LOCATION) IrpContext->Stack;
|
||||
PIO_STACK_LOCATION Stack = IrpContext->Stack;
|
||||
|
||||
/* PRECONDITION */
|
||||
ASSERT(IrpContext);
|
||||
|
||||
+176
-311
@@ -1,4 +1,4 @@
|
||||
/* $Id: iotypes.h,v 1.71 2004/12/22 05:06:59 royce Exp $
|
||||
/* $Id: iotypes.h,v 1.72 2004/12/23 12:28:31 ekohl Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -287,15 +287,13 @@ typedef struct
|
||||
/*
|
||||
* PURPOSE: IRP stack location
|
||||
*/
|
||||
|
||||
/*
|
||||
typedef struct _IO_STACK_LOCATION
|
||||
{
|
||||
UCHAR MajorFunction;
|
||||
UCHAR MinorFunction;
|
||||
UCHAR Flags;
|
||||
UCHAR Control;
|
||||
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
@@ -306,57 +304,59 @@ typedef struct _IO_STACK_LOCATION
|
||||
USHORT ShareAccess;
|
||||
ULONG EaLength;
|
||||
} Create;
|
||||
|
||||
struct
|
||||
{
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
struct _NAMED_PIPE_CREATE_PARAMETERS *Parameters;
|
||||
} CreatePipe;
|
||||
|
||||
struct
|
||||
{
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
struct _MAILSLOT_CREATE_PARAMETERS *Parameters;
|
||||
} CreateMailslot;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} Read;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} Write;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG IoControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} DeviceIoControl;
|
||||
ULONG Length;
|
||||
PUNICODE_STRING FileName;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
ULONG FileIndex;
|
||||
} QueryDirectory;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG IoControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} FileSystemControl;
|
||||
struct
|
||||
{
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} MountVolume;
|
||||
struct
|
||||
{
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} VerifyVolume;
|
||||
ULONG Length;
|
||||
ULONG CompletionFilter;
|
||||
} NotifyDirectory;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
} QueryFile;
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} QueryVolume;
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} SetVolume;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
@@ -373,21 +373,106 @@ typedef struct _IO_STACK_LOCATION
|
||||
HANDLE DeleteHandle;
|
||||
} u;
|
||||
} SetFile;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
PUNICODE_STRING FileName;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
ULONG FileIndex;
|
||||
} QueryDirectory;
|
||||
PVOID EaList;
|
||||
ULONG EaListLength;
|
||||
ULONG EaIndex;
|
||||
} QueryEa;
|
||||
|
||||
// Parameters for IRP_MN_QUERY_DEVICE_RELATIONS
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
} SetEa;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} QueryVolume;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} SetVolume;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG FsControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} FileSystemControl;
|
||||
|
||||
/* byte range file locking */
|
||||
struct
|
||||
{
|
||||
PLARGE_INTEGER Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} LockControl;
|
||||
|
||||
struct
|
||||
{
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG IoControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} DeviceIoControl;
|
||||
|
||||
struct
|
||||
{
|
||||
SECURITY_INFORMATION SecurityInformation;
|
||||
ULONG POINTER_ALIGNMENT Length;
|
||||
} QuerySecurity;
|
||||
|
||||
struct
|
||||
{
|
||||
SECURITY_INFORMATION SecurityInformation;
|
||||
PSECURITY_DESCRIPTOR SecurityDescriptor;
|
||||
} SetSecurity;
|
||||
|
||||
struct
|
||||
{
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} MountVolume;
|
||||
|
||||
struct
|
||||
{
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} VerifyVolume;
|
||||
|
||||
/* Parameters for IRP_MN_SCSI_CLASS */
|
||||
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;
|
||||
|
||||
/* Parameters for IRP_MN_QUERY_DEVICE_RELATIONS */
|
||||
struct
|
||||
{
|
||||
DEVICE_RELATION_TYPE Type;
|
||||
} QueryDeviceRelations;
|
||||
|
||||
// Parameters for IRP_MN_QUERY_INTERFACE
|
||||
/* Parameters for IRP_MN_QUERY_INTERFACE */
|
||||
struct
|
||||
{
|
||||
CONST GUID *InterfaceType;
|
||||
@@ -397,32 +482,45 @@ typedef struct _IO_STACK_LOCATION
|
||||
PVOID InterfaceSpecificData;
|
||||
} QueryInterface;
|
||||
|
||||
// Parameters for IRP_MN_QUERY_CAPABILITIES
|
||||
/* Parameters for IRP_MN_QUERY_CAPABILITIES */
|
||||
struct
|
||||
{
|
||||
PDEVICE_CAPABILITIES Capabilities;
|
||||
} DeviceCapabilities;
|
||||
|
||||
// Parameters for IRP_MN_FILTER_RESOURCE_REQUIREMENTS
|
||||
/* Parameters for IRP_MN_FILTER_RESOURCE_REQUIREMENTS */
|
||||
struct
|
||||
{
|
||||
PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
|
||||
} FilterResourceRequirements;
|
||||
PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
|
||||
} FilterResourceRequirements;
|
||||
|
||||
// Parameters for IRP_MN_QUERY_ID
|
||||
struct
|
||||
{
|
||||
ULONG WhichSpace;
|
||||
PVOID Buffer;
|
||||
ULONG Offset;
|
||||
ULONG POINTER_ALIGNMENT Length;
|
||||
} ReadWriteConfig;
|
||||
|
||||
struct
|
||||
{
|
||||
BOOLEAN Lock;
|
||||
} SetLock;
|
||||
|
||||
/* Parameters for IRP_MN_QUERY_ID */
|
||||
struct
|
||||
{
|
||||
BUS_QUERY_ID_TYPE IdType;
|
||||
} QueryId;
|
||||
|
||||
// Parameters for IRP_MN_QUERY_DEVICE_TEXT
|
||||
/* Parameters for IRP_MN_QUERY_DEVICE_TEXT */
|
||||
struct
|
||||
{
|
||||
DEVICE_TEXT_TYPE DeviceTextType;
|
||||
LCID LocaleId;
|
||||
} QueryDeviceText;
|
||||
|
||||
// Parameters for IRP_MN_DEVICE_USAGE_NOTIFICATION
|
||||
/* Parameters for IRP_MN_DEVICE_USAGE_NOTIFICATION */
|
||||
struct
|
||||
{
|
||||
BOOLEAN InPath;
|
||||
@@ -430,19 +528,19 @@ typedef struct _IO_STACK_LOCATION
|
||||
DEVICE_USAGE_NOTIFICATION_TYPE Type;
|
||||
} UsageNotification;
|
||||
|
||||
// Parameters for IRP_MN_WAIT_WAKE
|
||||
/* Parameters for IRP_MN_WAIT_WAKE */
|
||||
struct
|
||||
{
|
||||
SYSTEM_POWER_STATE PowerState;
|
||||
} WaitWake;
|
||||
|
||||
// Parameter for IRP_MN_POWER_SEQUENCE
|
||||
/* Parameter for IRP_MN_POWER_SEQUENCE */
|
||||
struct
|
||||
{
|
||||
PPOWER_SEQUENCE PowerSequence;
|
||||
} PowerSequence;
|
||||
|
||||
// Parameters for IRP_MN_SET_POWER and IRP_MN_QUERY_POWER
|
||||
/* Parameters for IRP_MN_SET_POWER and IRP_MN_QUERY_POWER */
|
||||
struct
|
||||
{
|
||||
ULONG SystemContext;
|
||||
@@ -451,29 +549,23 @@ typedef struct _IO_STACK_LOCATION
|
||||
POWER_ACTION ShutdownType;
|
||||
} Power;
|
||||
|
||||
// Parameters for IRP_MN_START_DEVICE
|
||||
/* Parameters for IRP_MN_START_DEVICE */
|
||||
struct
|
||||
{
|
||||
PCM_RESOURCE_LIST AllocatedResources;
|
||||
PCM_RESOURCE_LIST AllocatedResourcesTranslated;
|
||||
} StartDevice;
|
||||
*/
|
||||
/* Parameters for IRP_MN_SCSI_CLASS */
|
||||
/* struct
|
||||
{
|
||||
struct _SCSI_REQUEST_BLOCK *Srb;
|
||||
} Scsi;
|
||||
|
||||
//byte range file locking
|
||||
struct
|
||||
struct
|
||||
{
|
||||
PLARGE_INTEGER Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} LockControl;
|
||||
*/
|
||||
ULONG_PTR ProviderId;
|
||||
PVOID DataPath;
|
||||
ULONG BufferSize;
|
||||
PVOID Buffer;
|
||||
} WMI;
|
||||
|
||||
/* Paramters for other calls */
|
||||
/* struct
|
||||
struct
|
||||
{
|
||||
PVOID Argument1;
|
||||
PVOID Argument2;
|
||||
@@ -481,245 +573,15 @@ typedef struct _IO_STACK_LOCATION
|
||||
PVOID Argument4;
|
||||
} Others;
|
||||
} Parameters;
|
||||
|
||||
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
struct _FILE_OBJECT* FileObject;
|
||||
|
||||
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
||||
PVOID CompletionContext;
|
||||
PVOID Context;
|
||||
|
||||
} IO_STACK_LOCATION, *PIO_STACK_LOCATION;*/
|
||||
|
||||
typedef struct _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 {
|
||||
ULONG Length;
|
||||
ULONG POINTER_ALIGNMENT Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} Read;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG POINTER_ALIGNMENT Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} Write;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
|
||||
} QueryFile;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
|
||||
struct _FILE_OBJECT* FileObject;
|
||||
union {
|
||||
struct {
|
||||
BOOLEAN ReplaceIfExists;
|
||||
BOOLEAN AdvanceOnly;
|
||||
};
|
||||
ULONG ClusterCount;
|
||||
HANDLE DeleteHandle;
|
||||
};
|
||||
} SetFile;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
|
||||
} QueryVolume;
|
||||
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 {
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} MountVolume;
|
||||
struct {
|
||||
struct _VPB* Vpb;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
} VerifyVolume;
|
||||
struct {
|
||||
struct _SCSI_REQUEST_BLOCK *Srb;
|
||||
} Scsi;
|
||||
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 {
|
||||
ULONG SystemContext;
|
||||
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;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
struct _FILE_OBJECT* FileObject;
|
||||
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
||||
PVOID Context;
|
||||
} IO_STACK_LOCATION, *PIO_STACK_LOCATION;
|
||||
|
||||
// AG: The commented lines in this structure are due to PMAILSLOT_CREATE_PARAMETERS
|
||||
// and PNAMED_PIPE_CREATE_PARAMETERS and PFILE_GET_QUOTA_INFORMATION not being
|
||||
// defined.
|
||||
|
||||
typedef struct _EXTENDED_IO_STACK_LOCATION {
|
||||
|
||||
/* Included for padding */
|
||||
UCHAR MajorFunction;
|
||||
UCHAR MinorFunction;
|
||||
UCHAR Flags;
|
||||
UCHAR Control;
|
||||
|
||||
union {
|
||||
|
||||
// struct {
|
||||
// PIO_SECURITY_CONTEXT SecurityContext;
|
||||
// ULONG Options;
|
||||
// USHORT Reserved;
|
||||
// USHORT ShareAccess;
|
||||
// PMAILSLOT_CREATE_PARAMETERS Parameters;
|
||||
// } CreateMailslot;
|
||||
|
||||
// struct {
|
||||
// PIO_SECURITY_CONTEXT SecurityContext;
|
||||
// ULONG Options;
|
||||
// USHORT Reserved;
|
||||
// USHORT ShareAccess;
|
||||
// PNAMED_PIPE_CREATE_PARAMETERS Parameters;
|
||||
// } CreatePipe;
|
||||
|
||||
struct {
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG FsControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} FileSystemControl;
|
||||
|
||||
struct {
|
||||
PLARGE_INTEGER Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} LockControl;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG CompletionFilter;
|
||||
} NotifyDirectory;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
PUNICODE_STRING FileName;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
ULONG FileIndex;
|
||||
} QueryDirectory;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
PVOID EaList;
|
||||
ULONG EaListLength;
|
||||
ULONG EaIndex;
|
||||
} QueryEa;
|
||||
|
||||
// struct {
|
||||
// ULONG Length;
|
||||
// PSID StartSid;
|
||||
// PFILE_GET_QUOTA_INFORMATION SidList;
|
||||
// ULONG SidListLength;
|
||||
// } QueryQuota;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetEa;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetQuota;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} SetVolume;
|
||||
|
||||
} Parameters;
|
||||
struct _DEVICE_OBJECT* DeviceObject;
|
||||
struct _FILE_OBJECT* FileObject;
|
||||
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
||||
PVOID Context;
|
||||
|
||||
} EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
|
||||
|
||||
typedef struct _IO_STATUS_BLOCK
|
||||
{
|
||||
@@ -1242,24 +1104,27 @@ typedef VOID STDCALL_FUNC
|
||||
#endif // (_WIN32_WINNT >= 0x0400)
|
||||
|
||||
|
||||
typedef struct _NAMED_PIPE_CREATE_PARAMETERS {
|
||||
ULONG NamedPipeType;
|
||||
ULONG ReadMode;
|
||||
ULONG CompletionMode;
|
||||
ULONG MaximumInstances;
|
||||
ULONG InboundQuota;
|
||||
ULONG OutboundQuota;
|
||||
LARGE_INTEGER DefaultTimeout;
|
||||
BOOLEAN TimeoutSpecified;
|
||||
typedef struct _NAMED_PIPE_CREATE_PARAMETERS
|
||||
{
|
||||
ULONG NamedPipeType;
|
||||
ULONG ReadMode;
|
||||
ULONG CompletionMode;
|
||||
ULONG MaximumInstances;
|
||||
ULONG InboundQuota;
|
||||
ULONG OutboundQuota;
|
||||
LARGE_INTEGER DefaultTimeout;
|
||||
BOOLEAN TimeoutSpecified;
|
||||
} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
|
||||
|
||||
typedef struct _MAILSLOT_CREATE_PARAMETERS {
|
||||
ULONG MailslotQuota;
|
||||
ULONG MaximumMessageSize;
|
||||
LARGE_INTEGER ReadTimeout;
|
||||
BOOLEAN TimeoutSpecified;
|
||||
typedef struct _MAILSLOT_CREATE_PARAMETERS
|
||||
{
|
||||
ULONG MailslotQuota;
|
||||
ULONG MaximumMessageSize;
|
||||
LARGE_INTEGER ReadTimeout;
|
||||
BOOLEAN TimeoutSpecified;
|
||||
} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
|
||||
|
||||
|
||||
/* error logging */
|
||||
|
||||
typedef struct _IO_ERROR_LOG_PACKET
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: filelock.c,v 1.15 2004/10/22 20:19:58 ekohl Exp $
|
||||
/* $Id: filelock.c,v 1.16 2004/12/23 12:30:48 ekohl Exp $
|
||||
*
|
||||
* reactos/ntoskrnl/fs/filelock.c
|
||||
*
|
||||
@@ -538,14 +538,14 @@ FsRtlpCompletePendingLocks(
|
||||
//walk pending list, FIFO order, try 2 complete locks
|
||||
PLIST_ENTRY EnumEntry;
|
||||
PIRP Irp;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
||||
EnumEntry = LockToc->PendingListHead.Blink;
|
||||
while (EnumEntry != &LockToc->PendingListHead)
|
||||
{
|
||||
Irp = CONTAINING_RECORD(EnumEntry,IRP, Tail.Overlay.ListEntry);
|
||||
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
if (FsRtlpAddLock(LockToc,
|
||||
Stack->FileObject,
|
||||
&Stack->Parameters.LockControl.ByteOffset,
|
||||
@@ -732,7 +732,7 @@ FsRtlpDumpFileLocks(
|
||||
PFILE_LOCK_GRANTED Granted;
|
||||
PIRP Irp;
|
||||
PLIST_ENTRY EnumEntry;
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
||||
ASSERT(FileLock);
|
||||
LockToc = FileLock->LockInformation;
|
||||
@@ -772,7 +772,7 @@ FsRtlpDumpFileLocks(
|
||||
{
|
||||
Irp = CONTAINING_RECORD(EnumEntry, IRP , Tail.Overlay.ListEntry );
|
||||
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("%s, start: %i, len: %i, end: %i, key: %i, proc: 0x%X, fob: 0x%X\n",
|
||||
(Stack->Flags & SL_EXCLUSIVE_LOCK) ? "EXCL" : "SHRD",
|
||||
@@ -1081,12 +1081,12 @@ FsRtlProcessFileLock (
|
||||
IN PVOID Context OPTIONAL
|
||||
)
|
||||
{
|
||||
PEXTENDED_IO_STACK_LOCATION Stack;
|
||||
PIO_STACK_LOCATION Stack;
|
||||
NTSTATUS Status;
|
||||
IO_STATUS_BLOCK LocalIoStatus;
|
||||
|
||||
ASSERT(FileLock);
|
||||
Stack = (PEXTENDED_IO_STACK_LOCATION) IoGetCurrentIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
||||
switch(Stack->MinorFunction)
|
||||
|
||||
@@ -26,9 +26,9 @@ VOID IoDeviceControlCompletion(PDEVICE_OBJECT DeviceObject,
|
||||
if (IoStack->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
|
||||
{
|
||||
IoControlCode =
|
||||
((PEXTENDED_IO_STACK_LOCATION)IoStack)->Parameters.FileSystemControl.FsControlCode;
|
||||
IoStack->Parameters.FileSystemControl.FsControlCode;
|
||||
OutputBufferLength =
|
||||
((PEXTENDED_IO_STACK_LOCATION)IoStack)->Parameters.FileSystemControl.OutputBufferLength;
|
||||
IoStack->Parameters.FileSystemControl.OutputBufferLength;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: dir.c,v 1.25 2004/08/24 17:08:18 navaraf Exp $
|
||||
/* $Id: dir.c,v 1.26 2004/12/23 12:34:59 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -40,7 +40,7 @@ NtNotifyChangeDirectoryFile (
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
|
||||
DPRINT("NtNotifyChangeDirectoryFile()\n");
|
||||
@@ -83,7 +83,7 @@ NtNotifyChangeDirectoryFile (
|
||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
IoStack = IoGetNextIrpStackLocation(Irp);
|
||||
|
||||
IoStack->MajorFunction = IRP_MJ_DIRECTORY_CONTROL;
|
||||
IoStack->MinorFunction = IRP_MN_NOTIFY_CHANGE_DIRECTORY;
|
||||
@@ -104,7 +104,7 @@ NtNotifyChangeDirectoryFile (
|
||||
|
||||
/* FIXME: Should we wait here or not for synchronously opened files? */
|
||||
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ NtQueryDirectoryFile(
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PFILE_OBJECT FileObject;
|
||||
NTSTATUS Status;
|
||||
PEXTENDED_IO_STACK_LOCATION IoStack;
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
|
||||
DPRINT("NtQueryDirectoryFile()\n");
|
||||
@@ -195,7 +195,7 @@ NtQueryDirectoryFile(
|
||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||
|
||||
IoStack = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
IoStack = IoGetNextIrpStackLocation(Irp);
|
||||
|
||||
IoStack->MajorFunction = IRP_MJ_DIRECTORY_CONTROL;
|
||||
IoStack->MinorFunction = IRP_MN_QUERY_DIRECTORY;
|
||||
|
||||
@@ -83,7 +83,7 @@ NtFsControlFile (
|
||||
PFILE_OBJECT FileObject;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PIRP Irp;
|
||||
PEXTENDED_IO_STACK_LOCATION StackPtr;
|
||||
PIO_STACK_LOCATION StackPtr;
|
||||
PKEVENT ptrEvent;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
|
||||
@@ -148,7 +148,7 @@ NtFsControlFile (
|
||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||
|
||||
StackPtr = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr->FileObject = FileObject;
|
||||
StackPtr->DeviceObject = DeviceObject;
|
||||
StackPtr->Parameters.FileSystemControl.InputBufferLength = InputBufferSize;
|
||||
|
||||
@@ -53,7 +53,7 @@ NtLockFile (
|
||||
PLARGE_INTEGER LocalLength = NULL;
|
||||
PKEVENT Event = NULL;
|
||||
PIRP Irp = NULL;
|
||||
PEXTENDED_IO_STACK_LOCATION StackPtr;
|
||||
PIO_STACK_LOCATION StackPtr;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
NTSTATUS Status;
|
||||
@@ -118,7 +118,7 @@ NtLockFile (
|
||||
Irp->UserIosb = IoStatusBlock;
|
||||
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
|
||||
|
||||
StackPtr = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr->MajorFunction = IRP_MJ_LOCK_CONTROL;
|
||||
StackPtr->MinorFunction = IRP_MN_LOCK;
|
||||
StackPtr->FileObject = FileObject;
|
||||
@@ -209,7 +209,7 @@ NtUnlockFile (
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
PLARGE_INTEGER LocalLength = NULL;
|
||||
PIRP Irp = NULL;
|
||||
PEXTENDED_IO_STACK_LOCATION StackPtr;
|
||||
PIO_STACK_LOCATION StackPtr;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
NTSTATUS Status;
|
||||
@@ -254,7 +254,7 @@ NtUnlockFile (
|
||||
Irp->UserIosb = IoStatusBlock;
|
||||
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
|
||||
|
||||
StackPtr = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr->MajorFunction = IRP_MJ_LOCK_CONTROL;
|
||||
StackPtr->MinorFunction = IRP_MN_UNLOCK_SINGLE;
|
||||
StackPtr->DeviceObject = DeviceObject;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: vpb.c,v 1.26 2004/10/22 20:25:54 ekohl Exp $
|
||||
/* $Id: vpb.c,v 1.27 2004/12/23 12:34:59 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -281,7 +281,7 @@ NtSetVolumeInformationFile(IN HANDLE FileHandle,
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PIRP Irp;
|
||||
NTSTATUS Status;
|
||||
PEXTENDED_IO_STACK_LOCATION StackPtr;
|
||||
PIO_STACK_LOCATION StackPtr;
|
||||
PVOID SystemBuffer;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
|
||||
@@ -333,7 +333,7 @@ NtSetVolumeInformationFile(IN HANDLE FileHandle,
|
||||
Irp->UserIosb = IoStatusBlock;
|
||||
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
|
||||
|
||||
StackPtr = (PEXTENDED_IO_STACK_LOCATION) IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr->MajorFunction = IRP_MJ_SET_VOLUME_INFORMATION;
|
||||
StackPtr->MinorFunction = 0;
|
||||
StackPtr->Flags = 0;
|
||||
|
||||
@@ -750,102 +750,6 @@ typedef struct _EPROCESS_QUOTA_BLOCK {
|
||||
ULONG ProcessCount;
|
||||
} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
|
||||
|
||||
/*
|
||||
* When needing these parameters cast your PIO_STACK_LOCATION to
|
||||
* PEXTENDED_IO_STACK_LOCATION
|
||||
*/
|
||||
#if !defined(_ALPHA_)
|
||||
#include <pshpack4.h>
|
||||
#endif
|
||||
typedef struct _EXTENDED_IO_STACK_LOCATION {
|
||||
|
||||
/* Included for padding */
|
||||
UCHAR MajorFunction;
|
||||
UCHAR MinorFunction;
|
||||
UCHAR Flags;
|
||||
UCHAR Control;
|
||||
|
||||
union {
|
||||
|
||||
struct {
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
PMAILSLOT_CREATE_PARAMETERS Parameters;
|
||||
} CreateMailslot;
|
||||
|
||||
struct {
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
PNAMED_PIPE_CREATE_PARAMETERS Parameters;
|
||||
} CreatePipe;
|
||||
|
||||
struct {
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG FsControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} FileSystemControl;
|
||||
|
||||
struct {
|
||||
PLARGE_INTEGER Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} LockControl;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG CompletionFilter;
|
||||
} NotifyDirectory;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
PUNICODE_STRING FileName;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
ULONG FileIndex;
|
||||
} QueryDirectory;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
PVOID EaList;
|
||||
ULONG EaListLength;
|
||||
ULONG EaIndex;
|
||||
} QueryEa;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
PSID StartSid;
|
||||
PFILE_GET_QUOTA_INFORMATION SidList;
|
||||
ULONG SidListLength;
|
||||
} QueryQuota;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetEa;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetQuota;
|
||||
|
||||
struct {
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} SetVolume;
|
||||
|
||||
} Parameters;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PFILE_OBJECT FileObject;
|
||||
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
||||
PVOID Context;
|
||||
|
||||
} EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
|
||||
#if !defined(_ALPHA_)
|
||||
#include <poppack.h>
|
||||
#endif
|
||||
|
||||
typedef struct _FILE_ACCESS_INFORMATION {
|
||||
ACCESS_MASK AccessFlags;
|
||||
} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
|
||||
@@ -907,35 +811,35 @@ typedef struct _FILE_DIRECTORY_INFORMATION {
|
||||
} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
|
||||
|
||||
typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
|
||||
ULONG NextEntryOffset;
|
||||
ULONG FileIndex;
|
||||
LARGE_INTEGER CreationTime;
|
||||
LARGE_INTEGER LastAccessTime;
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
LARGE_INTEGER ChangeTime;
|
||||
LARGE_INTEGER EndOfFile;
|
||||
LARGE_INTEGER AllocationSize;
|
||||
ULONG FileAttributes;
|
||||
ULONG FileNameLength;
|
||||
ULONG EaSize;
|
||||
WCHAR FileName[0];
|
||||
ULONG NextEntryOffset;
|
||||
ULONG FileIndex;
|
||||
LARGE_INTEGER CreationTime;
|
||||
LARGE_INTEGER LastAccessTime;
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
LARGE_INTEGER ChangeTime;
|
||||
LARGE_INTEGER EndOfFile;
|
||||
LARGE_INTEGER AllocationSize;
|
||||
ULONG FileAttributes;
|
||||
ULONG FileNameLength;
|
||||
ULONG EaSize;
|
||||
WCHAR FileName[0];
|
||||
} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION;
|
||||
|
||||
typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
|
||||
ULONG NextEntryOffset;
|
||||
ULONG FileIndex;
|
||||
LARGE_INTEGER CreationTime;
|
||||
LARGE_INTEGER LastAccessTime;
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
LARGE_INTEGER ChangeTime;
|
||||
LARGE_INTEGER EndOfFile;
|
||||
LARGE_INTEGER AllocationSize;
|
||||
ULONG FileAttributes;
|
||||
ULONG FileNameLength;
|
||||
ULONG EaSize;
|
||||
CHAR ShortNameLength;
|
||||
WCHAR ShortName[12];
|
||||
WCHAR FileName[0];
|
||||
ULONG NextEntryOffset;
|
||||
ULONG FileIndex;
|
||||
LARGE_INTEGER CreationTime;
|
||||
LARGE_INTEGER LastAccessTime;
|
||||
LARGE_INTEGER LastWriteTime;
|
||||
LARGE_INTEGER ChangeTime;
|
||||
LARGE_INTEGER EndOfFile;
|
||||
LARGE_INTEGER AllocationSize;
|
||||
ULONG FileAttributes;
|
||||
ULONG FileNameLength;
|
||||
ULONG EaSize;
|
||||
CHAR ShortNameLength;
|
||||
WCHAR ShortName[12];
|
||||
WCHAR FileName[0];
|
||||
} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION;
|
||||
|
||||
typedef struct _FILE_EA_INFORMATION {
|
||||
|
||||
@@ -155,9 +155,12 @@ typedef struct _HAL_DISPATCH_TABLE *PHAL_DISPATCH_TABLE;
|
||||
typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION *PDRIVE_LAYOUT_INFORMATION;
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION_EX *PDRIVE_LAYOUT_INFORMATION_EX;
|
||||
typedef struct _NAMED_PIPE_CREATE_PARAMETERS *PNAMED_PIPE_CREATE_PARAMETERS;
|
||||
typedef struct _MAILSLOT_CREATE_PARAMETERS *PMAILSLOT_CREATE_PARAMETERS;
|
||||
typedef struct _FILE_GET_QUOTA_INFORMATION *PFILE_GET_QUOTA_INFORMATION;
|
||||
|
||||
/* Constants */
|
||||
#define MAXIMUM_PROCESSORS 32
|
||||
#define MAXIMUM_PROCESSORS 32
|
||||
|
||||
#define MAXIMUM_WAIT_OBJECTS 64
|
||||
|
||||
@@ -2680,7 +2683,9 @@ typedef struct _IO_CSQ {
|
||||
PVOID ReservePointer;
|
||||
} IO_CSQ, *PIO_CSQ;
|
||||
|
||||
#if !defined(_ALPHA_)
|
||||
#include <pshpack4.h>
|
||||
#endif
|
||||
typedef struct _IO_STACK_LOCATION {
|
||||
UCHAR MajorFunction;
|
||||
UCHAR MinorFunction;
|
||||
@@ -2694,6 +2699,20 @@ typedef struct _IO_STACK_LOCATION {
|
||||
USHORT ShareAccess;
|
||||
ULONG POINTER_ALIGNMENT EaLength;
|
||||
} Create;
|
||||
struct {
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
PNAMED_PIPE_CREATE_PARAMETERS Parameters;
|
||||
} CreatePipe;
|
||||
struct {
|
||||
PIO_SECURITY_CONTEXT SecurityContext;
|
||||
ULONG Options;
|
||||
USHORT Reserved;
|
||||
USHORT ShareAccess;
|
||||
PMAILSLOT_CREATE_PARAMETERS Parameters;
|
||||
} CreateMailslot;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG POINTER_ALIGNMENT Key;
|
||||
@@ -2704,6 +2723,16 @@ typedef struct _IO_STACK_LOCATION {
|
||||
ULONG POINTER_ALIGNMENT Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} Write;
|
||||
struct {
|
||||
ULONG Length;
|
||||
PUNICODE_STRING FileName;
|
||||
FILE_INFORMATION_CLASS FileInformationClass;
|
||||
ULONG FileIndex;
|
||||
} QueryDirectory;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG CompletionFilter;
|
||||
} NotifyDirectory;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
|
||||
@@ -2721,10 +2750,34 @@ typedef struct _IO_STACK_LOCATION {
|
||||
HANDLE DeleteHandle;
|
||||
} DUMMYUNIONNAME;
|
||||
} SetFile;
|
||||
struct {
|
||||
ULONG Length;
|
||||
PVOID EaList;
|
||||
ULONG EaListLength;
|
||||
ULONG EaIndex;
|
||||
} QueryEa;
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetEa;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
|
||||
} QueryVolume;
|
||||
struct {
|
||||
ULONG Length;
|
||||
FS_INFORMATION_CLASS FsInformationClass;
|
||||
} SetVolume;
|
||||
struct {
|
||||
ULONG OutputBufferLength;
|
||||
ULONG InputBufferLength;
|
||||
ULONG FsControlCode;
|
||||
PVOID Type3InputBuffer;
|
||||
} FileSystemControl;
|
||||
struct {
|
||||
PLARGE_INTEGER Length;
|
||||
ULONG Key;
|
||||
LARGE_INTEGER ByteOffset;
|
||||
} LockControl;
|
||||
struct {
|
||||
ULONG OutputBufferLength;
|
||||
ULONG POINTER_ALIGNMENT InputBufferLength;
|
||||
@@ -2750,6 +2803,15 @@ typedef struct _IO_STACK_LOCATION {
|
||||
struct {
|
||||
struct _SCSI_REQUEST_BLOCK *Srb;
|
||||
} Scsi;
|
||||
struct {
|
||||
ULONG Length;
|
||||
PSID StartSid;
|
||||
PFILE_GET_QUOTA_INFORMATION SidList;
|
||||
ULONG SidListLength;
|
||||
} QueryQuota;
|
||||
struct {
|
||||
ULONG Length;
|
||||
} SetQuota;
|
||||
struct {
|
||||
DEVICE_RELATION_TYPE Type;
|
||||
} QueryDeviceRelations;
|
||||
@@ -2821,7 +2883,9 @@ typedef struct _IO_STACK_LOCATION {
|
||||
PIO_COMPLETION_ROUTINE CompletionRoutine;
|
||||
PVOID Context;
|
||||
} IO_STACK_LOCATION, *PIO_STACK_LOCATION;
|
||||
#if !defined(_ALPHA_)
|
||||
#include <poppack.h>
|
||||
#endif
|
||||
|
||||
/* IO_STACK_LOCATION.Control */
|
||||
|
||||
@@ -3047,6 +3111,90 @@ typedef struct _PCI_COMMON_CONFIG {
|
||||
#define PCI_MULTIFUNCTION_DEVICE(PciData) \
|
||||
((((PPCI_COMMON_CONFIG) (PciData))->HeaderType & PCI_MULTIFUNCTION) != 0)
|
||||
|
||||
/* PCI device classes */
|
||||
|
||||
#define PCI_CLASS_PRE_20 0x00
|
||||
#define PCI_CLASS_MASS_STORAGE_CTLR 0x01
|
||||
#define PCI_CLASS_NETWORK_CTLR 0x02
|
||||
#define PCI_CLASS_DISPLAY_CTLR 0x03
|
||||
#define PCI_CLASS_MULTIMEDIA_DEV 0x04
|
||||
#define PCI_CLASS_MEMORY_CTLR 0x05
|
||||
#define PCI_CLASS_BRIDGE_DEV 0x06
|
||||
#define PCI_CLASS_SIMPLE_COMMS_CTLR 0x07
|
||||
#define PCI_CLASS_BASE_SYSTEM_DEV 0x08
|
||||
#define PCI_CLASS_INPUT_DEV 0x09
|
||||
#define PCI_CLASS_DOCKING_STATION 0x0a
|
||||
#define PCI_CLASS_PROCESSOR 0x0b
|
||||
#define PCI_CLASS_SERIAL_BUS_CTLR 0x0c
|
||||
|
||||
/* PCI device subclasses for class 0 */
|
||||
|
||||
#define PCI_SUBCLASS_PRE_20_NON_VGA 0x00
|
||||
#define PCI_SUBCLASS_PRE_20_VGA 0x01
|
||||
|
||||
/* PCI device subclasses for class 1 (mass storage controllers)*/
|
||||
|
||||
#define PCI_SUBCLASS_MSC_SCSI_BUS_CTLR 0x00
|
||||
#define PCI_SUBCLASS_MSC_IDE_CTLR 0x01
|
||||
#define PCI_SUBCLASS_MSC_FLOPPY_CTLR 0x02
|
||||
#define PCI_SUBCLASS_MSC_IPI_CTLR 0x03
|
||||
#define PCI_SUBCLASS_MSC_RAID_CTLR 0x04
|
||||
#define PCI_SUBCLASS_MSC_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class 2 (network controllers)*/
|
||||
|
||||
#define PCI_SUBCLASS_NET_ETHERNET_CTLR 0x00
|
||||
#define PCI_SUBCLASS_NET_TOKEN_RING_CTLR 0x01
|
||||
#define PCI_SUBCLASS_NET_FDDI_CTLR 0x02
|
||||
#define PCI_SUBCLASS_NET_ATM_CTLR 0x03
|
||||
#define PCI_SUBCLASS_NET_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class 3 (display controllers)*/
|
||||
|
||||
#define PCI_SUBCLASS_VID_VGA_CTLR 0x00
|
||||
#define PCI_SUBCLASS_VID_XGA_CTLR 0x01
|
||||
#define PCI_SUBLCASS_VID_3D_CTLR 0x02
|
||||
#define PCI_SUBCLASS_VID_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class 4 (multimedia device)*/
|
||||
|
||||
#define PCI_SUBCLASS_MM_VIDEO_DEV 0x00
|
||||
#define PCI_SUBCLASS_MM_AUDIO_DEV 0x01
|
||||
#define PCI_SUBCLASS_MM_TELEPHONY_DEV 0x02
|
||||
#define PCI_SUBCLASS_MM_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class 5 (memory controller)*/
|
||||
|
||||
#define PCI_SUBCLASS_MEM_RAM 0x00
|
||||
#define PCI_SUBCLASS_MEM_FLASH 0x01
|
||||
#define PCI_SUBCLASS_MEM_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class 6 (bridge device)*/
|
||||
|
||||
#define PCI_SUBCLASS_BR_HOST 0x00
|
||||
#define PCI_SUBCLASS_BR_ISA 0x01
|
||||
#define PCI_SUBCLASS_BR_EISA 0x02
|
||||
#define PCI_SUBCLASS_BR_MCA 0x03
|
||||
#define PCI_SUBCLASS_BR_PCI_TO_PCI 0x04
|
||||
#define PCI_SUBCLASS_BR_PCMCIA 0x05
|
||||
#define PCI_SUBCLASS_BR_NUBUS 0x06
|
||||
#define PCI_SUBCLASS_BR_CARDBUS 0x07
|
||||
#define PCI_SUBCLASS_BR_OTHER 0x80
|
||||
|
||||
/* PCI device subclasses for class C (serial bus controller)*/
|
||||
|
||||
#define PCI_SUBCLASS_SB_IEEE1394 0x00
|
||||
#define PCI_SUBCLASS_SB_ACCESS 0x01
|
||||
#define PCI_SUBCLASS_SB_SSA 0x02
|
||||
#define PCI_SUBCLASS_SB_USB 0x03
|
||||
#define PCI_SUBCLASS_SB_FIBRE_CHANNEL 0x04
|
||||
|
||||
#define PCI_MAX_DEVICES 32
|
||||
#define PCI_MAX_FUNCTION 8
|
||||
#define PCI_MAX_BRIDGE_NUMBER 0xFF
|
||||
#define PCI_INVALID_VENDORID 0xFFFF
|
||||
#define PCI_COMMON_HDR_LENGTH (FIELD_OFFSET(PCI_COMMON_CONFIG, DeviceSpecific))
|
||||
|
||||
typedef struct _PCI_SLOT_NUMBER {
|
||||
union {
|
||||
struct {
|
||||
|
||||
Reference in New Issue
Block a user