diff -r d45b74d3fb20 -r ea2cef07f9fe userlibandfileserver/fileserver/sfat32/inc/sl_std.h --- a/userlibandfileserver/fileserver/sfat32/inc/sl_std.h Tue Aug 31 11:40:45 2010 +0100 +++ b/userlibandfileserver/fileserver/sfat32/inc/sl_std.h Tue Sep 14 15:52:42 2010 +0100 @@ -935,9 +935,9 @@ TBool iMatchUid; ///< Flag to indicate if UID matches }; +//--------------------------------------------------------------------------------------------------------------------------------- /** - Fat file system Format subsession implmentation, provides all that is required of a plug in - file system format as well as Fat specific functionality + FAT Format Control Block class, responsible for FAT volumes formatting */ class CFatFormatCB : public CFormatCB { @@ -963,10 +963,11 @@ void InitializeFormatDataL(); void DoZeroFillMediaL(TInt64 aStartPos, TInt64 aEndPos); - TInt InitFormatDataForVariableSizeDisk(TUint aDiskSizeInSectors); - TInt InitFormatDataForFixedSizeDiskNormal(TUint aDiskSizeInSectors, const TLocalDriveCapsV6& aCaps); - TInt InitFormatDataForFixedSizeDiskCustom(const TLDFormatInfo& aFormatInfo); - TInt InitFormatDataForFixedSizeDiskUser(TUint aDiskSizeInSectors); + TInt ProcessVolParam_User(const TLocalDriveCapsV6& aCaps); + TInt ProcessVolParam_Custom(const TLocalDriveCapsV6& aCaps); + TInt ProcessVolParam_Default(const TLocalDriveCapsV6& aCaps); + TInt ProcessVolParam_RamDisk(); + void AdjustClusterSize(TUint aRecommendedSectorsPerCluster); TInt AdjustFirstDataSectorAlignment(TUint aBlockSize); TInt FirstDataSector() const; @@ -981,15 +982,22 @@ TUint MaxFat16Sectors() const; TUint MaxFat32Sectors() const; - inline TBool Is16BitFat() const; - inline TBool Is32BitFat() const; inline CFatMountCB& FatMount(); inline CProxyDrive* LocalDrive(); TFatType SuggestFatType() const; + + inline TBool FatTypeValid() const; + inline TFatType FatType() const; + inline void SetFatType(TFatType aType); + + inline TBool Is16BitFat() const; + inline TBool Is32BitFat() const; + + private: - TBool iVariableSize; ///< Flag to indicat if we are dealing with a variable size volume + TBool iVariableSize; ///< Flag to indicate if we are dealing with a variable size volume (RAM drive) TUint16 iBytesPerSector; ///< Byte per sector of media TInt iSectorSizeLog2; ///< Sector size in log2 @@ -1000,12 +1008,14 @@ TUint iSectorsPerFat; ///< Number of sectors the Fat uses TUint32 iMaxDiskSectors; ///< number of sectors the volume has TFormatInfo iFormatInfo; ///< format information for a custom format - TBuf8<16> iFileSystemName;///< Buffer to contain the volume name + TFatType iFatType; ///< FAT type + TInt iHiddenSectors; ///< Number of hidden sectors in the volume TUint16 iNumberOfHeads; ///< Number of heads the media device has, not used so far as only used on solid state media. TUint16 iSectorsPerTrack; ///< Number of sectors the media device has, not used so far as only used on solid state media. TUint32 iRootClusterNum; ///< cluster number used for root directory, Fat32 specific TUint32 iCountOfClusters; ///< Count of clusters on the media + RArray iBadClusters; ///< Array of bad cluster numbers RArray iBadSectors; ///< Array of bad sector numbers TBool iDiskCorrupt; ///< Disk is corrupt when format or not