diff -r 345b1ca54e88 -r 039a3e647356 userlibandfileserver/fileserver/sfat32/ram_fat_table32.cpp --- a/userlibandfileserver/fileserver/sfat32/ram_fat_table32.cpp Wed Sep 15 13:42:27 2010 +0300 +++ b/userlibandfileserver/fileserver/sfat32/ram_fat_table32.cpp Wed Oct 13 16:04:24 2010 +0300 @@ -343,9 +343,9 @@ Zero fill RAM area corresponding to the cluster number aCluster @param aCluster a cluster number to be zero-filled */ -void CRamFatTable::ZeroFillClusterL(TInt aCluster) +void CRamFatTable::ZeroFillCluster(TInt aCluster) { - TLinAddr clusterPos= I64LOW(DataPositionInBytesL(aCluster)); + TLinAddr clusterPos= I64LOW(DataPositionInBytes(aCluster)); Mem::FillZ(iRamDiskBase+clusterPos, 1<< iOwner->ClusterSizeLog2()); } @@ -356,15 +356,9 @@ @param aCluster to find location of @return Byte offset of the cluster data */ -TInt64 CRamFatTable::DataPositionInBytesL(TUint32 aCluster) const +TInt64 CRamFatTable::DataPositionInBytes(TUint32 aCluster) const { //__PRINT(_L("CRamFatTable::DataPositionInBytes")); - if(!ClusterNumberValid(aCluster)) - { - __ASSERT_DEBUG(0, Fault(EFatTable_InvalidIndex)); - User::Leave(KErrCorrupt); - } - ReadIndirectionTable(aCluster); return(aCluster<ClusterSizeLog2()); } @@ -423,7 +417,7 @@ __PRINT(_L("CRamFatTable::AllocateSingleClusterL")); iOwner->EnlargeL(1<ClusterSizeLog2()); // First enlarge the RAM drive TInt fileAllocated=CFatTable::AllocateSingleClusterL(aNearestCluster); // Now update the free cluster and fat/fit - ZeroFillClusterL(fileAllocated); //-- zero-fill allocated cluster + ZeroFillCluster(fileAllocated); //-- zero-fill allocated cluster return(fileAllocated); } @@ -464,7 +458,7 @@ DecrementFreeClusterCount(1); WriteL(aCluster,freeCluster); aCluster=freeCluster; - ZeroFillClusterL(freeCluster); //-- zero fill just allocated cluster (RAM area) + ZeroFillCluster(freeCluster); //-- zero fill just allocated cluster (RAM area) } SetFreeClusterHint(aCluster); @@ -499,7 +493,7 @@ endCluster=EOF_32Bit; // endCluster==0 -> file contained FAT loop // Real position in bytes of the start cluster in the data area - TLinAddr startClusterPos=I64LOW(DataPositionInBytesL(startCluster)); + TLinAddr startClusterPos=I64LOW(DataPositionInBytes(startCluster)); // Sliding value when more than one block is freed TLinAddr trg=startClusterPos-(totalFreed< file contained FAT loop // Real position in bytes of the start cluster in the data area - TLinAddr startClusterPos=I64LOW(DataPositionInBytesL(startCluster)); + TLinAddr startClusterPos=I64LOW(DataPositionInBytes(startCluster)); // Sliding value when more than one block is freed TLinAddr trg=startClusterPos-(totalFreed<ClusterSizeLog2()))) + if (GetNextClusterL(endCluster)==EFalse || (endClusterPos=DataPositionInBytes(endCluster))!=(oldClusterPos+(1<ClusterSizeLog2()))) { endCluster=oldCluster; break;