userlibandfileserver/fileserver/sfat32/sl_disk.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 42 a179b74831c9
child 44 3e88ff8f41d5
equal deleted inserted replaced
42:a179b74831c9 43:c1f20ce4abcf
   291 
   291 
   292 	__PRINT4(_L("CAtaDisk::ReadL() pos:%u:%u, len:%u, offset:%u"), I64HIGH(aPos), I64LOW(aPos), aLength, anOffset);
   292 	__PRINT4(_L("CAtaDisk::ReadL() pos:%u:%u, len:%u, offset:%u"), I64HIGH(aPos), I64LOW(aPos), aLength, anOffset);
   293 	User::LeaveIfError(iDrive.ReadNonCritical(aPos,aLength,aTrg,aMessage,anOffset, aFlag));
   293 	User::LeaveIfError(iDrive.ReadNonCritical(aPos,aLength,aTrg,aMessage,anOffset, aFlag));
   294 	}
   294 	}
   295 
   295 
   296 
       
   297 //-------------------------------------------------------------------------------------
   296 //-------------------------------------------------------------------------------------
   298 
   297 
   299 /**
   298 /**
   300     Write data to the media directly without any cached.
   299     Write data to the media directly without any cached.
   301     Mostly used by file IO
   300     Mostly used by file IO
   324 
   323 
   325     //-- invalidate affected(if any) part of the FAT cache in the case if someone used to write data to FAT area, which usually do not happen 
   324     //-- invalidate affected(if any) part of the FAT cache in the case if someone used to write data to FAT area, which usually do not happen 
   326     iFatMount->FAT().InvalidateCacheL(aPos,aLength);
   325     iFatMount->FAT().InvalidateCacheL(aPos,aLength);
   327 
   326 
   328 	}
   327 	}
   329 
       
   330 
   328 
   331 //-------------------------------------------------------------------------------------
   329 //-------------------------------------------------------------------------------------
   332 
   330 
   333 /** Get information for last disk error */
   331 /** Get information for last disk error */
   334 TInt CAtaDisk::GetLastErrorInfo(TDes8& aErrorInfo) const
   332 TInt CAtaDisk::GetLastErrorInfo(TDes8& aErrorInfo) const
   453 	TUint8* pos=RamDiskBase()+I64LOW(aPos);
   451 	TUint8* pos=RamDiskBase()+I64LOW(aPos);
   454 	TPtrC8 buf(pos,aLength);
   452 	TPtrC8 buf(pos,aLength);
   455 	aMessage.WriteL(0,buf,anOffset);
   453 	aMessage.WriteL(0,buf,anOffset);
   456 	}
   454 	}
   457 
   455 
   458 	
       
   459 //-------------------------------------------------------------------------------------
   456 //-------------------------------------------------------------------------------------
   460 //
   457 //
   461 // Write from thread relative descriptor into ramDrive
   458 // Write from thread relative descriptor into ramDrive
   462 //
   459 //
   463 void CRamDisk::WriteL(TInt64 aPos,TInt aLength,const TAny* /*aSrc*/,const RMessagePtr2 &aMessage,TInt anOffset, TUint /*aFlag*/)
   460 void CRamDisk::WriteL(TInt64 aPos,TInt aLength,const TAny* /*aSrc*/,const RMessagePtr2 &aMessage,TInt anOffset, TUint /*aFlag*/)
   476 
   473 
   477 
   474 
   478 
   475 
   479 
   476 
   480 
   477 
       
   478 
       
   479 
       
   480 
       
   481 
       
   482 
       
   483 
       
   484 
       
   485 
       
   486 
       
   487 
       
   488 
       
   489 
       
   490 
       
   491 
       
   492 
       
   493 
       
   494