omap3530/beagle_drivers/medwb/medwb.cpp
branchBYD_LCD_Integration
changeset 81 8b0d299f2a61
parent 51 254b9435d75e
child 108 181b2f6a9979
equal deleted inserted replaced
79:c242d7f984ad 81:8b0d299f2a61
   493 
   493 
   494 TInt DMediaDriverWB::DoFormat(TLocDrvRequest& iCurrentReq)
   494 TInt DMediaDriverWB::DoFormat(TLocDrvRequest& iCurrentReq)
   495 	{
   495 	{
   496 	Int64 pos = iCurrentReq.Pos();
   496 	Int64 pos = iCurrentReq.Pos();
   497 	Int64 length = iCurrentReq.Length();
   497 	Int64 length = iCurrentReq.Length();
   498 	TInt r;
   498 	TInt r = KErrGeneral;
   499 	if (length<0 || pos<0 || (pos+length)>KMaxTInt)
   499 	if (length<0 || pos<0 || (pos+length)>KMaxTInt)
   500 		return KErrGeneral;
   500 		return r;
   501 	TInt p=(TInt)pos;
   501 	TInt p=(TInt)pos;
   502 	TInt l=(TInt)length;
   502 	TInt l=(TInt)length;
   503 
   503 
   504 	if (p+l>CyAsSymbianStorageDriver::GetMediaSize())
   504 	if (p+l>CyAsSymbianStorageDriver::GetMediaSize())
   505 		return KErrGeneral;
   505 		return KErrGeneral;