提交 8f6a1dd3 编写于 作者: P pcwlno1 提交者: qidechun

fix: 修改某些平台保存bbox日志失败的问题

1、在日志写如完成之后执行fsync确保落盘。

Close #I41UTP
Signed-off-by: Nqidechun <qidechun@huawei.com>
上级 4adc15e6
......@@ -78,6 +78,7 @@ int FullWriteFile(const char *filePath, const char *buf, size_t bufSize, int isA
totalToWrite -= writeThisTime;
totalWrite += writeThisTime;
}
(void)fsync(fd);
(void)close(fd);
return (totalWrite == (int)bufSize) ? 0 : -1;
......@@ -124,4 +125,4 @@ bool IsLogPartReady(void)
{
return TRUE;
}
#endif
\ No newline at end of file
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册