summaryrefslogtreecommitdiff
path: root/mobicore
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-03-11 18:08:16 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-03-11 18:15:01 +0100
commit15bbbb43315d8287a775cad1f9328586261d3e39 (patch)
treedc269bcf826abe64ec0450e9df3b0e5466d2cdba /mobicore
parent130c5ebd48611ce87b30cea58a4b989e2affb7a0 (diff)
downloadandroid_hardware_samsung_slsi_exynos5430-15bbbb43315d8287a775cad1f9328586261d3e39.tar.gz
android_hardware_samsung_slsi_exynos5430-15bbbb43315d8287a775cad1f9328586261d3e39.tar.xz
android_hardware_samsung_slsi_exynos5430-15bbbb43315d8287a775cad1f9328586261d3e39.zip
mobicore: Do not use /system for TbStorage
The /system partion is mount read only, so use the RegistryPath. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'mobicore')
-rw-r--r--mobicore/daemon/Daemon/FSD/FSD.cpp12
-rw-r--r--mobicore/daemon/Daemon/MobiCoreDriverDaemon.h2
-rw-r--r--mobicore/daemon/Registry/PrivateRegistry.cpp4
3 files changed, 8 insertions, 10 deletions
diff --git a/mobicore/daemon/Daemon/FSD/FSD.cpp b/mobicore/daemon/Daemon/FSD/FSD.cpp
index fa9f245..31821ae 100644
--- a/mobicore/daemon/Daemon/FSD/FSD.cpp
+++ b/mobicore/daemon/Daemon/FSD/FSD.cpp
@@ -45,7 +45,7 @@
//#define LOG_VERBOSE
#include "log.h"
-extern string getTlRegistryPath();
+extern string getRegistryPath();
extern pthread_mutex_t syncMutex;
extern pthread_cond_t syncCondition;
@@ -74,7 +74,7 @@ void FSD::run(
{
struct stat st = {0};
mcResult_t ret;
- string storage = getTlRegistryPath()+"/TbStorage";
+ string storage = getRegistryPath()+"/TbStorage";
const char* tbstpath = storage.c_str();
/*Create Tbase storage directory*/
@@ -326,7 +326,7 @@ mcResult_t FSD::FSD_LookFile(void){
FILE * pFile=NULL;
STH_FSD_message_t* sth_request=NULL;
uint32_t res=0;
- string storage = getTlRegistryPath()+"/TbStorage";
+ string storage = getRegistryPath()+"/TbStorage";
const char* tbstpath = storage.c_str();
char tadirname[TEE_UUID_STRING_SIZE+1];
char filename[2*FILENAMESIZE+1];
@@ -373,7 +373,7 @@ mcResult_t FSD::FSD_ReadFile(void){
FILE * pFile=NULL;
STH_FSD_message_t* sth_request=NULL;
uint32_t res=0;
- string storage = getTlRegistryPath()+"/TbStorage";
+ string storage = getRegistryPath()+"/TbStorage";
const char* tbstpath = storage.c_str();
char tadirname[TEE_UUID_STRING_SIZE+1];
char filename[2*FILENAMESIZE+1];
@@ -422,7 +422,7 @@ mcResult_t FSD::FSD_WriteFile(void){
STH_FSD_message_t* sth_request=NULL;
uint32_t res=0;
int stat=0;
- string storage = getTlRegistryPath()+"/TbStorage";
+ string storage = getRegistryPath()+"/TbStorage";
const char* tbstpath = storage.c_str();
char tadirname[TEE_UUID_STRING_SIZE+1];
char filename[2*FILENAMESIZE+1];
@@ -517,7 +517,7 @@ mcResult_t FSD::FSD_DeleteFile(void){
FILE * pFile=NULL;
uint32_t res=0;
STH_FSD_message_t* sth_request=NULL;
- string storage = getTlRegistryPath()+"/TbStorage";
+ string storage = getRegistryPath()+"/TbStorage";
const char* tbstpath = storage.c_str();
char tadirname[TEE_UUID_STRING_SIZE+1];
char filename[2*FILENAMESIZE+1];
diff --git a/mobicore/daemon/Daemon/MobiCoreDriverDaemon.h b/mobicore/daemon/Daemon/MobiCoreDriverDaemon.h
index 148d457..b13c8fa 100644
--- a/mobicore/daemon/Daemon/MobiCoreDriverDaemon.h
+++ b/mobicore/daemon/Daemon/MobiCoreDriverDaemon.h
@@ -48,8 +48,6 @@
#define MAX_SERVERS 2
-extern string getTlRegistryPath();
-
class MobicoreDriverResources
{
public:
diff --git a/mobicore/daemon/Registry/PrivateRegistry.cpp b/mobicore/daemon/Registry/PrivateRegistry.cpp
index 6579901..322ea07 100644
--- a/mobicore/daemon/Registry/PrivateRegistry.cpp
+++ b/mobicore/daemon/Registry/PrivateRegistry.cpp
@@ -116,7 +116,7 @@ static bool doesDirExist(const char *path)
}
//------------------------------------------------------------------------------
-static string getRegistryPath()
+string getRegistryPath()
{
string registryPath;
@@ -801,7 +801,7 @@ static int CleanupGPTAStorage(const char *basename)
DIR *dp;
struct dirent *de;
int e;
- string TAPath = getTlRegistryPath()+"/TbStorage/"+ basename;
+ string TAPath = getRegistryPath()+"/TbStorage/"+ basename;
if (NULL != (dp = opendir(TAPath.c_str()))) {
while (NULL != (de = readdir(dp))) {