diff --git a/code/application/source/sf_app/code/include/sf_systemMng.h b/code/application/source/sf_app/code/include/sf_systemMng.h index 06d91321c..b47282ebe 100644 --- a/code/application/source/sf_app/code/include/sf_systemMng.h +++ b/code/application/source/sf_app/code/include/sf_systemMng.h @@ -17,7 +17,7 @@ extern "C" { // following define must be same to "kernel\drivers\sstar\include\mdrv_msys_io.h" -#define SF_VER_FILE_PATH SF_SD_ROOT"CAM_INFO.txt" +#define SF_VER_FILE_PATH "CAM_INFO.txt" typedef enum sfUPGRADE_STATUS_E { diff --git a/code/application/source/sf_app/code/source/systemMng/sf_systemMng.c b/code/application/source/sf_app/code/source/systemMng/sf_systemMng.c index 58ff8a309..078cd184d 100644 --- a/code/application/source/sf_app/code/source/systemMng/sf_systemMng.c +++ b/code/application/source/sf_app/code/source/systemMng/sf_systemMng.c @@ -281,11 +281,20 @@ SINT32 sf_sys_software_version_get(SF_CHAR* version) SINT32 sf_sys_camera_about(void) { SF_CHAR Temp[128] = {0}; + + char *file_path = sf_root_path_strcat(SF_VER_FILE_PATH); + if(file_path == NULL) + { + free(file_path); + return SF_FAILURE; + } + SF_PDT_PARAM_STATISTICS_S *pstaticparam = sf_statistics_param_get(); FILE *fp; - if((fp =fopen(SF_VER_FILE_PATH,"w+")) == NULL) + if((fp =fopen(file_path,"w+")) == NULL) { - MLOGE("open [%s] failed!!!\n",SF_VER_FILE_PATH); + MLOGE("open [%s] failed!!!\n",file_path); + free(file_path); return SF_FAILURE; } memset(Temp,'\0',sizeof(Temp)/sizeof(char)); @@ -321,7 +330,7 @@ SINT32 sf_sys_camera_about(void) fwrite(Temp,sizeof(char), strlen(Temp),fp); fflush(fp); fclose(fp); - + free(file_path); return SUCCESS; }