mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:53:36 +00:00
[CDFS]
Allow registering notifications. None implemented yet. svn path=/trunk/; revision=62780
This commit is contained in:
parent
81f368964f
commit
8b86c3ee99
4 changed files with 51 additions and 3 deletions
|
@ -160,6 +160,10 @@ typedef struct
|
||||||
PFILE_OBJECT StreamFileObject;
|
PFILE_OBJECT StreamFileObject;
|
||||||
|
|
||||||
CDINFO CdInfo;
|
CDINFO CdInfo;
|
||||||
|
|
||||||
|
/* Notifications */
|
||||||
|
LIST_ENTRY NotifyList;
|
||||||
|
PNOTIFY_SYNC NotifySync;
|
||||||
} DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
|
} DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,10 @@ CdfsCleanupFile(PDEVICE_EXTENSION DeviceExt,
|
||||||
DeviceExt,
|
DeviceExt,
|
||||||
FileObject);
|
FileObject);
|
||||||
|
|
||||||
|
/* Notify about the cleanup */
|
||||||
|
FsRtlNotifyCleanup(DeviceExt->NotifySync,
|
||||||
|
&(DeviceExt->NotifyList),
|
||||||
|
FileObject->FsContext2);
|
||||||
|
|
||||||
/* Uninitialize file cache if initialized for this file object. */
|
/* Uninitialize file cache if initialized for this file object. */
|
||||||
if (FileObject->SectionObjectPointer && FileObject->SectionObjectPointer->SharedCacheMap)
|
if (FileObject->SectionObjectPointer && FileObject->SectionObjectPointer->SharedCacheMap)
|
||||||
|
|
|
@ -752,6 +752,40 @@ CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static NTSTATUS
|
||||||
|
CdfsNotifyChangeDirectory(PDEVICE_OBJECT DeviceObject,
|
||||||
|
PIRP Irp)
|
||||||
|
{
|
||||||
|
PDEVICE_EXTENSION DeviceExtension;
|
||||||
|
PFCB Fcb;
|
||||||
|
PCCB Ccb;
|
||||||
|
PIO_STACK_LOCATION Stack;
|
||||||
|
PFILE_OBJECT FileObject;
|
||||||
|
|
||||||
|
DPRINT("CdfsNotifyChangeDirectory() called\n");
|
||||||
|
|
||||||
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
FileObject = Stack->FileObject;
|
||||||
|
|
||||||
|
Ccb = (PCCB)FileObject->FsContext2;
|
||||||
|
Fcb = (PFCB)FileObject->FsContext;
|
||||||
|
|
||||||
|
FsRtlNotifyFullChangeDirectory(DeviceExtension->NotifySync,
|
||||||
|
&(DeviceExtension->NotifyList),
|
||||||
|
Ccb,
|
||||||
|
(PSTRING)&(Fcb->PathName),
|
||||||
|
BooleanFlagOn(Stack->Flags, SL_WATCH_TREE),
|
||||||
|
FALSE,
|
||||||
|
Stack->Parameters.NotifyDirectory.CompletionFilter,
|
||||||
|
Irp,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
return STATUS_PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS NTAPI
|
||||||
CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
|
@ -772,8 +806,8 @@ CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
|
case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
|
||||||
DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
|
Status = CdfsNotifyChangeDirectory(DeviceObject,
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
Irp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -785,7 +819,10 @@ CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject,
|
||||||
Irp->IoStatus.Status = Status;
|
Irp->IoStatus.Status = Status;
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
if (Status != STATUS_PENDING)
|
||||||
|
{
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
}
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
|
|
||||||
return(Status);
|
return(Status);
|
||||||
|
|
|
@ -429,6 +429,9 @@ CdfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
||||||
KeInitializeSpinLock(&DeviceExt->FcbListLock);
|
KeInitializeSpinLock(&DeviceExt->FcbListLock);
|
||||||
InitializeListHead(&DeviceExt->FcbListHead);
|
InitializeListHead(&DeviceExt->FcbListHead);
|
||||||
|
|
||||||
|
FsRtlNotifyInitializeSync(&DeviceExt->NotifySync);
|
||||||
|
InitializeListHead(&DeviceExt->NotifyList);
|
||||||
|
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
ByeBye:
|
ByeBye:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue