--- a/libraries/ltkutils/src/ltkhal.cpp Wed Sep 01 17:56:27 2010 +0100
+++ b/libraries/ltkutils/src/ltkhal.cpp Tue Sep 07 20:04:42 2010 +0100
@@ -9,9 +9,12 @@
// Initial Contributors:
// Accenture - Initial contribution
//
+#include <fshell/ltkutils.h>
#include <fshell/ltkhal.h>
#include <fshell/descriptorutils.h>
+#include <fshell/common.mmh>
#include <HAL.h>
+#include <f32file.h>
LtkUtils::CHalAttribute::CHalAttribute(TInt aAttribute, TInt aDeviceNumber, TInt aValue, TInt aError, const TDesC& aAttributeName, HBufC* aDescription)
: iAttribute(aAttribute), iDeviceNumber(aDeviceNumber), iValue(aValue), iError(aError), iAttributeName(aAttributeName), iDescription(aDescription)
@@ -341,3 +344,16 @@
CleanupStack::Pop(&buf); // attrib now owns its HBufC*
return attrib;
}
+
+EXPORT_C char LtkUtils::GetSystemDrive()
+ {
+#ifdef FSHELL_9_1_SUPPORT
+ TInt ch = EDriveC;
+ HAL::Get(HAL::ESystemDrive, ch);
+ return 'a' + ch;
+#else
+ TChar systemDrive = 'c';
+ RFs::DriveToChar(RFs::GetSystemDrive(), systemDrive);
+ return (char)(TUint)systemDrive;
+#endif
+ }