1.增加一些sync操作

This commit is contained in:
payton 2023-08-22 18:00:00 +08:00
parent 85b8b3cc09
commit 1e594d48b8
2 changed files with 3 additions and 3 deletions

View File

@ -1482,7 +1482,7 @@ UINT8 sf_get_send_file_list(char *sendfileList, UINT8 *fileTotal)
printf("fileTotal=%d, fsize=%d\n", *fileTotal, fsize); printf("fileTotal=%d, fsize=%d\n", *fileTotal, fsize);
fread(sendfileList, fsize, 1, fd); fread(sendfileList, fsize, 1, fd);
fclose(fd); fclose(fd);
system("sync");
oldFileKey = pPara->FileKey; oldFileKey = pPara->FileKey;
printf("last send key:%d\n", oldFileKey); printf("last send key:%d\n", oldFileKey);
//oldFileKey = 1000003; //for debug //oldFileKey = 1000003; //for debug

View File

@ -48,8 +48,8 @@ SINT32 sf_file_remove(SF_CHAR *fileName)
MLOGI("removing [%s]\n",fileName); MLOGI("removing [%s]\n",fileName);
sprintf(cmdstring,"rm -rf %s",fileName); sprintf(cmdstring,"rm -rf %s",fileName);
s32ret = system(cmdstring); s32ret = system(cmdstring);
sync(); //sync();
system("sync");
if(s32ret != SF_SUCCESS) if(s32ret != SF_SUCCESS)
{ {
//SF_MESSAGE_BUF_S stMessageBuf = {0}; //SF_MESSAGE_BUF_S stMessageBuf = {0};