diff -r d57b86b1867a -r dc268b18d709 userlibandfileserver/fileserver/sfat32/sl_fmt.cpp --- a/userlibandfileserver/fileserver/sfat32/sl_fmt.cpp Mon Sep 13 15:16:07 2010 +0100 +++ b/userlibandfileserver/fileserver/sfat32/sl_fmt.cpp Wed Sep 22 10:53:45 2010 +0100 @@ -142,6 +142,22 @@ } //------------------------------------------------------------------------------------------------------------------- +void Dump_LocalDrvCaps(const TLocalDriveCapsV6& aCaps) +{ + (void)aCaps; +#ifdef _DEBUG + __PRINT(_L("----- TLocalDriveCapsV6 dump:")); + __PRINT1(_L("iSize:%LU"), aCaps.iSize); + __PRINT4(_L("iType:%d, iDriveAtt:0x%x, iMediaAtt:0x%x, iConnectionBusType:%d"), aCaps.iType, aCaps.iDriveAtt, aCaps.iMediaAtt, aCaps.iConnectionBusType); + __PRINT2(_L("iFileSystemId:%d, iPartitionType:%d"), aCaps.iFileSystemId, aCaps.iPartitionType); + __PRINT2(_L("iHiddenSectors:%d, iEraseBlockSize:%d"), aCaps.iHiddenSectors, aCaps.iEraseBlockSize); + __PRINT4(_L("iExtraInfo:%d, iNumberOfSectors:%d, iSectorSizeInBytes:%d, iBlockSize:%d"), aCaps.iExtraInfo, aCaps.iNumberOfSectors, aCaps.iSectorSizeInBytes, aCaps.iBlockSize); + __PRINT(_L("-----")); +#endif +} + + +//------------------------------------------------------------------------------------------------------------------- /** Initialize format data. */ @@ -154,6 +170,8 @@ const TLocalDriveCapsV6& caps = capsBuf(); User::LeaveIfError(LocalDrive()->Caps(capsBuf)); + Dump_LocalDrvCaps(caps); + iVariableSize = (caps.iMediaAtt & KMediaAttVariableSize); iBytesPerSector=KDefaultSectorSize; iSectorSizeLog2 = Log2(iBytesPerSector); @@ -166,7 +184,7 @@ if (iVariableSize) {// Variable size implies ram disk iMaxDiskSectors=DiskSizeInSectorsL(GetRamDiskSizeInBytes()); - nRes = ProcessVolParam_RamDisk(); + nRes = ProcessVolParam_RamDisk(caps); } else {//-- fixed-size media @@ -192,13 +210,13 @@ nRes = ProcessVolParam_User(caps); else if(bCustomFormat) nRes = ProcessVolParam_Custom(caps); - else + else nRes = ProcessVolParam_Default(caps); } } //else(iVariableSize) if(nRes != KErrNone) - { + { __PRINT1(_L(" ::InitializeFormatDataL() err:%d"), nRes); User::Leave(nRes); }