Author: pschweitzer
Date: Fri Mar 7 19:42:54 2014
New Revision: 62444
URL:
http://svn.reactos.org/svn/reactos?rev=62444&view=rev
Log:
[FASTFAT]
- Implement VfatNotifyChangeDirectory which handles file system notifications
registration
- Also add support to dispatch routine for not queuing IRPs when pending and not required
CORE-2582
Modified:
trunk/reactos/drivers/filesystems/fastfat/dir.c
Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Fri Mar 7 19:42:54 2014
@@ -584,6 +584,32 @@
return Status;
}
+NTSTATUS VfatNotifyChangeDirectory(PVFAT_IRP_CONTEXT * IrpContext)
+{
+ PVCB pVcb;
+ PVFATFCB pFcb;
+ PIO_STACK_LOCATION Stack;
+ Stack = (*IrpContext)->Stack;
+ pVcb = (*IrpContext)->DeviceExt;
+ pFcb = (PVFATFCB) (*IrpContext)->FileObject->FsContext;
+
+ FsRtlNotifyFullChangeDirectory(pVcb->NotifySync,
+ &(pVcb->NotifyList),
+ (*IrpContext)->FileObject->FsContext2,
+ (PSTRING)&(pFcb->PathNameU),
+ BooleanFlagOn(Stack->Flags, SL_WATCH_TREE),
+ FALSE,
+
Stack->Parameters.NotifyDirectory.CompletionFilter,
+ (*IrpContext)->Irp,
+ NULL,
+ NULL);
+
+ /* We don't need the IRP context as we won't handle IRP completion */
+ VfatFreeIrpContext(*IrpContext);
+ *IrpContext = NULL;
+
+ return STATUS_PENDING;
+}
/*
* FUNCTION: directory control : read/write directory informations
@@ -603,8 +629,7 @@
break;
case IRP_MN_NOTIFY_CHANGE_DIRECTORY:
- DPRINT("VFAT, dir : change\n");
- Status = STATUS_NOT_IMPLEMENTED;
+ Status = VfatNotifyChangeDirectory(&IrpContext);
break;
default:
@@ -617,7 +642,11 @@
if (Status == STATUS_PENDING)
{
- Status = VfatQueueRequest(IrpContext);
+ /* Only queue if there's IRP context */
+ if (IrpContext)
+ {
+ Status = VfatQueueRequest(IrpContext);
+ }
}
else
{