userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp
branchRCL_3
changeset 42 a179b74831c9
parent 28 5b5d147c7838
child 43 c1f20ce4abcf
equal deleted inserted replaced
41:0ffb4e86fcc9 42:a179b74831c9
  1066         if (pos<(clusterListLen<<ClusterSizeLog2()))
  1066         if (pos<(clusterListLen<<ClusterSizeLog2()))
  1067             {
  1067             {
  1068 			//  Read the remaining length or the entire cluster block whichever is smaller
  1068 			//  Read the remaining length or the entire cluster block whichever is smaller
  1069 			TInt readLength = (TInt)Min((TInt64)(aLength-readTotal),(clusterListLen<<ClusterSizeLog2())-pos);
  1069 			TInt readLength = (TInt)Min((TInt64)(aLength-readTotal),(clusterListLen<<ClusterSizeLog2())-pos);
  1070 			__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
  1070 			__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
  1071 			TInt64 dataAddress=(FAT().DataPositionInBytes(cluster))+pos;
  1071 			TInt64 dataAddress=(FAT().DataPositionInBytesL(cluster))+pos;
  1072 			iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal);
  1072 			iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0);
  1073 			readTotal += readLength;
  1073 			readTotal += readLength;
  1074 
  1074 
  1075 			if (readTotal == aLength)
  1075 			if (readTotal == aLength)
  1076 				return;
  1076 				return;
  1077 
  1077