--- a/kerneltest/f32test/filesystem/fat/t_tscan32.cpp Thu Jul 15 20:11:42 2010 +0300
+++ b/kerneltest/f32test/filesystem/fat/t_tscan32.cpp Thu Aug 19 11:14:22 2010 +0300
@@ -550,6 +550,18 @@
aName.SetLength(i);
}
+TDes& MakePrintable(TDes& aDes)
+ {
+ TInt len = aDes.Length();
+
+ for (TInt i=0; i<len; i++)
+ {
+ if ((TUint8) aDes[i] < 0x20)
+ aDes[i] = '?';
+ }
+ return aDes;
+ }
+
GLDEF_C TBool DumpDirEntry(TInt aNum, const TUint8* aEntry)
//
// Dump a single directory entry to the log. Return false if it was end of
@@ -569,9 +581,9 @@
ExtractNameString(name, aEntry);
TInt ord = aEntry[0];
if (ord & KDirLastLongEntry)
- RDebug::Print(_L("%5d: %-15S #%-2d LAST"), aNum, &name, ord & ~KDirLastLongEntry);
+ RDebug::Print(_L("%5d: %-15S #%-2d LAST"), aNum, &MakePrintable(name), ord & ~KDirLastLongEntry);
else
- RDebug::Print(_L("%5d: %-15S #%-2d"), aNum, &name, ord & ~KDirLastLongEntry);
+ RDebug::Print(_L("%5d: %-15S #%-2d"), aNum, &MakePrintable(name), ord & ~KDirLastLongEntry);
}
else if (!IsValidDirEntry(d))
return EFalse;
@@ -580,7 +592,7 @@
TBuf<11> name;
name.Copy(d->Name());
RDebug::Print(_L("%5d: '%S' %S cluster %d"),
- aNum, &name, DirAttributes(d->Attributes()), d->StartCluster());
+ aNum, &MakePrintable(name), DirAttributes(d->Attributes()), d->StartCluster());
}
return ETrue;
}