- Fixed the directory index of a file for FATX.
- Initialize some values from the RFCB.
Modified: trunk/reactos/drivers/fs/vfat/fcb.c
_____
Modified: trunk/reactos/drivers/fs/vfat/fcb.c
--- trunk/reactos/drivers/fs/vfat/fcb.c 2005-01-25 21:14:57 UTC (rev
13284)
+++ trunk/reactos/drivers/fs/vfat/fcb.c 2005-01-25 21:16:19 UTC (rev
13285)
@@ -137,6 +137,10 @@
ExInitializeResourceLite(&rcFCB->MainResource);
FsRtlInitializeFileLock(&rcFCB->FileLock, NULL, NULL);
ExInitializeFastMutex(&rcFCB->LastMutex);
+ rcFCB->RFCB.PagingIoResource = &rcFCB->PagingIoResource;
+ rcFCB->RFCB.Resource = &rcFCB->MainResource;
+ rcFCB->RFCB.IsFastIoPossible = FastIoIsNotPossible;
+
return rcFCB;
}
@@ -425,6 +429,7 @@
FCB->RFCB.FileSize.QuadPart = Size;
FCB->RFCB.ValidDataLength.QuadPart = Size;
FCB->RFCB.AllocationSize.QuadPart = Size;
+ FCB->RFCB.IsFastIoPossible = FastIoIsNotPossible;
vfatFCBInitializeCacheFromVolume(pVCB, FCB);
vfatAddFCBToTable(pVCB, FCB);
@@ -538,6 +543,12 @@
}
rcFCB->dirIndex = DirContext->DirIndex;
rcFCB->startIndex = DirContext->StartIndex;
+ if ((rcFCB->Flags & FCB_IS_FATX_ENTRY) && !vfatFCBIsRoot
(directoryFCB))
+ {
+ ASSERT(DirContext->DirIndex >= 2 && DirContext->StartIndex >=
2);
+ rcFCB->dirIndex = DirContext->DirIndex-2;
+ rcFCB->startIndex = DirContext->StartIndex-2;
+ }
rcFCB->RFCB.FileSize.QuadPart = Size;
rcFCB->RFCB.ValidDataLength.QuadPart = Size;
rcFCB->RFCB.AllocationSize.QuadPart = ROUND_UP(Size,
vcb->FatInfo.BytesPerCluster);