fix: 修改某些平台保存bbox日志失败的问题 1、在日志写如完成之后执行fsync确保落盘。 Close #I41UTP Signed-off-by: qidechun <qidechun@huawei.com>
This commit is contained in:
parent
b7030357cd
commit
f5f8d5ebf6
|
@ -78,6 +78,7 @@ int FullWriteFile(const char *filePath, const char *buf, size_t bufSize, int isA
|
||||||
totalToWrite -= writeThisTime;
|
totalToWrite -= writeThisTime;
|
||||||
totalWrite += writeThisTime;
|
totalWrite += writeThisTime;
|
||||||
}
|
}
|
||||||
|
(void)fsync(fd);
|
||||||
(void)close(fd);
|
(void)close(fd);
|
||||||
|
|
||||||
return (totalWrite == (int)bufSize) ? 0 : -1;
|
return (totalWrite == (int)bufSize) ? 0 : -1;
|
||||||
|
@ -124,4 +125,4 @@ bool IsLogPartReady(void)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue