--- a/kerneltest/e32test/pccd/t_idrv.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/e32test/pccd/t_idrv.cpp Wed Sep 01 12:34:56 2010 +0100
@@ -44,9 +44,7 @@
const TInt KTestDriveLen=0x00040000; //256K
const TInt KSmallDriveInc=0x00000400; //1K
-#if defined (__WINS__)
const TInt KBigDriveLen=0x00100000; //1M - WINS
-#endif
const TInt KTestBufLen=256;
@@ -104,23 +102,28 @@
test.Next(_L("Find internal drive"));
- TInt drive;
- for (drive = 0; drive < KMaxLocalDrives; drive++)
+ TDriveInfoV1Buf driveInfoBuf;
+ UserHal::DriveInfo(driveInfoBuf);
+ TDriveInfoV1& driveInfo = driveInfoBuf();
+
+ TInt drive = 0;
+ for ( ; drive < driveInfo.iTotalSupportedDrives; ++drive)
{
TBool changedFlag;
- if (theInternalDrive.Connect(drive, changedFlag) != KErrNone)
- continue;
+ theInternalDrive.Connect(drive, changedFlag);
TLocalDriveCapsV2 info;
TPckg<TLocalDriveCapsV2> infoPckg(info);
theInternalDrive.Caps(infoPckg);
if (info.iType == EMediaRam)
- break; // found it
+ {
+ break;
+ }
theInternalDrive.Disconnect();
}
- test(drive < KMaxLocalDrives); // iterated over all, found none
+ test(drive < driveInfo.iTotalSupportedDrives);
test.Next(_L("Capabilities"));
TLocalDriveCapsV2 info;