Author: pschweitzer
Date: Mon Dec 15 21:28:06 2014
New Revision: 65679
URL:
http://svn.reactos.org/svn/reactos?rev=65679&view=rev
Log:
[NTFS]
- Store the link count in FCB and return it in FileStandardInformation query
- Return the MFT index in NtfsGetInternalInformation query
Modified:
trunk/reactos/drivers/filesystems/ntfs/fcb.c
trunk/reactos/drivers/filesystems/ntfs/finfo.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/fcb.c [iso-8859-1] Mon Dec 15 21:28:06 2014
@@ -358,6 +358,7 @@
Fcb->RFCB.ValidDataLength.QuadPart = FileName->DataSize;
Fcb->RFCB.AllocationSize.QuadPart = FileName->AllocatedSize;
Fcb->MFTIndex = NTFS_FILE_ROOT;
+ Fcb->LinkCount = MftRecord->LinkCount;
NtfsFCBInitializeCache(Vcb, Fcb);
NtfsAddFCBToTable(Vcb, Fcb);
@@ -485,6 +486,7 @@
NtfsFCBInitializeCache(Vcb, rcFCB);
rcFCB->RefCount = 1;
rcFCB->MFTIndex = MFTIndex;
+ rcFCB->LinkCount = Record->LinkCount;
NtfsAddFCBToTable(Vcb, rcFCB);
*fileFCB = rcFCB;
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Mon Dec 15 21:28:06 2014
@@ -59,7 +59,7 @@
StandardInfo->AllocationSize = Fcb->RFCB.AllocationSize;
StandardInfo->EndOfFile = Fcb->RFCB.FileSize;
- StandardInfo->NumberOfLinks = 0; /* FIXME */
+ StandardInfo->NumberOfLinks = Fcb->LinkCount;
StandardInfo->DeletePending = FALSE;
StandardInfo->Directory = NtfsFCBIsDirectory(Fcb);
@@ -183,8 +183,7 @@
if (*BufferLength < sizeof(FILE_INTERNAL_INFORMATION))
return STATUS_BUFFER_OVERFLOW;
- /* FIXME: get a real index, that can be used in a create operation */
- InternalInfo->IndexNumber.QuadPart = 0;
+ InternalInfo->IndexNumber.QuadPart = Fcb->MFTIndex;
*BufferLength -= sizeof(FILE_INTERNAL_INFORMATION);
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Mon Dec 15 21:28:06 2014
@@ -444,6 +444,7 @@
ULONG Flags;
ULONGLONG MFTIndex;
+ USHORT LinkCount;
FILENAME_ATTRIBUTE Entry;