kerneltest/f32test/loader/t_ldrtst.cpp
changeset 285 ff5437e4337c
parent 189 a5496987b1da
--- a/kerneltest/f32test/loader/t_ldrtst.cpp	Mon Oct 04 12:15:59 2010 +0100
+++ b/kerneltest/f32test/loader/t_ldrtst.cpp	Wed Oct 06 17:13:14 2010 +0100
@@ -1158,12 +1158,17 @@
 	TInt r = Fs.MkDirAll(hashDir);
 	test_Value(r, r == KErrNone || r == KErrAlreadyExists);
 
+	TBool removableDrivePresent = EFalse;
+
 	for (TInt d = 0; d <= (TInt)sizeof(SpecialDriveList); ++d)
 		{
 		TInt dr = SpecialDriveList[d];
 		TDriveInfo di;
 		test.Printf(_L("Drive %d\n"), dr);
 		test(Fs.Drive(di, dr) == KErrNone);
+
+		if (di.iDriveAtt & KDriveAttRemovable)
+			removableDrivePresent = ETrue;
 		if (di.iType == EMediaNotPresent)
 			continue;
 		
@@ -1195,6 +1200,23 @@
 		test.Printf(_L("MkDirAll %S returns %d\n"), &fn, r);
 		test_Value(r, r == KErrNone || r == KErrAlreadyExists);
 		}
+
+	if (removableDrivePresent)
+		{
+		if (!NoRemovable && SpecialDrives[1] == '!')
+			{
+			test.Printf(_L("Removable drive present but empty - please insert a card...\n"));
+			test(0);
+			}
+		}
+	else
+		{
+		if (!NoRemovable)
+			{
+			NoRemovable = ETrue;
+			test.Printf(_L("Updated NoRemovable=1 due to having no removable drives\n"));
+			}
+		}
 	}
 
 void GetNonZFileName(const TDesC& aOrigName, TDes& aNonZName)