kerneltest/f32test/filesystem/fat/t_scn32dr1.cpp
branchRCL_3
changeset 21 e7d2d738d3c2
parent 0 a41df078684a
child 42 a179b74831c9
equal deleted inserted replaced
20:597aaf25e343 21:e7d2d738d3c2
   595         {
   595         {
   596         if (aNum > 0)
   596         if (aNum > 0)
   597             RDebug::Print(_L("%5d: ------------- end of directory"), aNum);
   597             RDebug::Print(_L("%5d: ------------- end of directory"), aNum);
   598         return EFalse;
   598         return EFalse;
   599         }
   599         }
   600     else if ((d->Attributes() & KDirAttrLongMask) == KDirAttrLongName)
   600     else if (((TInt)d->Attributes() & KDirAttrLongMask) == KDirAttrLongName)
   601         {
   601         {
   602         TBuf16<15> name;
   602         TBuf16<15> name;
   603         ExtractNameString(name, aEntry);
   603         ExtractNameString(name, aEntry);
   604         TInt ord = aEntry[0];
   604         TInt ord = aEntry[0];
   605         if (ord & KDirLastLongEntry)
   605         if (ord & KDirLastLongEntry)
   793     r=TheRawDisk.Read(ClusterToByte(aCluster), ptr);
   793     r=TheRawDisk.Read(ClusterToByte(aCluster), ptr);
   794     test(r==KErrNone);
   794     test(r==KErrNone);
   795     TheRawDisk.Close();
   795     TheRawDisk.Close();
   796     RDebug::Print(_L("Cluster %d @ 0x%08X:"), aCluster, ClusterToByte(aCluster));
   796     RDebug::Print(_L("Cluster %d @ 0x%08X:"), aCluster, ClusterToByte(aCluster));
   797     TFatDirEntry* d = (TFatDirEntry*)ptr.Ptr() + aEntry;
   797     TFatDirEntry* d = (TFatDirEntry*)ptr.Ptr() + aEntry;
   798     while ((d->Attributes() & KDirAttrLongMask) == KDirAttrLongName && aEntry < gEntriesPerCluster)
   798     while (((TInt)d->Attributes() & KDirAttrLongMask) == KDirAttrLongName && aEntry < gEntriesPerCluster)
   799         {
   799         {
   800         if (d->IsErased() || d->IsEndOfDirectory())
   800         if (d->IsErased() || d->IsEndOfDirectory())
   801             break;
   801             break;
   802         ++aEntry;
   802         ++aEntry;
   803         d = (TFatDirEntry*)ptr.Ptr() + aEntry;
   803         d = (TFatDirEntry*)ptr.Ptr() + aEntry;
   805     TInt start = d->StartCluster();
   805     TInt start = d->StartCluster();
   806     if (d->IsErased())
   806     if (d->IsErased())
   807         start = -1;
   807         start = -1;
   808     else if (d->IsEndOfDirectory())
   808     else if (d->IsEndOfDirectory())
   809         start = -1;
   809         start = -1;
   810     else if ((d->Attributes() & KDirAttrLongMask) == KDirAttrLongName)
   810     else if (((TInt)d->Attributes() & KDirAttrLongMask) == KDirAttrLongName)
   811         start = -1;
   811         start = -1;
   812     else if (!IsValidDirEntry(d))
   812     else if (!IsValidDirEntry(d))
   813         start = -1;
   813         start = -1;
   814     delete buf;
   814     delete buf;
   815     return start;
   815     return start;