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 |
1051 @param volInfo volume information |
1056 @param volInfo volume information |
1052 @param aPrintBuf buffer where the information will be printed to. |
1057 @param aPrintBuf buffer where the information will be printed to. |
1053 */ |
1058 */ |
1054 void FormatVolInfo(const TVolumeInfo& volInfo , TDes& aPrintBuf) |
1059 void FormatVolInfo(const TVolumeInfo& volInfo , TDes& aPrintBuf) |
1055 { |
1060 { |
1056 aPrintBuf.Format(_L("VolSz:%ld Free:%ld\n"),volInfo.iSize, volInfo.iFree); |
1061 aPrintBuf.Format(_L("VolSz:%ld Free:%ld"),volInfo.iSize, volInfo.iFree); |
1057 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); |
1058 } |
1063 } |
1059 |
1064 |
1060 //-------------------------------------------------------- |
1065 //-------------------------------------------------------- |
1061 |
1066 |
1062 /** Bit flags that specify which information will be printed by PrintDrvInfo() */ |
1067 /** Bit flags that specify which information will be printed by PrintDrvInfo() */ |
1081 @param apConsole pointer to the console to print information into |
1086 @param apConsole pointer to the console to print information into |
1082 @param aFlags specifies which information to print out, @see TPrintDrvInfoFlags |
1087 @param aFlags specifies which information to print out, @see TPrintDrvInfoFlags |
1083 |
1088 |
1084 @return standard error code |
1089 @return standard error code |
1085 */ |
1090 */ |
1086 TInt PrintDrvInfo(RFs& aFs, TInt aDrvNum, CConsoleBase* apConsole, TUint aFlags = EAll) |
1091 TInt PrintDrvInfo(RFs& aFs, TInt aDrvNum, TUint aFlags = EAll) |
1087 { |
1092 { |
1088 TInt nRes; |
1093 TInt nRes; |
1089 TDriveInfo driveInfo; |
1094 TDriveInfo driveInfo; |
1090 TVolumeInfo volInfo; |
1095 TVolumeInfo volInfo; |
1091 TBuf<256> Buf; |
1096 TBuf<256> Buf; |
1092 |
1097 |
1093 //-- get drive info |
1098 //-- get drive info |
1094 nRes = aFs.Drive(driveInfo, aDrvNum); |
1099 nRes = aFs.Drive(driveInfo, aDrvNum); |
1095 if(nRes != KErrNone) |
1100 if(nRes != KErrNone) |
1096 { |
1101 { |
1097 CShell::TheConsole->Printf(_L("Error: %d\n"), nRes); |
1102 CShell::Printf(_L("Error: %d\n"), nRes); |
1098 return nRes; //-- can't get information about the drive |
1103 return nRes; //-- can't get information about the drive |
1099 } |
1104 } |
1100 |
1105 |
1101 |
1106 |
1102 nRes = aFs.Volume(volInfo, aDrvNum); |
1107 nRes = aFs.Volume(volInfo, aDrvNum); |
1103 const TBool bVolumeOK = (nRes == KErrNone); |
1108 const TBool bVolumeOK = (nRes == KErrNone); |
1104 if(!bVolumeOK) |
1109 if(!bVolumeOK) |
1105 {//-- 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 |
1106 CShell::TheConsole->Printf(_L("Error getting volume info. code: %d\n"), nRes); |
1111 CShell::Printf(_L("Error getting volume info. code: %d\n"), nRes); |
1107 if(nRes == KErrCorrupt) |
1112 if(nRes == KErrCorrupt) |
1108 { |
1113 { |
1109 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")); |
1110 } |
1115 } |
1111 } |
1116 } |
1112 |
1117 |
1113 |
1118 |
1114 //-- Print out information about file system installed |
1119 //-- Print out information about file system installed |
1115 if(aFlags & EFSInfo) |
1120 if(aFlags & EFSInfo) |
1116 { |
1121 { |
1117 //-- print out drive properties |
1122 //-- print out drive properties |
1118 Buf.Format(_L("\nDrive %c: No:%d"), 'A'+aDrvNum, aDrvNum); |
1123 Buf.Format(_L("Drive %c: No:%d"), 'A'+aDrvNum, aDrvNum); |
1119 |
1124 |
1120 //-- find out if the drive is synchronous / asynchronous |
1125 //-- find out if the drive is synchronous / asynchronous |
1121 TPckgBuf<TBool> drvSyncBuf; |
1126 TPckgBuf<TBool> drvSyncBuf; |
1122 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveSync, drvSyncBuf); |
1127 nRes = aFs.QueryVolumeInfoExt(aDrvNum, EIsDriveSync, drvSyncBuf); |
1123 if(nRes == KErrNone) |
1128 if(nRes == KErrNone) |
1124 { |
1129 { |
1125 Buf.AppendFormat(_L(", Sync:%d"), drvSyncBuf() ? 1:0); |
1130 Buf.AppendFormat(_L(" Sync:%d"), drvSyncBuf() ? 1:0); |
1126 } |
1131 } |
1127 |
1132 |
1128 //-- find out if drive runs a rugged FS (debug mode only) |
1133 //-- find out if drive runs a rugged FS (debug mode only) |
1129 const TInt KControlIoIsRugged=4; |
1134 const TInt KControlIoIsRugged=4; |
1130 TUint8 ruggedFS; |
1135 TUint8 ruggedFS; |
1131 TPtr8 pRugged(&ruggedFS, 1, 1); |
1136 TPtr8 pRugged(&ruggedFS, 1, 1); |
1132 nRes=aFs.ControlIo(aDrvNum, KControlIoIsRugged, pRugged); |
1137 nRes=aFs.ControlIo(aDrvNum, KControlIoIsRugged, pRugged); |
1133 if(nRes == KErrNone) |
1138 if(nRes == KErrNone) |
1134 { |
1139 { |
1135 Buf.AppendFormat(_L(", Rugged:%d"), ruggedFS ? 1:0); |
1140 Buf.AppendFormat(_L(" Rugged:%d"), ruggedFS ? 1:0); |
1136 } |
1141 } |
1137 |
1142 |
1138 Buf.Append(_L("\n")); |
1143 CShell::Printf(KNl); |
1139 apConsole->Printf(Buf); |
1144 Buf.Append(KNl); |
1140 |
1145 CShell::Printf(Buf); |
1141 |
1146 |
1142 //-- print the FS name |
1147 //-- print the FS name |
1143 if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone) |
1148 if(aFs.FileSystemName(Buf, aDrvNum) == KErrNone) |
1144 { |
1149 { |
1145 TFSName fsName; |
1150 TFSName fsName; |
1201 nRes = aFs.VolumeIOParam(aDrvNum, volIoInfo); |
1205 nRes = aFs.VolumeIOParam(aDrvNum, volIoInfo); |
1202 if(nRes == KErrNone) |
1206 if(nRes == KErrNone) |
1203 { |
1207 { |
1204 if(volIoInfo.iBlockSize >= 0) |
1208 if(volIoInfo.iBlockSize >= 0) |
1205 { |
1209 { |
1206 Buf.AppendFormat(_L(", BlkSz:%d"), volIoInfo.iBlockSize); |
1210 Buf.AppendFormat(_L("BlkSz:%d "), volIoInfo.iBlockSize); |
1207 } |
1211 } |
1208 |
1212 |
1209 if(volIoInfo.iClusterSize >= 0) |
1213 if(volIoInfo.iClusterSize >= 0) |
1210 { |
1214 { |
1211 Buf.AppendFormat(_L(", ClSz:%d"), volIoInfo.iClusterSize); |
1215 Buf.AppendFormat(_L("ClSz:%d "), volIoInfo.iClusterSize); |
1212 } |
1216 } |
1213 |
1217 |
1214 Buf.AppendFormat(_L(", CacheFlags:0x%x"), volInfo.iFileCacheFlags); |
1218 Buf.AppendFormat(_L("CacheFlags:0x%x "), volInfo.iFileCacheFlags); |
1215 |
1219 |
1216 } |
1220 } |
1217 |
1221 |
1218 |
1222 |
1219 if(Buf.Length()) |
1223 if(Buf.Length()) |
1220 { |
1224 { |
1221 Buf.Append(_L("\n")); |
1225 Buf.Append(KNl); |
1222 apConsole->Printf(Buf); |
1226 CShell::Printf(Buf); |
1223 } |
1227 } |
1224 |
1228 |
1225 } |
1229 } |
1226 } |
1230 } |
1227 }//if(aFlags & EFSInfo) |
1231 }//if(aFlags & EFSInfo) |
1228 |
1232 |
1229 //-- print media attributes |
1233 //-- print media attributes |
1230 if(aFlags & EMediaTypeInfo) |
1234 if(aFlags & EMediaTypeInfo) |
1231 { |
1235 { |
1232 FormatDrvMediaTypeInfo(driveInfo, Buf); |
1236 FormatDrvMediaTypeInfo(driveInfo, Buf); |
1233 apConsole->Printf(Buf); |
1237 CShell::Printf(Buf); |
1234 |
|
1235 } |
1238 } |
1236 |
1239 |
1237 //-- print drive attributes |
1240 //-- print drive attributes |
1238 if(aFlags & EDrvAttInfo) |
1241 if(aFlags & EDrvAttInfo) |
1239 { |
1242 { |
1240 FormatDriveAttInfo(driveInfo, Buf); |
1243 FormatDriveAttInfo(driveInfo, Buf); |
1241 apConsole->Printf(Buf); |
1244 CShell::Printf(Buf); |
1242 } |
1245 } |
1243 |
1246 |
1244 //-- print media attributes |
1247 //-- print media attributes |
1245 if(aFlags & EMediaAttInfo) |
1248 if(aFlags & EMediaAttInfo) |
1246 { |
1249 { |
1247 FormatMediaAttInfo(driveInfo, Buf); |
1250 FormatMediaAttInfo(driveInfo, Buf); |
1248 apConsole->Printf(Buf); |
1251 CShell::Printf(Buf); |
1249 } |
1252 } |
1250 |
1253 |
1251 |
1254 |
1252 //-- print volume information |
1255 //-- print volume information |
1253 if(bVolumeOK && (aFlags & EVolInfo)) |
1256 if(bVolumeOK && (aFlags & EVolInfo)) |
1254 { |
1257 { |
1255 FormatVolInfo(volInfo, Buf); |
1258 FormatVolInfo(volInfo, Buf); |
1256 apConsole->Printf(Buf); |
1259 CShell::Printf(Buf); |
1257 } |
1260 } |
1258 |
1261 |
1259 return KErrNone; |
1262 return KErrNone; |
1260 } |
1263 } |
1261 |
1264 |
1334 |
1337 |
1335 //-- get drives list |
1338 //-- get drives list |
1336 nRes=TheShell->TheFs.DriveList(driveList); |
1339 nRes=TheShell->TheFs.DriveList(driveList); |
1337 if(nRes != KErrNone) |
1340 if(nRes != KErrNone) |
1338 { |
1341 { |
1339 CShell::TheConsole->Printf(_L("\nError: %d"), nRes); |
1342 CShell::Printf(_L("\nError: %d"), nRes); |
1340 return nRes; |
1343 return nRes; |
1341 } |
1344 } |
1342 |
1345 |
1343 if(nDrv >=0) |
1346 if(nDrv >=0) |
1344 {//-- the drive is specified |
1347 {//-- the drive is specified |
1345 if(!driveList[nDrv]) |
1348 if(!driveList[nDrv]) |
1346 { |
1349 { |
1347 CShell::TheConsole->Printf(_L("Invalid drive specification\n")); |
1350 CShell::Printf(_L("Invalid drive specification\n")); |
1348 return KErrNone; |
1351 return KErrNone; |
1349 } |
1352 } |
1350 |
1353 |
1351 PrintDrvInfo(TheShell->TheFs, nDrv, CShell::TheConsole); |
1354 PrintDrvInfo(TheShell->TheFs, nDrv); |
1352 } |
1355 } |
1353 else |
1356 else |
1354 {//-- print information about all drives in the system |
1357 {//-- print information about all drives in the system |
1355 for (nDrv=0; nDrv < KMaxDrives; nDrv++) |
1358 for (nDrv=0; nDrv < KMaxDrives; nDrv++) |
1356 { |
1359 { |
1357 if(!driveList[nDrv]) |
1360 if(!driveList[nDrv]) |
1358 continue; //-- skip unexisting drive |
1361 continue; //-- skip unexisting drive |
1359 |
1362 |
1360 PrintDrvInfo(TheShell->TheFs, nDrv, CShell::TheConsole); |
1363 PrintDrvInfo(TheShell->TheFs, nDrv); |
1361 |
1364 |
1362 if(aSwitches & TShellCommand::EPSwitch) |
1365 if(aSwitches & TShellCommand::EPSwitch) |
1363 {//-- /p switch, pause after each drive |
1366 {//-- /p switch, pause after each drive |
1364 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")); |
1365 |
1368 |
1366 TKeyCode key = CShell::TheConsole->Getch(); |
1369 TKeyCode key = CShell::TheConsole->Getch(); |
1367 if (key==EKeyEscape) |
1370 if (key==EKeyEscape) |
1368 break; |
1371 break; |
1369 } |
1372 } |
1370 else |
1373 else |
1371 { |
1374 { |
1372 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 |
1373 } |
1378 } |
1374 } |
1379 } |
1375 } |
1380 } |
1376 |
1381 |
1377 return KErrNone; |
1382 return KErrNone; |
1416 |
1421 |
1417 |
1422 |
1418 |
1423 |
1419 |
1424 |
1420 //----------------------------------------------------------------------------------------------------------------------- |
1425 //----------------------------------------------------------------------------------------------------------------------- |
1421 TInt DoDismountFS(RFs& aFs, TInt aDrvNum) |
1426 TInt DoDismountFS(RFs& aFs, TInt aDrvNum, TBool aForceDismount) |
1422 { |
1427 { |
1423 TInt nRes; |
1428 TInt nRes; |
1424 TBuf<40> fsName; |
1429 TBuf<40> fsName; |
1425 |
1430 |
1426 nRes = aFs.FileSystemName(fsName, aDrvNum); |
1431 nRes = aFs.FileSystemName(fsName, aDrvNum); |
1427 |
1432 |
1428 if(nRes != KErrNone) |
1433 if(nRes != KErrNone) |
1429 return KErrNotFound;//-- nothing to dismount |
1434 return KErrNotFound;//-- nothing to dismount |
1430 |
1435 |
|
1436 if(!aForceDismount) |
|
1437 {//-- gaceful attempt to dismount the FS |
1431 nRes = aFs.DismountFileSystem(fsName, aDrvNum); |
1438 nRes = aFs.DismountFileSystem(fsName, aDrvNum); |
1432 if(nRes != KErrNone) |
1439 if(nRes != KErrNone) |
1433 { |
1440 { |
1434 CShell::TheConsole->Printf(_L("Can't dismount FS!\n")); |
1441 CShell::TheConsole->Printf(_L("Can't dismount FS!\n")); |
1435 return nRes; |
1442 return nRes; |
1436 } |
1443 } |
1437 else |
1444 else |
1438 { |
1445 { |
1439 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); |
1440 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(); |
1441 } |
1459 } |
1442 } |
1460 } |
1443 |
1461 |
1444 //----------------------------------------------------------------------------------------------------------------------- |
1462 //----------------------------------------------------------------------------------------------------------------------- |
1445 TInt DoRemountFS(RFs& aFs, TInt aDrvNum) |
1463 TInt DoRemountFS(RFs& aFs, TInt aDrvNum) |
1513 |
1531 |
1514 //----------------------------------------------------------------------------------------------------------------------- |
1532 //----------------------------------------------------------------------------------------------------------------------- |
1515 /** |
1533 /** |
1516 Mount or dismount the file system on the specified drive. |
1534 Mount or dismount the file system on the specified drive. |
1517 |
1535 |
1518 MOUNT <DriveLetter:[\]> <FSY:xxx> <FS:yyy> [PEXT:zzz] [/S] [/U] |
1536 MOUNT <DriveLetter:[\]> <FSY:xxx> <FS:yyy> [PEXT:zzz] [/S] [/U] [/F] |
1519 |
1537 |
1520 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" |
1521 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" |
1522 zzz is the optional parameter that specifies primary extension name |
1540 zzz is the optional parameter that specifies primary extension name |
1523 |
1541 |
1524 /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" |
1525 /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 |
1526 /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" |
1527 /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" |
1528 */ |
1557 */ |
1529 TInt ShellFunction::MountFileSystem(TDes& aArgs, TUint aSwitches) |
1558 TInt ShellFunction::MountFileSystem(TDes& aArgs, TUint aSwitches) |
1530 { |
1559 { |
1531 ShellFunction::StripQuotes(aArgs); |
1560 ShellFunction::StripQuotes(aArgs); |
1532 aArgs.UpperCase(); |
1561 aArgs.UpperCase(); |