[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 11 Oct 2014 18:00:46 +0000 (18:00 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 11 Oct 2014 18:00:46 +0000 (18:00 +0000)
Return found FCB on successful file opening

svn path=/trunk/; revision=64678

reactos/drivers/filesystems/ntfs/create.c

index 76868df..cddabb4 100644 (file)
@@ -78,14 +78,17 @@ static
 NTSTATUS
 NtfsOpenFile(PDEVICE_EXTENSION DeviceExt,
              PFILE_OBJECT FileObject,
-             PWSTR FileName)
+             PWSTR FileName,
+             PNTFS_FCB * FoundFCB)
 {
     PNTFS_FCB ParentFcb;
     PNTFS_FCB Fcb;
     NTSTATUS Status;
     PWSTR AbsFileName = NULL;
 
-    DPRINT("NtfsOpenFile(%p, %p, %S)\n", DeviceExt, FileObject, FileName);
+    DPRINT1("NtfsOpenFile(%p, %p, %S)\n", DeviceExt, FileObject, FileName);
+
+    *FoundFCB = NULL;
 
     if (FileObject->RelatedFileObject)
     {
@@ -143,6 +146,8 @@ NtfsOpenFile(PDEVICE_EXTENSION DeviceExt,
     if (AbsFileName)
         ExFreePool(AbsFileName);
 
+    *FoundFCB = Fcb;
+
     return Status;
 }
 
@@ -160,11 +165,11 @@ NtfsCreateFile(PDEVICE_OBJECT DeviceObject,
     PFILE_OBJECT FileObject;
     ULONG RequestedDisposition;
     ULONG RequestedOptions;
-//    PFCB Fcb;
+    PNTFS_FCB Fcb;
 //    PWSTR FileName;
     NTSTATUS Status;
 
-    DPRINT("NtfsCreateFile() called\n");
+    DPRINT1("NtfsCreateFile(%p, %p) called\n", DeviceObject, Irp);
 
     DeviceExt = DeviceObject->DeviceExtension;
     ASSERT(DeviceExt);
@@ -213,7 +218,8 @@ NtfsCreateFile(PDEVICE_OBJECT DeviceObject,
 
     Status = NtfsOpenFile(DeviceExt,
                           FileObject,
-                          FileObject->FileName.Buffer);
+                          FileObject->FileName.Buffer,
+                          &Fcb);
 
     /*
      * If the directory containing the file to open doesn't exist then