userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp
changeset 189 a5496987b1da
parent 148 31ea0f8e3c99
child 199 189ece41fa29
equal deleted inserted replaced
177:a232af6b0b1f 189:a5496987b1da
   933         
   933         
   934             //-- A request to obtain size of the mounted volume without blocking (CMountCB::VolumeL() can block).
   934             //-- A request to obtain size of the mounted volume without blocking (CMountCB::VolumeL() can block).
   935             case ESQ_MountedVolumeSize:
   935             case ESQ_MountedVolumeSize:
   936                 {
   936                 {
   937                 TUint64* pVal = (TUint64*)aParam; 
   937                 TUint64* pVal = (TUint64*)aParam; 
   938 		*pVal = iSize; //-- physical drive size
   938                 *pVal = VolumeSizeInBytes();
   939 
       
   940                 //-- take into account space occupied by FAT table, etc.
       
   941                 *pVal -= ClusterBasePosition(); 
       
   942                 *pVal=(*pVal >> ClusterSizeLog2()) << ClusterSizeLog2();  //-- round down to cluster size
       
   943 
       
   944                 __PRINT1(_L("MountControl() MountedVolumeSize:%LU"), *pVal);
   939                 __PRINT1(_L("MountControl() MountedVolumeSize:%LU"), *pVal);
   945                 return KErrNone;
   940                 return KErrNone;
   946                 }
   941                 }
   947 
   942 
   948             default:
   943             default: