equal
deleted
inserted
replaced
216 @leave if write error occured. |
216 @leave if write error occured. |
217 */ |
217 */ |
218 void CFatMountCB::SetVolumeCleanL(TBool aClean) |
218 void CFatMountCB::SetVolumeCleanL(TBool aClean) |
219 { |
219 { |
220 |
220 |
221 //-- The volume can't be set clean if there are disk access objects opened on it. This precondition must be checked before calling this function |
221 //-- The volume can't be set clean if there are objects opened on it. This precondition must be checked before calling this function |
222 if(aClean && Locked()) |
222 if(aClean && LockStatus()!=0) |
223 { |
223 { |
224 __PRINT1(_L("#- CFatMountCB::SetVolumeCleanL drive:%d isn't free!"),DriveNumber()); |
224 __PRINT1(_L("#- CFatMountCB::SetVolumeCleanL drive:%d isn't free!"),DriveNumber()); |
225 ASSERT(0); |
225 ASSERT(0); |
226 User::Leave(KErrInUse); |
226 User::Leave(KErrInUse); |
227 return; |
227 return; |
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().DataPositionInBytesL(cluster))+pos; |
1071 TInt64 dataAddress=(FAT().DataPositionInBytes(cluster))+pos; |
1072 iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0); |
1072 iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal); |
1073 readTotal += readLength; |
1073 readTotal += readLength; |
1074 |
1074 |
1075 if (readTotal == aLength) |
1075 if (readTotal == aLength) |
1076 return; |
1076 return; |
1077 |
1077 |