29 #include "u32std.h" |
29 #include "u32std.h" |
30 #include <u32hal.h> |
30 #include <u32hal.h> |
31 #include <nkern/nk_trace.h> |
31 #include <nkern/nk_trace.h> |
32 #include "filesystem_fat.h" |
32 #include "filesystem_fat.h" |
33 |
33 |
|
34 _LIT(KCrNl, "\r\n"); |
|
35 _LIT(KNl, "\n"); |
|
36 |
34 TPtrC ptrFormatHelp=_L("Drive:[\\] [fat12|fat16|fat32] [spc:X] [rs:Y] [ft:Z] [/Q][/S][/E][/F]\nfat12 or fat16 or fat32 specifies explicit FAT type\nspc:X specifies \"X\" sectors per cluster\nrs:Y specifies \"Y\" reserved sectors\nft:Z specifies \"Z\" FAT tables (1 or 2)\n\n/q - QuickFormat, /s - SpecialFormat, /e - ForcedErase\n/f - force formatting (ignore volume being in use)"); |
37 TPtrC ptrFormatHelp=_L("Drive:[\\] [fat12|fat16|fat32] [spc:X] [rs:Y] [ft:Z] [/Q][/S][/E][/F]\nfat12 or fat16 or fat32 specifies explicit FAT type\nspc:X specifies \"X\" sectors per cluster\nrs:Y specifies \"Y\" reserved sectors\nft:Z specifies \"Z\" FAT tables (1 or 2)\n\n/q - QuickFormat, /s - SpecialFormat, /e - ForcedErase\n/f - force formatting (ignore volume being in use)"); |
35 TPtrC ptrMountHelp=_L("Drive:[\\] <fsy:X> <fs:Y> [pext:Z] [/S][/U][/F][/R]\n'X' *.fsy module name, like elocal.fsy\n'Y' file system name, like 'FAT'\n'Z' optional primary extension module name\n/U - dismount FS from the drive e.g 'mount d: /u' \n/F - force mounting with dismounting existing FS \n/S - mount drive as synchronous\n/R - remount the file system "); |
38 TPtrC ptrMountHelp=_L("Drive:[\\] <fsy:X> <fs:Y> [pext:Z] [/S][/U][/F][/R]\n'X' *.fsy module name, like elocal.fsy\n'Y' file system name, like 'FAT'\n'Z' optional primary extension module name\n/U - dismount FS from the drive e.g 'mount d: /u' \n/U /F force dismounting the FS even if there are opened files on it \n/F - force mounting with dismounting existing FS \n/S - mount drive as synchronous\n/R - remount the file system "); |
36 |
39 |
|
40 TBool CShell::iDbgPrint = EFalse; |
37 |
41 |
38 // lint -e40,e30 |
42 // lint -e40,e30 |
39 const TShellCommand CShell::iCommand[ENoShellCommands]= |
43 const TShellCommand CShell::iCommand[ENoShellCommands]= |
40 { |
44 { |
41 // TShellCommand(_L("BLANK"),_L("Help"),_L("-?"),TShellCommand::EDSwitch,ShellFunction::BLANK), |
45 // TShellCommand(_L("BLANK"),_L("Help"),_L("-?"),TShellCommand::EDSwitch,ShellFunction::BLANK), |
69 TShellCommand(_L("DEBUGPORT"),_L("Set or get debug port"),_L("[port]"),0,ShellFunction::DebugPort), |
73 TShellCommand(_L("DEBUGPORT"),_L("Set or get debug port"),_L("[port]"),0,ShellFunction::DebugPort), |
70 TShellCommand(_L("PLUGIN"),_L("Manage Plugins"),_L("[name][/A][/R][/M][/D]"),TShellCommand::EASwitch|TShellCommand::ERSwitch|TShellCommand::EMSwitch|TShellCommand::EDSwitch,ShellFunction::Plugin), |
74 TShellCommand(_L("PLUGIN"),_L("Manage Plugins"),_L("[name][/A][/R][/M][/D]"),TShellCommand::EASwitch|TShellCommand::ERSwitch|TShellCommand::EMSwitch|TShellCommand::EDSwitch,ShellFunction::Plugin), |
71 TShellCommand(_L("DRVINFO"),_L("Print information about present drive(s) in the system"),_L("[DriveLetter:[\\]] [/p]\n/p - pause after each drive"),TShellCommand::EPSwitch,ShellFunction::DrvInfo), |
75 TShellCommand(_L("DRVINFO"),_L("Print information about present drive(s) in the system"),_L("[DriveLetter:[\\]] [/p]\n/p - pause after each drive"),TShellCommand::EPSwitch,ShellFunction::DrvInfo), |
72 TShellCommand(_L("SYSINFO"),_L("Print information about system features and status"),_L(""),0,ShellFunction::SysInfo), |
76 TShellCommand(_L("SYSINFO"),_L("Print information about system features and status"),_L(""),0,ShellFunction::SysInfo), |
73 TShellCommand(_L("MOUNT"),_L("Mount / dismount file system on specified drive"),ptrMountHelp,TShellCommand::EUSwitch|TShellCommand::ESSwitch|TShellCommand::EFSwitch|TShellCommand::ERSwitch,ShellFunction::MountFileSystem), |
77 TShellCommand(_L("MOUNT"),_L("Mount / dismount file system on specified drive"),ptrMountHelp,TShellCommand::EUSwitch|TShellCommand::ESSwitch|TShellCommand::EFSwitch|TShellCommand::ERSwitch,ShellFunction::MountFileSystem), |
74 TShellCommand(_L("ECHO"),_L("Print out the command line to the console and standard debug port."),_L("[line to print out]"),0,ShellFunction::ConsoleEcho), |
78 TShellCommand(_L("ECHO"),_L("Print out the command line to the console and standard debug port."),_L("[line to print out] [/Y/N]\n /Y turn ON copying console output to debug port\n /N turn it OFF "),TShellCommand::EYSwitch|TShellCommand::ENSwitch,ShellFunction::ConsoleEcho), |
75 TShellCommand(_L("RUNEXEC"),_L("Run a program in a loop"),_L("count filename[.exe] [/E/S/R]\n /E - exit early on error\n /S - count in seconds\n zero - run forever\n /R - reset debug regs after each run"),TShellCommand::EESwitch|TShellCommand::ESSwitch|TShellCommand::ERSwitch,ShellFunction::RunExec), |
79 TShellCommand(_L("RUNEXEC"),_L("Run a program in a loop"),_L("count filename[.exe] [/E/S/R]\n /E - exit early on error\n /S - count in seconds\n zero - run forever\n /R - reset debug regs after each run"),TShellCommand::EESwitch|TShellCommand::ESSwitch|TShellCommand::ERSwitch,ShellFunction::RunExec), |
76 |
80 |
77 }; |
81 }; |
78 |
82 |
79 |
83 |
1047 @param volInfo volume information |
1056 @param volInfo volume information |
1048 @param aPrintBuf buffer where the information will be printed to. |
1057 @param aPrintBuf buffer where the information will be printed to. |
1049 */ |
1058 */ |
1050 void FormatVolInfo(const TVolumeInfo& volInfo , TDes& aPrintBuf) |
1059 void FormatVolInfo(const TVolumeInfo& volInfo , TDes& aPrintBuf) |
1051 { |
1060 { |
1052 aPrintBuf.Format(_L("VolSz:%ld Free:%ld\n"),volInfo.iSize, volInfo.iFree); |
1061 aPrintBuf.Format(_L("VolSz:%ld Free:%ld"),volInfo.iSize, volInfo.iFree); |
1053 aPrintBuf.AppendFormat(_L("VolId:0x%x VolName:%S\n"),volInfo.iUniqueID, &volInfo.iName); |
1062 aPrintBuf.AppendFormat(_L("\r\nVolId:0x%x VolName:%S\n"),volInfo.iUniqueID, &volInfo.iName); |
1054 } |
1063 } |
1055 |
1064 |
1056 //-------------------------------------------------------- |
1065 //-------------------------------------------------------- |
1057 |
1066 |
1058 /** Bit flags that specify which information will be printed by PrintDrvInfo() */ |
1067 /** Bit flags that specify which information will be printed by PrintDrvInfo() */ |
1077 @param apConsole pointer to the console to print information into |
1086 @param apConsole pointer to the console to print information into |
1078 @param aFlags specifies which information to print out, @see TPrintDrvInfoFlags |
1087 @param aFlags specifies which information to print out, @see TPrintDrvInfoFlags |
1079 |
1088 |
1080 @return standard error code |
1089 @return standard error code |
1081 */ |
1090 */ |
1082 TInt PrintDrvInfo(RFs& aFs, TInt aDrvNum, CConsoleBase* apConsole, TUint aFlags = EAll) |
1091 TInt PrintDrvInfo(RFs& aFs, TInt aDrvNum, TUint aFlags = EAll) |
1083 { |
1092 { |
1084 TInt nRes; |
1093 TInt nRes; |
1085 TDriveInfo driveInfo; |
1094 TDriveInfo driveInfo; |
1086 TVolumeInfo volInfo; |
1095 TVolumeInfo volInfo; |
1087 TBuf<256> Buf; |
1096 TBuf<256> Buf; |
1088 |
1097 |
1089 //-- get drive info |
1098 //-- get drive info |
1090 nRes = aFs.Drive(driveInfo, aDrvNum); |
1099 nRes = aFs.Drive(driveInfo, aDrvNum); |
1091 if(nRes != KErrNone) |
1100 if(nRes != KErrNone) |
1092 { |
1101 { |
1093 CShell::TheConsole->Printf(_L("Error: %d\n"), nRes); |
1102 CShell::Printf(_L("Error: %d\n"), nRes); |
1094 return nRes; //-- can't get information about the drive |
1103 return nRes; //-- can't get information about the drive |
1095 } |
1104 } |
1096 |
1105 |
1097 |
1106 |
1098 nRes = aFs.Volume(volInfo, aDrvNum); |
1107 nRes = aFs.Volume(volInfo, aDrvNum); |
1099 const TBool bVolumeOK = (nRes == KErrNone); |
1108 const TBool bVolumeOK = (nRes == KErrNone); |
1100 if(!bVolumeOK) |
1109 if(!bVolumeOK) |
1101 {//-- can't get information about the volume. It might be just corrupt/unformatted |
1110 {//-- can't get information about the volume. It might be just corrupt/unformatted |
1102 CShell::TheConsole->Printf(_L("Error getting volume info. code: %d\n"), nRes); |
1111 CShell::Printf(_L("Error getting volume info. code: %d\n"), nRes); |
1103 if(nRes == KErrCorrupt) |
1112 if(nRes == KErrCorrupt) |
1104 { |
1113 { |
1105 CShell::TheConsole->Printf(_L("The volume might be corrupted or not formatted.\n")); |
1114 CShell::Printf(_L("The volume might be corrupted or not formatted.\n")); |
1106 } |
1115 } |
1107 } |
1116 } |
1108 |
1117 |
1109 |
1118 |
1110 //-- Print out information about file system installed |
1119 //-- Print out information about file system installed |
1111 if(aFlags & EFSInfo) |
1120 if(aFlags & EFSInfo) |
1112 { |
1121 { |
1113 //-- print out drive properties |
1122 //-- print out drive properties |
1114 Buf.Format(_L("\nDrive %c: No:%d"), 'A'+aDrvNum, aDrvNum); |
1123 Buf.Format(_L("Drive %c: No:%d"), 'A'+aDrvNum, aDrvNum); |
1115 |
1124 |
1116 //-- find out if the drive is synchronous / asynchronous |
1125 //-- find out if the drive is synchronous / asynchronous |
1117 TPckgBuf<TBool> drvSyncBuf; |
1126 TPckgBuf<TBool> drvSyncBuf; |
1118 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveSync, drvSyncBuf); |
1127 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveSync, drvSyncBuf); |
1119 if(nRes == KErrNone) |
1128 if(nRes == KErrNone) |
1120 { |
1129 { |
1121 Buf.AppendFormat(_L(", Sync:%d"), drvSyncBuf() ? 1:0); |
1130 Buf.AppendFormat(_L(" Sync:%d"), drvSyncBuf() ? 1:0); |
1122 } |
1131 } |
1123 |
1132 |
1124 //-- find out if drive runs a rugged FS (debug mode only) |
1133 //-- find out if drive runs a rugged FS (debug mode only) |
1125 const TInt KControlIoIsRugged=4; |
1134 const TInt KControlIoIsRugged=4; |
1126 TUint8 ruggedFS; |
1135 TUint8 ruggedFS; |
1127 TPtr8 pRugged(&ruggedFS, 1, 1); |
1136 TPtr8 pRugged(&ruggedFS, 1, 1); |
1128 nRes=aFs.ControlIo(aDrvNum, KControlIoIsRugged, pRugged); |
1137 nRes=aFs.ControlIo(aDrvNum, KControlIoIsRugged, pRugged); |
1129 if(nRes == KErrNone) |
1138 if(nRes == KErrNone) |
1130 { |
1139 { |
1131 Buf.AppendFormat(_L(", Rugged:%d"), ruggedFS ? 1:0); |
1140 Buf.AppendFormat(_L(" Rugged:%d"), ruggedFS ? 1:0); |
1132 } |
1141 } |
1133 |
1142 |
1134 Buf.Append(_L("\n")); |
1143 CShell::Printf(KNl); |
1135 apConsole->Printf(Buf); |
1144 Buf.Append(KNl); |
1136 |
1145 CShell::Printf(Buf); |
1137 |
1146 |
1138 //-- print the FS name |
1147 //-- print the FS name |
1139 if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone) |
1148 if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone) |
1140 { |
1149 { |
1141 TFSName fsName; |
1150 TFSName fsName; |
1193 } |
1201 } |
1194 |
1202 |
1195 //-- print out cluster size that FS reported |
1203 //-- print out cluster size that FS reported |
1196 TVolumeIOParamInfo volIoInfo; |
1204 TVolumeIOParamInfo volIoInfo; |
1197 nRes = aFs.VolumeIOParam(aDrvNum, volIoInfo); |
1205 nRes = aFs.VolumeIOParam(aDrvNum, volIoInfo); |
1198 if(nRes == KErrNone && volIoInfo.iClusterSize >= 512) |
1206 if(nRes == KErrNone) |
1199 { |
1207 { |
1200 Buf.AppendFormat(_L(", Cluster Sz:%d"), volIoInfo.iClusterSize); |
1208 if(volIoInfo.iBlockSize >= 0) |
|
1209 { |
|
1210 Buf.AppendFormat(_L("BlkSz:%d "), volIoInfo.iBlockSize); |
|
1211 } |
|
1212 |
|
1213 if(volIoInfo.iClusterSize >= 0) |
|
1214 { |
|
1215 Buf.AppendFormat(_L("ClSz:%d "), volIoInfo.iClusterSize); |
|
1216 } |
|
1217 |
|
1218 Buf.AppendFormat(_L("CacheFlags:0x%x "), volInfo.iFileCacheFlags); |
|
1219 |
1201 } |
1220 } |
|
1221 |
1202 |
1222 |
1203 if(Buf.Length()) |
1223 if(Buf.Length()) |
1204 { |
1224 { |
1205 Buf.Append(_L("\n")); |
1225 Buf.Append(KNl); |
1206 apConsole->Printf(Buf); |
1226 CShell::Printf(Buf); |
1207 } |
1227 } |
1208 |
1228 |
1209 } |
1229 } |
1210 } |
1230 } |
1211 }//if(aFlags & EFSInfo) |
1231 }//if(aFlags & EFSInfo) |
1212 |
1232 |
1213 //-- print media attributes |
1233 //-- print media attributes |
1214 if(aFlags & EMediaTypeInfo) |
1234 if(aFlags & EMediaTypeInfo) |
1215 { |
1235 { |
1216 FormatDrvMediaTypeInfo(driveInfo, Buf); |
1236 FormatDrvMediaTypeInfo(driveInfo, Buf); |
1217 apConsole->Printf(Buf); |
1237 CShell::Printf(Buf); |
1218 |
|
1219 } |
1238 } |
1220 |
1239 |
1221 //-- print drive attributes |
1240 //-- print drive attributes |
1222 if(aFlags & EDrvAttInfo) |
1241 if(aFlags & EDrvAttInfo) |
1223 { |
1242 { |
1224 FormatDriveAttInfo(driveInfo, Buf); |
1243 FormatDriveAttInfo(driveInfo, Buf); |
1225 apConsole->Printf(Buf); |
1244 CShell::Printf(Buf); |
1226 } |
1245 } |
1227 |
1246 |
1228 //-- print media attributes |
1247 //-- print media attributes |
1229 if(aFlags & EMediaAttInfo) |
1248 if(aFlags & EMediaAttInfo) |
1230 { |
1249 { |
1231 FormatMediaAttInfo(driveInfo, Buf); |
1250 FormatMediaAttInfo(driveInfo, Buf); |
1232 apConsole->Printf(Buf); |
1251 CShell::Printf(Buf); |
1233 } |
1252 } |
1234 |
1253 |
1235 |
1254 |
1236 //-- print volume information |
1255 //-- print volume information |
1237 if(bVolumeOK && (aFlags & EVolInfo)) |
1256 if(bVolumeOK && (aFlags & EVolInfo)) |
1238 { |
1257 { |
1239 FormatVolInfo(volInfo, Buf); |
1258 FormatVolInfo(volInfo, Buf); |
1240 apConsole->Printf(Buf); |
1259 CShell::Printf(Buf); |
1241 } |
1260 } |
1242 |
1261 |
1243 return KErrNone; |
1262 return KErrNone; |
1244 } |
1263 } |
1245 |
1264 |
1318 |
1337 |
1319 //-- get drives list |
1338 //-- get drives list |
1320 nRes=TheShell->TheFs.DriveList(driveList); |
1339 nRes=TheShell->TheFs.DriveList(driveList); |
1321 if(nRes != KErrNone) |
1340 if(nRes != KErrNone) |
1322 { |
1341 { |
1323 CShell::TheConsole->Printf(_L("\nError: %d"), nRes); |
1342 CShell::Printf(_L("\nError: %d"), nRes); |
1324 return nRes; |
1343 return nRes; |
1325 } |
1344 } |
1326 |
1345 |
1327 if(nDrv >=0) |
1346 if(nDrv >=0) |
1328 {//-- the drive is specified |
1347 {//-- the drive is specified |
1329 if(!driveList[nDrv]) |
1348 if(!driveList[nDrv]) |
1330 { |
1349 { |
1331 CShell::TheConsole->Printf(_L("Invalid drive specification\n")); |
1350 CShell::Printf(_L("Invalid drive specification\n")); |
1332 return KErrNone; |
1351 return KErrNone; |
1333 } |
1352 } |
1334 |
1353 |
1335 PrintDrvInfo(TheShell->TheFs, nDrv, CShell::TheConsole); |
1354 PrintDrvInfo(TheShell->TheFs, nDrv); |
1336 } |
1355 } |
1337 else |
1356 else |
1338 {//-- print information about all drives in the system |
1357 {//-- print information about all drives in the system |
1339 for (nDrv=0; nDrv < KMaxDrives; nDrv++) |
1358 for (nDrv=0; nDrv < KMaxDrives; nDrv++) |
1340 { |
1359 { |
1341 if(!driveList[nDrv]) |
1360 if(!driveList[nDrv]) |
1342 continue; //-- skip unexisting drive |
1361 continue; //-- skip unexisting drive |
1343 |
1362 |
1344 PrintDrvInfo(TheShell->TheFs, nDrv, CShell::TheConsole); |
1363 PrintDrvInfo(TheShell->TheFs, nDrv); |
1345 |
1364 |
1346 if(aSwitches & TShellCommand::EPSwitch) |
1365 if(aSwitches & TShellCommand::EPSwitch) |
1347 {//-- /p switch, pause after each drive |
1366 {//-- /p switch, pause after each drive |
1348 CShell::TheConsole->Printf(_L("\n--- press any key to continue or Esc to exit ---\n")); |
1367 CShell::Printf(_L("\n--- press any key to continue or Esc to exit ---\n")); |
1349 |
1368 |
1350 TKeyCode key = CShell::TheConsole->Getch(); |
1369 TKeyCode key = CShell::TheConsole->Getch(); |
1351 if (key==EKeyEscape) |
1370 if (key==EKeyEscape) |
1352 break; |
1371 break; |
1353 } |
1372 } |
1354 else |
1373 else |
1355 { |
1374 { |
1356 CShell::TheConsole->Printf(_L("\n----------\n")); |
1375 CShell::Printf(_L("\n----------\n")); |
|
1376 CShell::Printf(_L("\n--- press any key to continue or Esc to exit ---\n")); |
|
1377 |
1357 } |
1378 } |
1358 } |
1379 } |
1359 } |
1380 } |
1360 |
1381 |
1361 return KErrNone; |
1382 return KErrNone; |
1400 |
1421 |
1401 |
1422 |
1402 |
1423 |
1403 |
1424 |
1404 //----------------------------------------------------------------------------------------------------------------------- |
1425 //----------------------------------------------------------------------------------------------------------------------- |
1405 TInt DoDismountFS(RFs& aFs, TInt aDrvNum) |
1426 TInt DoDismountFS(RFs& aFs, TInt aDrvNum, TBool aForceDismount) |
1406 { |
1427 { |
1407 TInt nRes; |
1428 TInt nRes; |
1408 TBuf<40> fsName; |
1429 TBuf<40> fsName; |
1409 |
1430 |
1410 nRes = aFs.FileSystemName(fsName, aDrvNum); |
1431 nRes = aFs.FileSystemName(fsName, aDrvNum); |
1411 |
1432 |
1412 if(nRes != KErrNone) |
1433 if(nRes != KErrNone) |
1413 return KErrNotFound;//-- nothing to dismount |
1434 return KErrNotFound;//-- nothing to dismount |
1414 |
1435 |
|
1436 if(!aForceDismount) |
|
1437 {//-- gaceful attempt to dismount the FS |
1415 nRes = aFs.DismountFileSystem(fsName, aDrvNum); |
1438 nRes = aFs.DismountFileSystem(fsName, aDrvNum); |
1416 if(nRes != KErrNone) |
1439 if(nRes != KErrNone) |
1417 { |
1440 { |
1418 CShell::TheConsole->Printf(_L("Can't dismount FS!\n")); |
1441 CShell::TheConsole->Printf(_L("Can't dismount FS!\n")); |
1419 return nRes; |
1442 return nRes; |
1420 } |
1443 } |
1421 else |
1444 else |
1422 { |
1445 { |
1423 CShell::TheConsole->Printf(_L("'%S' filesystem dismounted from drive %c:\n"), &fsName, 'A'+aDrvNum); |
1446 CShell::TheConsole->Printf(_L("'%S' filesystem dismounted from drive %c:\n"), &fsName, 'A'+aDrvNum); |
1424 return KErrNone; |
1447 return KErrNone; |
|
1448 } |
|
1449 } |
|
1450 else |
|
1451 {//-- dismount by force |
|
1452 TRequestStatus rqStat; |
|
1453 aFs.NotifyDismount(aDrvNum, rqStat, EFsDismountForceDismount); |
|
1454 User::WaitForRequest(rqStat); |
|
1455 |
|
1456 CShell::TheConsole->Printf(_L("'%S' filesystem Forcedly dismounted from drive %c:\n"), &fsName, 'A'+aDrvNum); |
|
1457 |
|
1458 return rqStat.Int(); |
1425 } |
1459 } |
1426 } |
1460 } |
1427 |
1461 |
1428 //----------------------------------------------------------------------------------------------------------------------- |
1462 //----------------------------------------------------------------------------------------------------------------------- |
1429 TInt DoRemountFS(RFs& aFs, TInt aDrvNum) |
1463 TInt DoRemountFS(RFs& aFs, TInt aDrvNum) |
1497 |
1531 |
1498 //----------------------------------------------------------------------------------------------------------------------- |
1532 //----------------------------------------------------------------------------------------------------------------------- |
1499 /** |
1533 /** |
1500 Mount or dismount the file system on the specified drive. |
1534 Mount or dismount the file system on the specified drive. |
1501 |
1535 |
1502 MOUNT <DriveLetter:[\]> <FSY:xxx> <FS:yyy> [PEXT:zzz] [/S] [/U] |
1536 MOUNT <DriveLetter:[\]> <FSY:xxx> <FS:yyy> [PEXT:zzz] [/S] [/U] [/F] |
1503 |
1537 |
1504 xxx is the *.fsy file system plugin name, like "elocal.fsy" or "elocal" |
1538 xxx is the *.fsy file system plugin name, like "elocal.fsy" or "elocal" |
1505 yyy is the file system name that the fsy module exports, like "FAT" |
1539 yyy is the file system name that the fsy module exports, like "FAT" |
1506 zzz is the optional parameter that specifies primary extension name |
1540 zzz is the optional parameter that specifies primary extension name |
1507 |
1541 |
1508 /u dismounts a filesystem on the specified drive; e.g. "mount d: /u" |
1542 /u dismounts a filesystem on the specified drive; e.g. "mount d: /u" |
1509 /s for mounting FS specifies that the drive will be mounted as synchronous one. |
1543 additional switch /f in conjunction with /u will perform "forced unmounting" i.e. unmounting the FS |
1510 /f for forcing mounting the FS; the previous one will be automatically dismounted |
1544 even it has opened files and / or directories. E.g. "mount d: /u /f" |
1511 /r remount existing FS (dismount and mount it back) |
1545 |
|
1546 |
|
1547 /s for mounting FS specifies that the drive will be mounted as a synchronous one. |
|
1548 |
|
1549 |
|
1550 /f for forcing mounting the FS; the previous one will be automatically dismounted. |
|
1551 example: "mount d: /f fsy:exfat fs:exfat" this command will dismount whatever FS ic currently mounted and |
|
1552 mount exFAT FS instead |
|
1553 |
|
1554 |
|
1555 |
|
1556 /r remount existing FS (dismount and mount it back); example: "mount d: /r" |
1512 */ |
1557 */ |
1513 TInt ShellFunction::MountFileSystem(TDes& aArgs, TUint aSwitches) |
1558 TInt ShellFunction::MountFileSystem(TDes& aArgs, TUint aSwitches) |
1514 { |
1559 { |
1515 ShellFunction::StripQuotes(aArgs); |
1560 ShellFunction::StripQuotes(aArgs); |
1516 aArgs.UpperCase(); |
1561 aArgs.UpperCase(); |