mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 05:01:03 +00:00
[BLUE][CDFS]
- Arch, don't assume the driver you see in the backtrace is one that needs fixing. CDFS is the one who's a file system driver here... svn path=/trunk/; revision=67496
This commit is contained in:
parent
a1283b2745
commit
067be5c23a
3 changed files with 58 additions and 86 deletions
|
@ -99,6 +99,10 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
|||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
|
||||
CdfsDeviceControl;
|
||||
|
||||
CdfsGlobalData->FastIoDispatch.FastIoRead = CdfsFastIoRead;
|
||||
CdfsGlobalData->FastIoDispatch.FastIoWrite = CdfsFastIoWrite;
|
||||
DriverObject->FastIoDispatch = &CdfsGlobalData->FastIoDispatch;
|
||||
|
||||
DriverObject->DriverUnload = NULL;
|
||||
|
||||
/* Cache manager */
|
||||
|
@ -141,3 +145,49 @@ CdfsReleaseFromLazyWrite(IN PVOID Context)
|
|||
|
||||
ExReleaseResourceLite(&(Fcb->MainResource));
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
CdfsFastIoRead(
|
||||
_In_ PFILE_OBJECT FileObject,
|
||||
_In_ PLARGE_INTEGER FileOffset,
|
||||
_In_ ULONG Length,
|
||||
_In_ BOOLEAN Wait,
|
||||
_In_ ULONG LockKey,
|
||||
_Out_ PVOID Buffer,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatus,
|
||||
_In_ PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DBG_UNREFERENCED_PARAMETER(FileObject);
|
||||
DBG_UNREFERENCED_PARAMETER(FileOffset);
|
||||
DBG_UNREFERENCED_PARAMETER(Length);
|
||||
DBG_UNREFERENCED_PARAMETER(Wait);
|
||||
DBG_UNREFERENCED_PARAMETER(LockKey);
|
||||
DBG_UNREFERENCED_PARAMETER(Buffer);
|
||||
DBG_UNREFERENCED_PARAMETER(IoStatus);
|
||||
DBG_UNREFERENCED_PARAMETER(DeviceObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
CdfsFastIoWrite(
|
||||
_In_ PFILE_OBJECT FileObject,
|
||||
_In_ PLARGE_INTEGER FileOffset,
|
||||
_In_ ULONG Length,
|
||||
_In_ BOOLEAN Wait,
|
||||
_In_ ULONG LockKey,
|
||||
_In_ PVOID Buffer,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatus,
|
||||
_In_ PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DBG_UNREFERENCED_PARAMETER(FileObject);
|
||||
DBG_UNREFERENCED_PARAMETER(FileOffset);
|
||||
DBG_UNREFERENCED_PARAMETER(Length);
|
||||
DBG_UNREFERENCED_PARAMETER(Wait);
|
||||
DBG_UNREFERENCED_PARAMETER(LockKey);
|
||||
DBG_UNREFERENCED_PARAMETER(Buffer);
|
||||
DBG_UNREFERENCED_PARAMETER(IoStatus);
|
||||
DBG_UNREFERENCED_PARAMETER(DeviceObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ typedef struct
|
|||
|
||||
#define MAX_PATH 260
|
||||
|
||||
typedef struct _CDFS_SHORT_NAME
|
||||
typedef struct _CDFS_SHORT_NAME
|
||||
{
|
||||
LIST_ENTRY Entry;
|
||||
LARGE_INTEGER StreamOffset;
|
||||
|
@ -244,6 +244,7 @@ typedef struct
|
|||
PDEVICE_OBJECT DeviceObject;
|
||||
ULONG Flags;
|
||||
CACHE_MANAGER_CALLBACKS CacheMgrCallbacks;
|
||||
FAST_IO_DISPATCH FastIoDispatch;
|
||||
} CDFS_GLOBAL_DATA, *PCDFS_GLOBAL_DATA;
|
||||
|
||||
extern PCDFS_GLOBAL_DATA CdfsGlobalData;
|
||||
|
@ -429,9 +430,9 @@ CdfsFileFlagsToAttributes(PFCB Fcb,
|
|||
|
||||
VOID
|
||||
CdfsShortNameCacheGet
|
||||
(PFCB DirectoryFcb,
|
||||
PLARGE_INTEGER StreamOffset,
|
||||
PUNICODE_STRING LongName,
|
||||
(PFCB DirectoryFcb,
|
||||
PLARGE_INTEGER StreamOffset,
|
||||
PUNICODE_STRING LongName,
|
||||
PUNICODE_STRING ShortName);
|
||||
|
||||
/* rw.c */
|
||||
|
@ -480,4 +481,7 @@ CdfsAcquireForLazyWrite(IN PVOID Context,
|
|||
VOID NTAPI
|
||||
CdfsReleaseFromLazyWrite(IN PVOID Context);
|
||||
|
||||
FAST_IO_READ CdfsFastIoRead;
|
||||
FAST_IO_WRITE CdfsFastIoWrite;
|
||||
|
||||
#endif /* CDFS_H */
|
||||
|
|
|
@ -88,8 +88,6 @@ static const UCHAR DefaultPalette[] =
|
|||
0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
static FAST_IO_DISPATCH ScrFastIoDispatch;
|
||||
|
||||
/* FUNCTIONS **************************************************************/
|
||||
|
||||
static VOID FASTCALL
|
||||
|
@ -794,82 +792,6 @@ ScrIoControl(PDEVICE_OBJECT DeviceObject,
|
|||
return Status;
|
||||
}
|
||||
|
||||
static DRIVER_DISPATCH ScrDispatch;
|
||||
static NTSTATUS NTAPI
|
||||
ScrDispatch(PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
|
||||
NTSTATUS Status;
|
||||
|
||||
switch (stk->MajorFunction)
|
||||
{
|
||||
case IRP_MJ_CLOSE:
|
||||
Status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Irp->IoStatus.Status = Status;
|
||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
static FAST_IO_READ ScrFastIoRead;
|
||||
static
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ScrFastIoRead(
|
||||
_In_ PFILE_OBJECT FileObject,
|
||||
_In_ PLARGE_INTEGER FileOffset,
|
||||
_In_ ULONG Length,
|
||||
_In_ BOOLEAN Wait,
|
||||
_In_ ULONG LockKey,
|
||||
_Out_ PVOID Buffer,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatus,
|
||||
_In_ PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DBG_UNREFERENCED_PARAMETER(FileObject);
|
||||
DBG_UNREFERENCED_PARAMETER(FileOffset);
|
||||
DBG_UNREFERENCED_PARAMETER(Length);
|
||||
DBG_UNREFERENCED_PARAMETER(Wait);
|
||||
DBG_UNREFERENCED_PARAMETER(LockKey);
|
||||
DBG_UNREFERENCED_PARAMETER(Buffer);
|
||||
DBG_UNREFERENCED_PARAMETER(IoStatus);
|
||||
DBG_UNREFERENCED_PARAMETER(DeviceObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static FAST_IO_WRITE ScrFastIoWrite;
|
||||
static
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
ScrFastIoWrite(
|
||||
_In_ PFILE_OBJECT FileObject,
|
||||
_In_ PLARGE_INTEGER FileOffset,
|
||||
_In_ ULONG Length,
|
||||
_In_ BOOLEAN Wait,
|
||||
_In_ ULONG LockKey,
|
||||
_In_ PVOID Buffer,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatus,
|
||||
_In_ PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DBG_UNREFERENCED_PARAMETER(FileObject);
|
||||
DBG_UNREFERENCED_PARAMETER(FileOffset);
|
||||
DBG_UNREFERENCED_PARAMETER(Length);
|
||||
DBG_UNREFERENCED_PARAMETER(Wait);
|
||||
DBG_UNREFERENCED_PARAMETER(LockKey);
|
||||
DBG_UNREFERENCED_PARAMETER(Buffer);
|
||||
DBG_UNREFERENCED_PARAMETER(IoStatus);
|
||||
DBG_UNREFERENCED_PARAMETER(DeviceObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Module entry point
|
||||
*/
|
||||
|
@ -889,10 +811,6 @@ DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
DriverObject->MajorFunction[IRP_MJ_WRITE] = ScrWrite;
|
||||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL ] = ScrIoControl;
|
||||
|
||||
ScrFastIoDispatch.FastIoRead = ScrFastIoRead;
|
||||
ScrFastIoDispatch.FastIoWrite = ScrFastIoWrite;
|
||||
DriverObject->FastIoDispatch = &ScrFastIoDispatch;
|
||||
|
||||
Status = IoCreateDevice (DriverObject,
|
||||
sizeof(DEVICE_EXTENSION),
|
||||
&DeviceName,
|
||||
|
|
Loading…
Reference in a new issue