# HG changeset patch # User Tom Sutcliffe # Date 1287337392 -3600 # Node ID 849a0b46c767495c9b4cac0fff03b88d339c945c # Parent 6a26ca985d9042aeb4eb5deb792671ec413d20c0 Fixed lots of issues with installing a low-caps version of fshell from SIS file. * Fixed issue in CCommandFactory whereby some APIs like GetCommandInfoL could trigger allocations on the wrong heap or signals to the wrong thread. The symptoms were often seen as a crash in the which_00 thread when running ciftest. * Lots of build fixes for when FSHELL_PROTECTED_UIDS isn't defined and when all capabilities aren't available. * Added new platform.mmh macro FSHELL_OPEN_SIGNED. * Open signing of fshell SIS files is now supported for production S60 handsets. Build fshell with the FSHELL_OPEN_SIGNED macro defined (and without defining FSHELL_CAP_ALL or FSHELL_PROTECTED_UIDS) in your platform.mmh and submit \epoc32\fshell\fshell.unsigned.sis to https://www.symbiansigned.com/app/page/public/openSignedOnline.do . The following commands are not available when using Open Signing due to Platform Security restrictions: fdb; kerninfo; chunkinfo; svrinfo; objinfo; sudo; fsck; localdrive; ramdefrag; readmem; reboot; setcritical; setpriority. Others such as chkdeps, e32header, ps, and fshell itself will run but in a restricted capacity (for example, fshell will no longer allow you to modify files in the \sys\bin directory). * Removed commands objinfo, svrinfo, chunkinfo, readmem, fsck completely when memory access isn't present - previously they would still appear in the help but would give an error if you tried to run them. diff -r 6a26ca985d90 -r 849a0b46c767 build/common/common.mmh --- a/build/common/common.mmh Wed Oct 13 15:07:15 2010 +0100 +++ b/build/common/common.mmh Sun Oct 17 18:43:12 2010 +0100 @@ -99,11 +99,13 @@ // PlatSec. // -#ifdef FSHELL_CAP_ALL +#if defined(FSHELL_CAP_ALL) #define FSHELL_CAP_MMP_MAX all +#define FSHELL_CAP_MMP_NORMAL all -tcb // System Capabilities +#define FSHELL_CAP_TCB #define FSHELL_CAP_ALLFILES #define FSHELL_CAP_COMMDD #define FSHELL_CAP_DISKADMIN @@ -126,9 +128,28 @@ #define FSHELL_CAP_USERENVIRONMENT #define FSHELL_CAP_WRITEUSERDATA -#endif // FSHELL_CAP_ALL +#elif defined(FSHELL_OPEN_SIGNED) -#define FSHELL_CAP_MMP_NORMAL FSHELL_CAP_MMP_MAX -tcb +// According to https://www.symbiansigned.com/app/page/public/openSignedOnline.do this is the subset we're allowed +#define FSHELL_CAP_POWERMGMT +#define FSHELL_CAP_PROTSERV +#define FSHELL_CAP_READDEVICEDATA +#define FSHELL_CAP_SURROUNDINGSDD +#define FSHELL_CAP_SWEVENT +#define FSHELL_CAP_TRUSTEDUI +#define FSHELL_CAP_WRITEDEVICEDATA +#define FSHELL_CAP_LOCALSERVICES +#define FSHELL_CAP_LOCATION +#define FSHELL_CAP_NETWORKSERVICES +#define FSHELL_CAP_READUSERDATA +#define FSHELL_CAP_USERENVIRONMENT +#define FSHELL_CAP_WRITEUSERDATA + +#define FSHELL_CAP_MMP_MAX PowerMgmt ReadDeviceData WriteDeviceData TrustedUI ProtServ SwEvent NetworkServices LocalServices ReadUserData WriteUserData Location SurroundingsDD UserEnvironment +#define FSHELL_CAP_MMP_NORMAL FSHELL_CAP_MMP_MAX +// Don't define FSHELL_PROTECTED_UIDS + +#endif // FSHELL_CAP_ALL // Yuk the __GNUC__ checks are needed to support SBS which changed the CPP version that parses bld.infs and mmps... #ifndef FSHELL_ROM_INCLUDE @@ -181,7 +202,8 @@ // // fshell. // -#ifdef FSHELL_WSERV_SUPPORT // Close enough + +#if defined(FSHELL_WSERV_SUPPORT) && defined(FSHELL_CAP_READUSERDATA) // Close enough #define FSHELL_CORE_SUPPORT_SWI #endif @@ -204,7 +226,9 @@ #ifdef FSHELL_MEMORY_ACCESS_SUPPORT #define FSHELL_CORE_SUPPORT_GETSTACK #define FSHELL_CORE_SUPPORT_CHUNKINFO +#define FSHELL_CORE_SUPPORT_OBJINFO #define FSHELL_CORE_SUPPORT_SVRINFO +#define FSHELL_CORE_SUPPORT_READMEM #define FSHELL_CORE_SUPPORT_FDB #ifndef FSHELL_NO_SUPPORT_BUILTIN_REBOOT #define FSHELL_CORE_SUPPORT_BUILTIN_REBOOT @@ -343,20 +367,18 @@ #define FSHELL_CORE_SUPPORT_SMS #endif +#ifdef FSHELL_CAP_DISKADMIN +#define FSHELL_CORE_SUPPORT_FSCK +#endif // // qr3. // -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT -#define FSHELL_QR3_SUPPORT - #ifdef FSHELL_TRACE_SUPPORT #define FSHELL_QR3_SUPPORT_LOGGINGALLOCATOR #endif -#endif // FSHELL_MEMORY_ACCESS_SUPPORT - // // clogger. @@ -529,6 +551,25 @@ #define FSHELL_UID_EXTRABTRACEK 0x10286F71 #define FSHELL_UID_TESTEXECUTE 0x10286F72 #define FSHELL_UID_CONSOLEEXTENSIONS 0x10286F73 +#define FSHELL_UID_TCONSOLE 0x10286F7A +#define FSHELL_UID_TENVARGUMENTS 0x10286F7B +#define FSHELL_UID_TFSHELLARGUMENTS 0x10286F7C +#define FSHELL_UID_TLAST 0x10286F7D +#define FSHELL_UID_TNONCIFARGUMENTS 0x10286F7E +#define FSHELL_UID_TINTEGER 0x10286F8C +#define FSHELL_UID_DEFCONS 0x10286F7F +#define FSHELL_UID_GUICONS 0x10286F80 +#define FSHELL_UID_NULLCONS 0x10286F81 +#define FSHELL_UID_RCONS 0x10286F82 +#define FSHELL_UID_TEFCONS 0x10286F83 +#define FSHELL_UID_TERMINALKEYBOARDCONS 0x10286F84 +#define FSHELL_UID_VT100BTCONS 0x10286F85 +#define FSHELL_UID_VT100BUSDEVCONS 0x10286F86 +#define FSHELL_UID_VT100CONS 0x10286F87 +#define FSHELL_UID_VT100DEBUGPORT 0x10286F88 +#define FSHELL_UID_VT100TCPCONS 0x10286F89 +#define FSHELL_UID_VT100USBCONS 0x10286F8A +#define FSHELL_UID_WIN32CONS 0x10286F8B #else // Not FSHELL_PROTECTED_UIDS @@ -538,6 +579,8 @@ #define FSHELL_UID_SMS 0xE02864BE #define FSHELL_UID_BTRACE_PARSER 0xE0285E09 #define FSHELL_UID_TINTERVAL 0xE0285E0A +#define FSHELL_UID_BTINCOMINGSERIAL 0xE0285E04 +#define FSHELL_UID_BTSERIALTEST 0xE0285e14 #define FSHELL_UID_CLOGGERDEBUGROUTER 0xE02831C7 #define FSHELL_UID_COMSDBGUTIL_CLOGGER_STUB 0xE0004d0a #define FSHELL_UID_FLOGGER_CLOGGER_STUB 0xE02866D3 @@ -661,6 +704,25 @@ #define FSHELL_UID_EXTRABTRACEK 0xE0286F71 #define FSHELL_UID_TESTEXECUTE 0xE0286F72 #define FSHELL_UID_CONSOLEEXTENSIONS 0xE0286F73 +#define FSHELL_UID_TCONSOLE 0xE0286F7A +#define FSHELL_UID_TENVARGUMENTS 0xE0286F7B +#define FSHELL_UID_TFSHELLARGUMENTS 0xE0286F7C +#define FSHELL_UID_TINTEGER 0xE0286F8C +#define FSHELL_UID_TLAST 0xE0286F7D +#define FSHELL_UID_TNONCIFARGUMENTS 0xE0286F7E +#define FSHELL_UID_DEFCONS 0xE0286F7F +#define FSHELL_UID_GUICONS 0xE0286F80 +#define FSHELL_UID_NULLCONS 0xE0286F81 +#define FSHELL_UID_RCONS 0xE0286F82 +#define FSHELL_UID_TEFCONS 0xE0286F83 +#define FSHELL_UID_TERMINALKEYBOARDCONS 0xE0286F84 +#define FSHELL_UID_VT100BTCONS 0xE0286F85 +#define FSHELL_UID_VT100BUSDEVCONS 0xE0286F86 +#define FSHELL_UID_VT100CONS 0xE0286F87 +#define FSHELL_UID_VT100DEBUGPORT 0xE0286F88 +#define FSHELL_UID_VT100TCPCONS 0xE0286F89 +#define FSHELL_UID_VT100USBCONS 0xE0286F8A +#define FSHELL_UID_WIN32CONS 0xE0286F8B #endif // FSHELL_PROTECTED_UIDS diff -r 6a26ca985d90 -r 849a0b46c767 build/s60/platform_generic.mmh --- a/build/s60/platform_generic.mmh Wed Oct 13 15:07:15 2010 +0100 +++ b/build/s60/platform_generic.mmh Sun Oct 17 18:43:12 2010 +0100 @@ -12,8 +12,10 @@ #ifndef FSHELL_PLATFORM_GENERIC_MMH #define FSHELL_PLATFORM_GENERIC_MMH +#ifndef FSHELL_OPEN_SIGNED #define FSHELL_CAP_ALL #define FSHELL_PROTECTED_UIDS +#endif // Note FSHELL_PLATFORM_S60 is defined in the 3rd or 5th ed platform.mmh diff -r 6a26ca985d90 -r 849a0b46c767 commands/pubsub/pubsub.cpp --- a/commands/pubsub/pubsub.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/commands/pubsub/pubsub.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -276,7 +276,6 @@ valDes.Zero(); enum TType { EUnknown, EInt, EDes }; TType type = EUnknown; - TInt reallen = 0; TInt err = KErrNotFound; @@ -290,6 +289,7 @@ } else { + TInt reallen = 0; err = iMemAccess.GetProperty(cat, aKey, valDes, reallen); type = EDes; } diff -r 6a26ca985d90 -r 849a0b46c767 commands/swi/swi.mmp --- a/commands/swi/swi.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/commands/swi/swi.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -12,11 +12,10 @@ #include -target swi.exe +target swi.exe targettype exe uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_SWI -//capability FSHELL_CAP_MMP_NORMAL -capability All -Tcb +capability FSHELL_CAP_MMP_NORMAL userinclude . #include diff -r 6a26ca985d90 -r 849a0b46c767 commands/uidinfo/uidinfo.cpp --- a/commands/uidinfo/uidinfo.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/commands/uidinfo/uidinfo.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -77,7 +77,7 @@ if (iStdin) { Stdin().SetReadModeL(RIoReadHandle::ELine); - TBuf<512> lineBuf; // Note, the code below doesn't properly handle the situation where a given line of input in longer than this buffer. + TBuf<512> lineBuf; // Note, the code below doesn't properly handle the situation where a given line of input is longer than this buffer. while (ETrue) { TInt err = Stdin().Read(lineBuf); diff -r 6a26ca985d90 -r 849a0b46c767 core/builtins/ps.cpp --- a/core/builtins/ps.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/builtins/ps.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -551,6 +551,8 @@ } } +#ifdef FSHELL_MEMORY_ACCESS_SUPPORT + void ReleaseCodesegMutex(TAny* aMemAccess) { static_cast(aMemAccess)->ReleaseCodeSegMutex(); @@ -575,6 +577,8 @@ CleanupStack::PopAndDestroy(); // ReleaseCodesegMutex } +#endif + #ifdef EXE_BUILD EXE_BOILER_PLATE(CCmdPs) #endif diff -r 6a26ca985d90 -r 849a0b46c767 core/group/bld.inf --- a/core/group/bld.inf Wed Oct 13 15:07:15 2010 +0100 +++ b/core/group/bld.inf Sun Oct 17 18:43:12 2010 +0100 @@ -59,7 +59,9 @@ ..\builtins\time.cif z:\resource\cif\fshell\time.cif ..\builtins\repeat.cif z:\resource\cif\fshell\repeat.cif ..\builtins\debug.cif z:\resource\cif\fshell\debug.cif +#ifdef FSHELL_CORE_SUPPORT_READMEM ..\builtins\readmem.cif z:\resource\cif\fshell\readmem.cif +#endif ..\builtins\e32header.cif z:\resource\cif\fshell\e32header.cif ..\builtins\objinfo.cif z:\resource\cif\fshell\objinfo.cif ..\builtins\touch.cif z:\resource\cif\fshell\touch.cif diff -r 6a26ca985d90 -r 849a0b46c767 core/group/fshell_core.iby --- a/core/group/fshell_core.iby Wed Oct 13 15:07:15 2010 +0100 +++ b/core/group/fshell_core.iby Sun Oct 17 18:43:12 2010 +0100 @@ -125,12 +125,18 @@ FSHELL_COMMAND_INFO_FILE(fshell,infoprint.cif) FSHELL_COMMAND_INFO_FILE(fshell,rdebug.cif) FSHELL_COMMAND_INFO_FILE(fshell,date.cif) +#ifdef FSHELL_CORE_SUPPORT_FSCK FSHELL_COMMAND_INFO_FILE(fshell,fsck.cif) +#endif FSHELL_COMMAND_INFO_FILE(fshell,fuser.cif) FSHELL_COMMAND_INFO_FILE(fshell,gobble.cif) FSHELL_COMMAND_INFO_FILE(fshell,driver.cif) +#ifdef FSHELL_CORE_SUPPORT_CHUNKINFO FSHELL_COMMAND_INFO_FILE(fshell,chunkinfo.cif) +#endif +#ifdef FSHELL_CORE_SUPPORT_SVRINFO FSHELL_COMMAND_INFO_FILE(fshell,svrinfo.cif) +#endif FSHELL_COMMAND_INFO_FILE(fshell,tickle.cif) FSHELL_COMMAND_INFO_FILE(fshell,ticks.cif) FSHELL_COMMAND_INFO_FILE(fshell,uptime.cif) @@ -142,9 +148,13 @@ FSHELL_COMMAND_INFO_FILE(fshell,time.cif) FSHELL_COMMAND_INFO_FILE(fshell,repeat.cif) FSHELL_COMMAND_INFO_FILE(fshell,debug.cif) +#ifdef FSHELL_CORE_SUPPORT_READMEM FSHELL_COMMAND_INFO_FILE(fshell,readmem.cif) +#endif FSHELL_COMMAND_INFO_FILE(fshell,e32header.cif) +#ifdef FSHELL_CORE_SUPPORT_OBJINFO FSHELL_COMMAND_INFO_FILE(fshell,objinfo.cif) +#endif FSHELL_COMMAND_INFO_FILE(fshell,touch.cif) FSHELL_COMMAND_INFO_FILE(fshell,dialog.cif) FSHELL_COMMAND_INFO_FILE(fshell,jit.cif) @@ -209,6 +219,7 @@ FSHELL_EXECUTABLE_FILE(tlast.exe) FSHELL_EXECUTABLE_FILE(tconsole.exe) +FSHELL_EXECUTABLE_FILE(fshell_tinteger.exe) FSHELL_EXECUTABLE_FILE(tfshellarguments.exe) FSHELL_EXECUTABLE_FILE(tenvarguments.exe) FSHELL_EXECUTABLE_FILE(tnoncifenvarguments.exe) diff -r 6a26ca985d90 -r 849a0b46c767 core/src/command_factory.cpp --- a/core/src/command_factory.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/src/command_factory.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -238,7 +238,7 @@ } CCommandFactory::CCommandFactory(RFs& aFs) - : CActive(CActive::EPriorityStandard), iFs(aFs) + : CActive(CActive::EPriorityStandard), iFs(aFs), iFactoryThreadId(RThread().Id()), iFactoryAllocator(&User::Allocator()) #ifdef __WINS__ , iFailedToScanFileSystem(ETrue) #endif @@ -289,10 +289,16 @@ AddThreadCommandL(CCmdInfoPrint::NewLC); AddThreadCommandL(CCmdRDebug::NewLC); AddThreadCommandL(CCmdDate::NewLC); +#ifdef FSHELL_CORE_SUPPORT_FSCK AddThreadCommandL(CCmdFsck::NewLC); +#endif AddThreadCommandL(CCmdDriver::NewLC); +#ifdef FSHELL_CORE_SUPPORT_CHUNKINFO AddThreadCommandL(CCmdChunkInfo::NewLC); +#endif +#ifdef FSHELL_CORE_SUPPORT_SVRINFO AddThreadCommandL(CCmdSvrInfo::NewLC); +#endif AddThreadCommandL(CCmdXmodem::NewLC); AddThreadCommandL(CCmdYmodem::NewLC); AddThreadCommandL(CCmdTickle::NewLC); @@ -303,9 +309,13 @@ AddThreadCommandL(CCmdTime::NewLC); AddThreadCommandL(CCmdRepeat::NewLC); // TODO: Should this have EUpdateEnvironment? It seems weird that source and foreach do but repeat doesn't. -TomS AddThreadCommandL(CCmdDebug::NewLC); +#ifdef FSHELL_CORE_SUPPORT_READMEM AddThreadCommandL(CCmdReadMem::NewLC); +#endif AddThreadCommandL(CCmdE32Header::NewLC); +#ifdef FSHELL_CORE_SUPPORT_OBJINFO AddThreadCommandL(CCmdObjInfo::NewLC); +#endif AddThreadCommandL(CCmdVersion::NewLC); AddThreadCommandL(CCmdTouch::NewLC); AddThreadCommandL(CCmdDialog::NewLC); @@ -317,7 +327,7 @@ #endif AddThreadCommandL(CCmdDebugPort::NewLC); AddThreadCommandL(CCmdRom::NewLC); - AddThreadCommandL(CCmdWhich::NewLC, CThreadCommand::ESharedHeap); + AddThreadCommandL(CCmdWhich::NewLC, CThreadCommand::ESharedHeap); // The 'which' command might reasonably want the list of external commands to be generated, meaning it has to share the main heap AddThreadCommandL(CCmdTee::NewLC); AddThreadCommandL(CCmdError::NewLC); #ifdef FSHELL_CORE_SUPPORT_BUILTIN_REBOOT @@ -360,7 +370,8 @@ void CCommandFactory::WatchFileSystem() { - if (!IsActive()) + // We can't call NotifyChange if we're not the thread that the active object was originally queued in + if (RThread().Id() == iFactoryThreadId && !IsActive()) { _LIT(KExecutableDir, "?:\\sys\\bin\\"); iFs.NotifyChange(ENotifyAll, iStatus, KExecutableDir); @@ -444,7 +455,8 @@ void CCommandFactory::CheckExternalCommands() { - if (!iFailedToScanFileSystem && !iFileSystemScanned) + // We can't update anything if we're not using the same allocator as the factory object + if (&User::Allocator() == iFactoryAllocator && !iFailedToScanFileSystem && !iFileSystemScanned) { TRAPD(err, FindExternalCommandsL()); // Will fail with KErrPermissionDenied if we don't have TCB. if (err == KErrNone) diff -r 6a26ca985d90 -r 849a0b46c767 core/src/command_factory.h --- a/core/src/command_factory.h Wed Oct 13 15:07:15 2010 +0100 +++ b/core/src/command_factory.h Sun Oct 17 18:43:12 2010 +0100 @@ -58,6 +58,8 @@ TDriveList iDriveList; TBool iFileSystemScanned; TBool iFailedToScanFileSystem; + TThreadId iFactoryThreadId; // The one the CCommandFactory active object lives in + RAllocator* iFactoryAllocator; }; diff -r 6a26ca985d90 -r 849a0b46c767 core/src/commands.cpp --- a/core/src/commands.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/src/commands.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -283,7 +283,9 @@ else { CDir* files; - LeaveIfErr(FsL().GetDir(iFileName, iOptAll ? KEntryAttMaskSupported : KEntryAttNormal | KEntryAttDir, ESortByName, files), _L("Couldn't read whole directory into memory - try using -1")); + TInt err = FsL().GetDir(iFileName, iOptAll ? KEntryAttMaskSupported : KEntryAttNormal | KEntryAttDir, ESortByName, files); + if (err == KErrNoMemory) LeaveIfErr(err, _L("Couldn't read whole directory into memory - try using --one option")); + else LeaveIfErr(err, _L("Couldn't read directory")); CleanupStack::PushL(files); PrintDirContentL(*files); CleanupStack::PopAndDestroy(files); @@ -2520,6 +2522,8 @@ } +#ifdef FSHELL_CORE_SUPPORT_FSCK + // // CCmdFsck. // @@ -2584,6 +2588,8 @@ aArguments.AppendStringL(iDriveLetter, KCmdFsckArg); } +#endif // FSHELL_CORE_SUPPORT_FSCK + // // CCmdDriver. @@ -2691,6 +2697,8 @@ } +#ifdef FSHELL_CORE_SUPPORT_CHUNKINFO + // // CCmdChunkInfo. // @@ -2716,7 +2724,6 @@ void CCmdChunkInfo::ListChunksL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT TInt bufSize = 1024; TInt err = KErrNone; HBufC8* addressesBuf; @@ -2794,12 +2801,10 @@ } CleanupStack::PopAndDestroy(addressesBuf); -#endif } void CCmdChunkInfo::PrintChunkInfoL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT TChunkKernelInfo chunkInfo; TPckg chunkInfoPckg(chunkInfo); TInt err = iMemAccess.GetObjectInfo(EChunk, (TUint8*)iAddress, chunkInfoPckg); @@ -2870,7 +2875,6 @@ PrintWarning(_L("Unable to read RHeap info: %d"), err); } } -#endif } void CCmdChunkInfo::PrintSizeL(const TDesC& aCaption, TInt aSize) @@ -2914,7 +2918,6 @@ void CCmdChunkInfo::DoRunL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT iFormatter = CTextFormatter::NewL(Stdout()); iBuf = IoUtils::CTextBuffer::NewL(0x100); LoadMemoryAccessL(); @@ -2941,10 +2944,6 @@ DoPrintL(); } } -#else - PrintError(KErrNotSupported, _L("Unable to fetch chunk information because fshell was not built with FSHELL_MEMORY_ACCESS_SUPPORT defined. That probably means this plaform doesn't support the MemoryAccess device driver.")); - User::Leave(KErrNotSupported); -#endif } void CCmdChunkInfo::OptionsL(RCommandOptionList& aOptions) @@ -2969,6 +2968,10 @@ aArguments.AppendUintL(iAddress, KCmdChunkInfoArg); } +#endif // FSHELL_CORE_SUPPORT_CHUNKINFO + + +#ifdef FSHELL_CORE_SUPPORT_SVRINFO // // CCmdSvrInfo. @@ -2994,7 +2997,6 @@ void CCmdSvrInfo::ListServersL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT TInt bufSize = 1024; TInt err = KErrNone; HBufC8* addressesBuf; @@ -3046,13 +3048,10 @@ } CleanupStack::PopAndDestroy(addressesBuf); - -#endif } void CCmdSvrInfo::ListSessionsL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT TPckg serverInfoPckg(iServerInfo); TInt err = iMemAccess.GetObjectInfo(EServer, (TUint8*)iAddress, serverInfoPckg); if (err) @@ -3110,7 +3109,6 @@ } } } -#endif } const TDesC& CCmdSvrInfo::Name() const @@ -3121,7 +3119,6 @@ void CCmdSvrInfo::DoRunL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT iFormatter = CTextFormatter::NewL(Stdout()); iBuf = IoUtils::CTextBuffer::NewL(0x100); LoadMemoryAccessL(); @@ -3137,10 +3134,6 @@ iFormatter->TabulateL(0, 2, iBuf->Descriptor(), ETruncateLongestColumn); Write(iFormatter->Descriptor()); -#else - PrintError(KErrNotSupported, _L("Unable to fetch server information because fshell was not built with FSHELL_MEMORY_ACCESS_SUPPORT defined. That probably means this plaform doesn't support the MemoryAccess device driver.")); - User::Leave(KErrNotSupported); -#endif } void CCmdSvrInfo::ArgumentsL(RCommandArgumentList& aArguments) @@ -3149,6 +3142,7 @@ aArguments.AppendUintL(iAddress, KCmdSvrInfoArg); } +#endif // FSHELL_CORE_SUPPORT_SVRINFO // // CCmdTickle. @@ -4146,6 +4140,8 @@ // CCmdReadMem. // +#ifdef FSHELL_CORE_SUPPORT_READMEM + CCommandBase* CCmdReadMem::NewLC() { CCmdReadMem* self = new(ELeave) CCmdReadMem(); @@ -4170,7 +4166,6 @@ void CCmdReadMem::DoRunL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT LoadMemoryAccessL(); if (iFileName.Length() > 0) @@ -4210,11 +4205,6 @@ } bytesRead += bytesToRead; } - -#else - PrintError(KErrNotSupported, _L("Unable to read memory because fshell was not built with FSHELL_MEMORY_ACCESS_SUPPORT defined. That probably means this plaform doesn't support the MemoryAccess device driver.")); - User::Leave(KErrNotSupported); -#endif } void CCmdReadMem::OptionsL(RCommandOptionList& aOptions) @@ -4234,6 +4224,8 @@ aArguments.AppendFileNameL(iFileName, KCmdArgFileName); } +#endif // FSHELL_CORE_SUPPORT_READMEM + // // CCmdE32Header. @@ -4410,6 +4402,8 @@ // CCmdObjInfo. // +#ifdef FSHELL_CORE_SUPPORT_OBJINFO + CCommandBase* CCmdObjInfo::NewLC() { CCmdObjInfo* self = new(ELeave) CCmdObjInfo(); @@ -4432,8 +4426,6 @@ return KName; } -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT - #define CASE_RETURN_LIT(XXX) case XXX: { _LIT(_KLit, #XXX); return &_KLit; } #define DEFAULT_RETURN_LIT(XXX) default: { _LIT(_KLit, XXX); return &_KLit; } @@ -4593,11 +4585,8 @@ CleanupStack::PopAndDestroy(addressesBuf); } -#endif // FSHELL_MEMORY_ACCESS_SUPPORT - void CCmdObjInfo::DoRunL() { -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT LoadMemoryAccessL(); if (iObjectAddress) @@ -4640,11 +4629,6 @@ { PrintReferencedObjectDetailsL(EOwnerThread, iThreadId); } - -#else - PrintError(KErrNotSupported, _L("Unable to fetch object information because fshell was not built with FSHELL_MEMORY_ACCESS_SUPPORT defined. That probably means this plaform doesn't support the MemoryAccess device driver.")); - User::Leave(KErrNotSupported); -#endif } void CCmdObjInfo::OptionsL(RCommandOptionList& aOptions) @@ -4666,6 +4650,8 @@ aArguments.AppendUintL(iObjectAddress, KCmdArgObjectAddress); } +#endif // FSHELL_CORE_SUPPORT_OBJINFO + // // CCmdTouch. // diff -r 6a26ca985d90 -r 849a0b46c767 core/src/commands.h --- a/core/src/commands.h Wed Oct 13 15:07:15 2010 +0100 +++ b/core/src/commands.h Sun Oct 17 18:43:12 2010 +0100 @@ -561,6 +561,8 @@ }; +#ifdef FSHELL_CORE_SUPPORT_FSCK + class CCmdFsck : public CCommandBase { public: @@ -576,6 +578,7 @@ HBufC* iDriveLetter; }; +#endif class CCmdDriver : public CCommandBase { @@ -607,6 +610,8 @@ }; +#ifdef FSHELL_CORE_SUPPORT_CHUNKINFO + class CCmdChunkInfo : public CMemoryAccessCommandBase { public: @@ -636,6 +641,9 @@ CTextBuffer* iBuf; }; +#endif + +#ifdef FSHELL_CORE_SUPPORT_SVRINFO class CCmdSvrInfo : public CMemoryAccessCommandBase { @@ -654,16 +662,15 @@ TUint iAddress; TName iName; TFullName iFullName; -#ifdef FSHELL_MEMORY_ACCESS_SUPPORT TServerKernelInfo iServerInfo; TThreadKernelInfo iThreadInfo; TProcessKernelInfo iProcessInfo; TSessionKernelInfo iSessionInfo; -#endif CTextFormatter* iFormatter; CTextBuffer* iBuf; }; +#endif // FSHELL_CORE_SUPPORT_SVRINFO class CCmdTickle : public CCommandBase { @@ -884,6 +891,8 @@ }; +#ifdef FSHELL_CORE_SUPPORT_READMEM + class CCmdReadMem : public CMemoryAccessCommandBase { public: @@ -904,6 +913,7 @@ RFile iFile; }; +#endif // FSHELL_CORE_SUPPORT_READMEM class CCmdE32Header : public CCommandBase { @@ -924,6 +934,7 @@ CTextFormatter* iFormatter; }; +#ifdef FSHELL_CORE_SUPPORT_OBJINFO class CCmdObjInfo : public CMemoryAccessCommandBase { @@ -948,6 +959,8 @@ TBool iAll; }; +#endif + class CCmdTouch : public CCommandBase { public: diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tconsole.mmp --- a/core/tsrc/tconsole.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tconsole.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -10,8 +10,11 @@ // Accenture - Initial contribution // +#include + target tconsole.exe targettype exe +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TCONSOLE userinclude . #include diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tenvarguments.mmp --- a/core/tsrc/tenvarguments.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tenvarguments.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target tenvarguments.exe targettype exe -uid FSHELL_UID2_FSHELL_EXE 0 +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TENVARGUMENTS capability FSHELL_CAP_MMP_NORMAL userinclude . diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tfshellarguments.mmp --- a/core/tsrc/tfshellarguments.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tfshellarguments.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target tfshellarguments.exe targettype exe -uid FSHELL_UID2_FSHELL_EXE 0 +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TFSHELLARGUMENTS capability FSHELL_CAP_MMP_NORMAL userinclude . diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tinteger.mmp --- a/core/tsrc/tinteger.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tinteger.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target fshell_tinteger.exe targettype exe -uid FSHELL_UID2_FSHELL_EXE 0 +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TINTEGER capability FSHELL_CAP_MMP_NORMAL userinclude . diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tlast.mmp --- a/core/tsrc/tlast.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tlast.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target tlast.exe targettype exe -uid FSHELL_UID2_FSHELL_EXE 0 +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TLAST capability FSHELL_CAP_MMP_NORMAL userinclude . diff -r 6a26ca985d90 -r 849a0b46c767 core/tsrc/tnoncifenvarguments.mmp --- a/core/tsrc/tnoncifenvarguments.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/core/tsrc/tnoncifenvarguments.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target tnoncifenvarguments.exe targettype exe -uid FSHELL_UID2_FSHELL_EXE 0 +uid FSHELL_UID2_FSHELL_EXE FSHELL_UID_TNONCIFARGUMENTS capability FSHELL_CAP_MMP_NORMAL userinclude . diff -r 6a26ca985d90 -r 849a0b46c767 documentation/change_history.pod --- a/documentation/change_history.pod Wed Oct 13 15:07:15 2010 +0100 +++ b/documentation/change_history.pod Sun Oct 17 18:43:12 2010 +0100 @@ -20,6 +20,10 @@ =item * +Open signing of fshell SIS files is now supported for production S60 handsets. Build fshell with the C macro defined (and without defining C or C) in your platform.mmh and submit \epoc32\fshell\fshell.unsigned.sis to https://www.symbiansigned.com/app/page/public/openSignedOnline.do . The following commands are not available when using Open Signing due to Platform Security restrictions: fdb; kerninfo; chunkinfo; svrinfo; objinfo; sudo; fsck; localdrive; ramdefrag; readmem; reboot; setcritical; setpriority. Others such as chkdeps, e32header, ps, and fshell itself will run but in a restricted capacity (for example, fshell will no longer allow you to modify files in the \sys\bin directory). + +=item * + Commands can now define a C<==smoke-test> section in their CIF files, which defines a snippet of fshell script that will be run as part of C or by invoking L directly. See the ciftest documentation for more details. =item * diff -r 6a26ca985d90 -r 849a0b46c767 documentation/common_mmh.pod --- a/documentation/common_mmh.pod Wed Oct 13 15:07:15 2010 +0100 +++ b/documentation/common_mmh.pod Sun Oct 17 18:43:12 2010 +0100 @@ -40,7 +40,7 @@ =item FSHELL_REPLACE_ECONS -buildrom macro (on platforms that support it) to say that iosrv should replace econs.DLL with its own implementation. +buildrom macro to say that iosrv should replace econs.DLL with its own implementation. =item FSHELL_PLATFORM_S60 @@ -48,7 +48,7 @@ =item FSHELL_PLATFORM_FOUNDATION -Symbian Foundation platform (value of this is n, where n is Symbian^n). +Symbian Foundation platform (value of this is n, where n is Symbian^n). Currently 3 is used for Symbian^3 or greater. =item FSHELL_PLATFORM_SYMTB @@ -64,7 +64,11 @@ =item FSHELL_PROTECTED_UIDS -Protected uids (0x10xxxxxx) should be used, as opposed to unprotected (0xE0xxxxxx), for exe and dll UID3. The UIDs themselves are all defined at the bottom of common.mmh so nothing else uses this macro directly. Unprotected UIDs should only be specified if the platform produces an unsigned sis file. +Protected uids (0x10xxxxxx) should be used, as opposed to unprotected (0xE0xxxxxx), for exe and dll UID3. The UIDs themselves are all defined at the bottom of common.mmh so nothing else uses this macro directly. Unprotected UIDs should only be specified if the platform produces an unsigned or self-signed sis file. + +=item FSHELL_OPEN_SIGNED + +Shorthand for defining the set of capabilties supported by Symbian Open Signing. For more information see https://www.symbiansigned.com/app/page/public/openSignedOnline.do . FSHELL_PROTECTED_UIDS must not be defined if open signing is being used. =item FSHELL_BASE_ROM @@ -120,7 +124,7 @@ =item FSHELL_CORE_SUPPORT_USB_ICON -Create a launch icon for running fshell remotely via USB. The value of the macro is the port name to use (eg C<"ACM::1">). +Create a launch icon for running fshell remotely via USB. The value of the macro is the console-title arguments to use (eg C<"port=ACM::1">). =item FSHELL_CORE_SUPPORT_SERIAL_ICON @@ -140,11 +144,11 @@ =item FSHELL_CLOGGER_REPLACE_FLOGGER -Put "FLOGGER_clogger_stub.DLL" into the ROM file as "flogger.dll". Probably won't work for SIS install. +Put "FLOGGER_clogger_stub.DLL" into the ROM file as "flogger.dll". Should only be specified at rombuild time (ie not in the platform.mmh). =item FSHELL_CLOGGER_REPLACE_CDU -Put "COMSDBGUTIL_clogger_stub.DLL" into the ROM file as "comsdbgutil.dll". Probably won't work for SIS install. +Put "COMSDBGUTIL_clogger_stub.DLL" into the ROM file as "comsdbgutil.dll". Should only be specified at rombuild time (ie not in the platform.mmh). =item FSHELL_ROM_INCLUDE(ibyname) diff -r 6a26ca985d90 -r 849a0b46c767 libraries/clogger/group/clogger.iby --- a/libraries/clogger/group/clogger.iby Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/clogger/group/clogger.iby Sun Oct 17 18:43:12 2010 +0100 @@ -18,9 +18,10 @@ FSHELL_EXECUTABLE_FILE(Clogger.dll) FSHELL_EXECUTABLE_FILE(Clogger-buffered.dll) -#ifdef FSHELL_CLOGGER_REPLACE_FLOGGER +#if defined(FSHELL_CLOGGER_REPLACE_FLOGGER) FSHELL_RENAMED_EXECUTABLE_FILE(FLOGGER_clogger_stub.DLL, flogger.dll) -#else +#elif defined(FSHELL_CAP_ALL) +// No point including it unless we have all caps ability to rename it at runtime FSHELL_EXECUTABLE_FILE(FLOGGER_clogger_stub.DLL) #endif // FSHELL_CLOGGER_REPLACE_FLOGGER diff -r 6a26ca985d90 -r 849a0b46c767 libraries/iosrv/client/memoryaccesscmd.cpp --- a/libraries/iosrv/client/memoryaccesscmd.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/iosrv/client/memoryaccesscmd.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -42,7 +42,7 @@ } LeaveIfErr(iMemAccess.Open(), _L("Couldn't open RMemoryAccess")); #else - LeaveIfErr(KErrNotSupported, _L("Can't load memoryaccess because FSHELL_MEMORY_ACCESS_SUPPORT is not defined"); + LeaveIfErr(KErrNotSupported, _L("Can't load memoryaccess because FSHELL_MEMORY_ACCESS_SUPPORT is not defined")); #endif } diff -r 6a26ca985d90 -r 849a0b46c767 libraries/iosrv/server/console.cpp --- a/libraries/iosrv/server/console.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/iosrv/server/console.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -880,7 +880,7 @@ User::LeaveIfError(lib.Load(*dllName)); CleanupClosePushL(lib); - if ((lib.Type()[1] == KSharedLibraryUid) && (lib.Type()[2] == KConsoleDllUid)) + if ((lib.Type()[1] == KSharedLibraryUid)) { TConsoleCreateFunction entry = (TConsoleCreateFunction)lib.Lookup(1); if (!entry) User::Leave(KErrNotSupported); diff -r 6a26ca985d90 -r 849a0b46c767 libraries/ltkutils/src/w32crack.cpp --- a/libraries/ltkutils/src/w32crack.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/ltkutils/src/w32crack.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -10,12 +10,22 @@ // Accenture - Initial contribution // +#include +#include #include #include -#include #include + +#if !defined(FSHELL_WSERV_SUPPORT) || !defined(FSHELL_MEMORY_ACCESS_SUPPORT) + +EXPORT_C void LtkUtils::W32CrackL() + { + User::Leave(KErrNotSupported); + } + +#else + #include -#include #include // @@ -25,10 +35,6 @@ // EXPORT_C void LtkUtils::W32CrackL() { -#ifndef FSHELL_WSERV_SUPPORT - User::Leave(KErrNotSupported); -#else - // Check if P&S says it's already enabled, if so no need to do anything if (W32CrackIsEnabled()) return; @@ -111,9 +117,10 @@ // cleanup CleanupStack::PopAndDestroy(4, &fs); -#endif // FSHELL_WSERV_SUPPORT } +#endif // supported + EXPORT_C TBool LtkUtils::W32CrackIsEnabled() { TInt enabled = EFalse; diff -r 6a26ca985d90 -r 849a0b46c767 libraries/memoryaccess/MemoryAccess.iby --- a/libraries/memoryaccess/MemoryAccess.iby Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/memoryaccess/MemoryAccess.iby Sun Oct 17 18:43:12 2010 +0100 @@ -13,6 +13,9 @@ #define __FSHELL_MEMORYACCESS_IBY__ #include + +#ifdef FSHELL_MEMORY_ACCESS_SUPPORT FSHELL_DEVICE_DRIVER(memoryaccess-fshell.ldd) +#endif #endif diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/group/bld.inf --- a/libraries/qr3/group/bld.inf Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/group/bld.inf Sun Oct 17 18:43:12 2010 +0100 @@ -16,14 +16,12 @@ PRJ_EXPORTS FSHELL_ROM_INCLUDE(qr3.iby) -#ifdef FSHELL_QR3_SUPPORT PRJ_EXPORTS ..\inc\QR3Dll.h fshell/QR3Dll.h ..\inc\QR3ProductPlugin.h fshell/QR3ProductPlugin.h PRJ_MMPFILES qr3.mmp -#endif // FSHELL_QR3_SUPPORT #ifdef FSHELL_QR3_SUPPORT_LOGGINGALLOCATOR PRJ_EXPORTS diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/group/qr3.iby --- a/libraries/qr3/group/qr3.iby Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/group/qr3.iby Sun Oct 17 18:43:12 2010 +0100 @@ -14,8 +14,6 @@ #include -#ifdef FSHELL_QR3_SUPPORT - FSHELL_EXECUTABLE_FILE(qr3.dll) #ifdef FSHELL_QR3_SUPPORT_LOGGINGALLOCATOR @@ -23,6 +21,4 @@ FSHELL_EXECUTABLE_FILE(LoggingAllocator.dll) #endif -#endif - #endif // QR3_IBY diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/group/qr3.mmp --- a/libraries/qr3/group/qr3.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/group/qr3.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -22,24 +22,28 @@ USERINCLUDE ..\inc SOURCEPATH ..\src -SOURCE heap.cpp + SOURCE propertywatcher.cpp SOURCE keycapture.cpp +SOURCE utils.cpp SOURCE objectlist.cpp +SOURCE heap.cpp SOURCE NotifierProxy.cpp + +#ifdef FSHELL_MEMORY_ACCESS_SUPPORT SOURCE KernLbxModel.cpp SOURCE openfilesListboxdata.cpp SOURCE serverlistboxdata.cpp SOURCE threadListboxdata.cpp SOURCE featreglistboxdata.cpp SOURCE hallistboxdata.cpp -SOURCE utils.cpp SOURCE sandbox.cpp #ifdef FSHELL_WSERV_SUPPORT SOURCE wglistboxdata.cpp #endif SOURCE msgqlistboxdata.cpp mutexlistboxdata.cpp SOURCE semaphorelistboxdata.cpp timerlistboxdata.cpp +#endif #ifdef FSHELL_PLATFORM_UIQ MACRO INCLUDE_UIQ_DEFINITIONS diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/src/NotifierProxy.cpp --- a/libraries/qr3/src/NotifierProxy.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/src/NotifierProxy.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -13,7 +13,7 @@ #include #include -#ifndef FSHELL_WSERV_SUPPORT +#if !defined(FSHELL_WSERV_SUPPORT) || !defined(FSHELL_MEMORY_ACCESS_SUPPORT) EXPORT_C TInt StartNotifierProxyThreadFunction(TAny*) { diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/src/Utils.cpp --- a/libraries/qr3/src/Utils.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/src/Utils.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -16,12 +16,12 @@ #include "Utils.h" #include #include +#include #ifdef INCLUDE_UIQ_DEFINITIONS #include #endif -#include #include /* TomS: These don't seem to be used any more diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/src/heap.cpp --- a/libraries/qr3/src/heap.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/src/heap.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -9,7 +9,11 @@ // Initial Contributors: // Accenture - Initial contribution // +#include #include + +#ifdef FSHELL_MEMORY_ACCESS_SUPPORT + #include #include @@ -245,3 +249,38 @@ } //END nicked + +#else // FSHELL_MEMORY_ACCESS_SUPPORT + +EXPORT_C RProxyHeap::RProxyHeap(RMemoryAccess& aMem, TUint aThreadId) + : RHeap(), iMem(aMem), iThreadId(aThreadId) + { + } + +EXPORT_C void /*CHeapAnalyser::*/ GetHeapDetailsL(THeapDetails& aDetails, RProxyHeap& heap) + { + // This function retained for BC reasons + heap.GetHeapDetailsL(aDetails); + } + +EXPORT_C void RProxyHeap::GetHeapDetailsL(THeapDetails&) + { + User::Leave(KErrNotSupported); + } + +EXPORT_C void RProxyHeap::DumpHeapToSuitableFileInDirectoryL(TFileName&) + { + User::Leave(KErrNotSupported); + } + +EXPORT_C void RProxyHeap::DumpHeapToFileL(const TDesC&) + { + User::Leave(KErrNotSupported); + } + +EXPORT_C void RProxyHeap::DumpHeapL(RFile&) + { + User::Leave(KErrNotSupported); + } + +#endif // FSHELL_MEMORY_ACCESS_SUPPORT diff -r 6a26ca985d90 -r 849a0b46c767 libraries/qr3/src/objectlist.cpp --- a/libraries/qr3/src/objectlist.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/libraries/qr3/src/objectlist.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -9,13 +9,16 @@ // Initial Contributors: // Accenture - Initial contribution // +#include #include -#include "KernLbxModel.h" #include "Utils.h" #include -#include #include +#ifdef FSHELL_MEMORY_ACCESS_SUPPORT + +#include "KernLbxModel.h" + EXPORT_C CKernelObjectList* CKernelObjectList::NewL(RMemoryAccess* aMemAccess) { CKernelObjectList* self = new(ELeave) CKernelObjectList(aMemAccess); @@ -118,6 +121,59 @@ delete gPlugin; } +#else // not FSHELL_MEMORY_ACCESS_SUPPORT + +EXPORT_C CKernelObjectList* CKernelObjectList::NewL(RMemoryAccess*) + { + User::Leave(KErrNotSupported); + return NULL; + } + +EXPORT_C void CKernelObjectList::SetCurrentType(TKernelObjectType) + { + } + +EXPORT_C void CKernelObjectList::RefreshDataL(TInt) + { + } + +EXPORT_C MQikListBoxModel* CKernelObjectList::GetQikListBoxModel() + { + return NULL; + } + +EXPORT_C TInt CKernelObjectList::Count() const + { + return 0; + } + +EXPORT_C void CKernelObjectList::GetInfoL(TInt, RBuf&, RBuf&) + { + } + +EXPORT_C void CKernelObjectList::GetVerboseInfoL(TInt, RBuf&, RBuf&) + { + } + +EXPORT_C void CKernelObjectList::GetInfoByIdL(TInt, TBool, RBuf&, RBuf&) + { + } + +EXPORT_C TInt CKernelObjectList::GetInfoByIndexL(TInt, TBool, RBuf&, RBuf&) + { + return 0; + } + +EXPORT_C void CKernelObjectList::DumpAllInfoL(RClogger&) + { + } + +EXPORT_C void CKernelObjectList::SetInfoChangedCallback(TInt, const TCallBack&) + { + } + +#endif // FSHELL_MEMORY_ACCESS_SUPPORT + void GetNameFromApparcL(TUint aSid, RBuf& aName); void GetNameFromFsL(TUint aSid, RBuf& aName); diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/defcons/src/defcons.cpp --- a/plugins/consoles/defcons/src/defcons.cpp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/defcons/src/defcons.cpp Sun Oct 17 18:43:12 2010 +0100 @@ -242,7 +242,7 @@ TInt CDefaultConsole::TryCreateConsole(const TDesC& aImplementation) { TInt err = iConsoleLibrary.Load(aImplementation); - if ((err == KErrNone) && (iConsoleLibrary.Type()[1] == KSharedLibraryUid) && (iConsoleLibrary.Type()[2] == KConsoleDllUid)) + if ((err == KErrNone) && (iConsoleLibrary.Type()[1] == KSharedLibraryUid)) { TLibraryFunction entry = iConsoleLibrary.Lookup(1); CConsoleBase* console = (CConsoleBase*)entry(); diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/defcons/src/defcons.mmp --- a/plugins/consoles/defcons/src/defcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/defcons/src/defcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ TARGET defcons.dll TARGETTYPE dll -UID 0x1000008d 0x100039e7 +UID 0x1000008d FSHELL_UID_DEFCONS CAPABILITY FSHELL_CAP_MMP_NORMAL DEFFILE ..\..\common\~\console.def diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/guicons/group/guicons.mmp --- a/plugins/consoles/guicons/group/guicons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/guicons/group/guicons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ TARGET guicons.dll TARGETTYPE dll -UID 0x1000008d 0x100039e7 +UID 0x1000008d FSHELL_UID_GUICONS CAPABILITY FSHELL_CAP_MMP_NORMAL diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/iocons/group/iocons.mmp --- a/plugins/consoles/iocons/group/iocons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/iocons/group/iocons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target iocons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d 0x100039e7 // This really does have to have the UID3 0x100039e7 because it is designed to replace econs.dll and euser checks the uid capability FSHELL_CAP_MMP_MAX sourcepath ..\src diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/nullcons/src/nullcons.mmp --- a/plugins/consoles/nullcons/src/nullcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/nullcons/src/nullcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ TARGET nullcons.dll TARGETTYPE dll -UID 0x1000008d 0x100039e7 +UID 0x1000008d FSHELL_UID_NULLCONS CAPABILITY FSHELL_CAP_MMP_NORMAL DEFFILE ..\..\common\~\console.def diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/rcons/client/group/remote_console.mmp --- a/plugins/consoles/rcons/client/group/remote_console.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/rcons/client/group/remote_console.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target rcons.dll targettype dll -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_RCONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/tefcons/tefcons.mmp --- a/plugins/consoles/tefcons/tefcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/tefcons/tefcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ TARGET tefcons.dll TARGETTYPE dll -UID 0x1000008d 0x100039e7 +UID 0x1000008d FSHELL_UID_TEFCONS CAPABILITY FSHELL_CAP_MMP_NORMAL DEFFILE ..\common\~\console.def diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/terminalkeyboardcons/terminalkeyboardcons.mmp --- a/plugins/consoles/terminalkeyboardcons/terminalkeyboardcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/terminalkeyboardcons/terminalkeyboardcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -13,7 +13,7 @@ target terminalkeyboardcons.dll targettype DLL -uid 0x1000008d 0x100039e7 // Note this MUST be set to 0x100039e7 +uid 0x1000008d FSHELL_UID_TERMINALKEYBOARDCONS capability FSHELL_CAP_MMP_NORMAL sourcepath . diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100btcons.mmp --- a/plugins/consoles/vt100cons/group/vt100btcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100btcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100btcons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100BTCONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src\bluetooth diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100busdevcons.mmp --- a/plugins/consoles/vt100cons/group/vt100busdevcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100busdevcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100busdevcons.dll targettype DLL -uid 0x1000008d 0x100039e7 // Note this MUST be set to 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100BUSDEVCONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100cons.mmp --- a/plugins/consoles/vt100cons/group/vt100cons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100cons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100cons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100CONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src\serial diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100debugport.mmp --- a/plugins/consoles/vt100cons/group/vt100debugport.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100debugport.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100debugport.dll targettype DLL -uid 0x1000008d 0x100039e7 // Note this MUST be set to 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100DEBUGPORT capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100tcpcons.mmp --- a/plugins/consoles/vt100cons/group/vt100tcpcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100tcpcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100tcpcons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100TCPCONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src\tcp diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/vt100cons/group/vt100usbcons.mmp --- a/plugins/consoles/vt100cons/group/vt100usbcons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/vt100cons/group/vt100usbcons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target vt100usbcons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_VT100USBCONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src\usb diff -r 6a26ca985d90 -r 849a0b46c767 plugins/consoles/win32cons/group/win32cons.mmp --- a/plugins/consoles/win32cons/group/win32cons.mmp Wed Oct 13 15:07:15 2010 +0100 +++ b/plugins/consoles/win32cons/group/win32cons.mmp Sun Oct 17 18:43:12 2010 +0100 @@ -14,7 +14,7 @@ target win32cons.dll targettype DLL -uid 0x1000008d 0x100039e7 +uid 0x1000008d FSHELL_UID_WIN32CONS capability FSHELL_CAP_MMP_NORMAL sourcepath ..\src