diff -r 2d65c2f76d7b -r 947f0dc9f7a8 kerneltest/e32test/pccd/t_idrv.cpp --- a/kerneltest/e32test/pccd/t_idrv.cpp Tue Feb 02 01:24:03 2010 +0200 +++ b/kerneltest/e32test/pccd/t_idrv.cpp Fri Apr 16 16:24:37 2010 +0300 @@ -102,28 +102,23 @@ test.Next(_L("Find internal drive")); - TDriveInfoV1Buf driveInfoBuf; - UserHal::DriveInfo(driveInfoBuf); - TDriveInfoV1& driveInfo = driveInfoBuf(); - - TInt drive = 0; - for ( ; drive < driveInfo.iTotalSupportedDrives; ++drive) + TInt drive; + for (drive = 0; drive < KMaxLocalDrives; drive++) { TBool changedFlag; - theInternalDrive.Connect(drive, changedFlag); + if (theInternalDrive.Connect(drive, changedFlag) != KErrNone) + continue; TLocalDriveCapsV2 info; TPckg infoPckg(info); theInternalDrive.Caps(infoPckg); if (info.iType == EMediaRam) - { - break; - } + break; // found it theInternalDrive.Disconnect(); } - test(drive < driveInfo.iTotalSupportedDrives); + test(drive < KMaxLocalDrives); // iterated over all, found none test.Next(_L("Capabilities")); TLocalDriveCapsV2 info;