1.dp发送文件路径调整
This commit is contained in:
parent
1539965212
commit
4ac4de21ba
|
@ -981,6 +981,7 @@
|
||||||
#define SF_CAM_UP_FILE_PATH "FW98565A.bin"
|
#define SF_CAM_UP_FILE_PATH "FW98565A.bin"
|
||||||
#define SF_CAMERA_GPS_INFO_FILENAME "/tmp/gps.txt"
|
#define SF_CAMERA_GPS_INFO_FILENAME "/tmp/gps.txt"
|
||||||
#define SF_LOW_POWER_WARN_FILENAME "/tmp/btalarm.txt"
|
#define SF_LOW_POWER_WARN_FILENAME "/tmp/btalarm.txt"
|
||||||
|
#define SF_DAILYREPORT_FILENAME "/tmp/d.txt"
|
||||||
|
|
||||||
#define SF_UBOOT_UPDATA_FW ENABLE
|
#define SF_UBOOT_UPDATA_FW ENABLE
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,6 @@ extern "C" {
|
||||||
#define SIFAR_CUSTOMER_PARAM_PATH "/misc/sfSysParm.bin"
|
#define SIFAR_CUSTOMER_PARAM_PATH "/misc/sfSysParm.bin"
|
||||||
#define SIFAR_STATISTICS_PARAM_PATH "THUMB/sfStatisticsParm.bin"
|
#define SIFAR_STATISTICS_PARAM_PATH "THUMB/sfStatisticsParm.bin"
|
||||||
//#define SF_SEND_LIST_DIR SF_SD_ROOT"THUMB"
|
//#define SF_SEND_LIST_DIR SF_SD_ROOT"THUMB"
|
||||||
#define SF_DAILYREPORT_FILENAME "THUMB/d.txt"
|
|
||||||
#define SF_ERROR_CODE "THUMB/warning.txt"
|
#define SF_ERROR_CODE "THUMB/warning.txt"
|
||||||
#define SF_DAILYREPORT_TXT "DailyReport.txt"
|
#define SF_DAILYREPORT_TXT "DailyReport.txt"
|
||||||
#define SF_LOG_TXT "log.txt"
|
#define SF_LOG_TXT "log.txt"
|
||||||
|
|
|
@ -942,26 +942,6 @@ UINT32 sf_create_dailyreport_file(void)
|
||||||
char imageSize = 0;
|
char imageSize = 0;
|
||||||
char videoSize = 0;
|
char videoSize = 0;
|
||||||
/*Avoid New Card*/
|
/*Avoid New Card*/
|
||||||
char *thumb_dir = sf_root_path_strcat(SF_THUMB_DIR);
|
|
||||||
if(thumb_dir == NULL)
|
|
||||||
{
|
|
||||||
free(thumb_dir);
|
|
||||||
return SF_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (access(thumb_dir, F_OK) == -1) {
|
|
||||||
printf("%s directory does not exist. Creating...\n", thumb_dir);
|
|
||||||
|
|
||||||
if (mkdir(thumb_dir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
|
|
||||||
perror("mkdir() error");
|
|
||||||
} else {
|
|
||||||
printf("%s directory created.\n", thumb_dir);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
printf("%s directory exists.\n", thumb_dir);
|
|
||||||
}
|
|
||||||
free(thumb_dir);
|
|
||||||
//sf_create_thumb_dir();
|
|
||||||
|
|
||||||
if(SF_CAMID_ON == pPara->CamNameSwitch)
|
if(SF_CAMID_ON == pPara->CamNameSwitch)
|
||||||
{
|
{
|
||||||
|
@ -1287,20 +1267,14 @@ UINT32 sf_create_dailyreport_file(void)
|
||||||
printf("szTmp2=%s\n",szTmp2);
|
printf("szTmp2=%s\n",szTmp2);
|
||||||
printf("cfgTmp:%s\n", cfgTmp);
|
printf("cfgTmp:%s\n", cfgTmp);
|
||||||
|
|
||||||
char *dailyrp_file = sf_root_path_strcat(SF_DAILYREPORT_FILENAME);
|
|
||||||
if(dailyrp_file == NULL)
|
if(sf_file_IsExsit(SF_DAILYREPORT_FILENAME) == SF_TRUE){
|
||||||
{
|
sf_file_remove(SF_DAILYREPORT_FILENAME);
|
||||||
free(dailyrp_file);
|
|
||||||
return SF_FAILURE;
|
|
||||||
}
|
|
||||||
if(sf_file_IsExsit(dailyrp_file) == SF_TRUE){
|
|
||||||
sf_file_remove(dailyrp_file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = open(dailyrp_file, O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
|
fd = open(SF_DAILYREPORT_FILENAME, O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
|
||||||
if(fd)
|
if(fd)
|
||||||
{
|
{
|
||||||
free(dailyrp_file);
|
|
||||||
szTmpsize=SF_STRLEN(szTmp);
|
szTmpsize=SF_STRLEN(szTmp);
|
||||||
//printf("szTmpsize=%d\n",szTmpsize);
|
//printf("szTmpsize=%d\n",szTmpsize);
|
||||||
write(fd, szTmp, szTmpsize);
|
write(fd, szTmp, szTmpsize);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user