--- a/kerneltest/e32test/pccd/t_idrv.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/e32test/pccd/t_idrv.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -44,7 +44,9 @@
const TInt KTestDriveLen=0x00040000; //256K
const TInt KSmallDriveInc=0x00000400; //1K
+#if defined (__WINS__)
const TInt KBigDriveLen=0x00100000; //1M - WINS
+#endif
const TInt KTestBufLen=256;
@@ -102,28 +104,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<TLocalDriveCapsV2> 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;