userlibandfileserver/fileserver/etshell/ts_com.cpp
branchRCL_3
changeset 22 2f92ad2dc5db
parent 19 4a8fed1c0ef6
child 26 c734af59ce98
equal deleted inserted replaced
21:e7d2d738d3c2 22:2f92ad2dc5db
  1108 
  1108 
  1109 
  1109 
  1110 	//-- Print out information about file system installed
  1110 	//-- Print out information about file system installed
  1111 	if(aFlags & EFSInfo)
  1111 	if(aFlags & EFSInfo)
  1112     {
  1112     {
       
  1113         //-- print out drive properties
       
  1114         Buf.Format(_L("\nDrive %c: No:%d"), 'A'+aDrvNum, aDrvNum);
  1113         
  1115         
  1114         apConsole->Printf(_L("\nDrive %c: number:%d\n"), 'A'+aDrvNum, aDrvNum);
  1116         //-- find out if the drive is synchronous / asynchronous
       
  1117         TPckgBuf<TBool> drvSyncBuf;
       
  1118         nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveSync, drvSyncBuf);
       
  1119         if(nRes == KErrNone)
       
  1120         {
       
  1121             Buf.AppendFormat(_L(", Sync:%d"), drvSyncBuf() ? 1:0);        
       
  1122         }
       
  1123 
       
  1124         //-- find out if drive runs a rugged FS (debug mode only)
       
  1125         const TInt KControlIoIsRugged=4;
       
  1126         TUint8 ruggedFS;
       
  1127         TPtr8 pRugged(&ruggedFS, 1, 1);
       
  1128         nRes=aFs.ControlIo(aDrvNum, KControlIoIsRugged, pRugged);
       
  1129         if(nRes == KErrNone)
       
  1130         {
       
  1131             Buf.AppendFormat(_L(", Rugged:%d"), ruggedFS ? 1:0);        
       
  1132         }
       
  1133 
       
  1134         Buf.Append(_L("\n"));
       
  1135         apConsole->Printf(Buf);
       
  1136 
  1115 
  1137 
  1116 	    //-- print the FS name
  1138 	    //-- print the FS name
  1117 	    if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone)
  1139 	    if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone)
  1118 	    {
  1140 	    {
  1119 	        TFSName fsName;
  1141 	        TFSName fsName;
  1152                 apConsole->Printf(Buf);
  1174                 apConsole->Printf(Buf);
  1153             }
  1175             }
  1154 
  1176 
  1155 
  1177 
  1156 
  1178 
  1157             //-- print out FileSystem volume finalisation info
  1179             
  1158             if(bVolumeOK && (aFlags & EFSInfoEx))
  1180             if(bVolumeOK && (aFlags & EFSInfoEx))
  1159             {
  1181             {
  1160 
  1182                 Buf.Zero();
       
  1183 
       
  1184                 //-- print out FileSystem volume finalisation info
  1161                 TPckgBuf<TBool> boolPckg;
  1185                 TPckgBuf<TBool> boolPckg;
  1162                 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveFinalised, boolPckg);
  1186                 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveFinalised, boolPckg);
  1163                 if(nRes == KErrNone)
  1187                 if(nRes == KErrNone)
  1164                 {
  1188                 {
  1165                     if(boolPckg() >0)
  1189                     if(boolPckg() >0)
  1166                         apConsole->Printf(_L("Volume Finalised\n"));
  1190                         Buf.Copy(_L("Volume: Finalised"));
  1167                     else
  1191                     else
  1168                         apConsole->Printf(_L("Volume Not finalised\n"));
  1192                         Buf.Copy(_L("Volume: Not finalised"));
  1169                 }
  1193                 }
       
  1194 
       
  1195                 //-- print out cluster size that FS reported
       
  1196                 TVolumeIOParamInfo volIoInfo;
       
  1197                 nRes = aFs.VolumeIOParam(aDrvNum, volIoInfo);
       
  1198                 if(nRes == KErrNone && volIoInfo.iClusterSize >= 512)
       
  1199                 {
       
  1200                     Buf.AppendFormat(_L(", Cluster Sz:%d"), volIoInfo.iClusterSize);
       
  1201                 }
       
  1202 
       
  1203                 if(Buf.Length())
       
  1204                 {
       
  1205                     Buf.Append(_L("\n"));
       
  1206                     apConsole->Printf(Buf);    
       
  1207                 }
       
  1208 
  1170             }
  1209             }
  1171 	    }
  1210 	    }
  1172     }//if(aFlags & EFSInfo)
  1211     }//if(aFlags & EFSInfo)
  1173 
  1212 
  1174 	//-- print media attributes
  1213 	//-- print media attributes