From 6df3ae7aff1ee0dbce46e8bee2be5a3a46e1857c Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 11 Oct 2014 18:00:46 +0000 Subject: [PATCH] [NTFS] Return found FCB on successful file opening svn path=/trunk/; revision=64678 --- reactos/drivers/filesystems/ntfs/create.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/create.c b/reactos/drivers/filesystems/ntfs/create.c index 76868df36f1..cddabb4dd85 100644 --- a/reactos/drivers/filesystems/ntfs/create.c +++ b/reactos/drivers/filesystems/ntfs/create.c @@ -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