提交 7c107c53 编写于 作者: C chengjinsong2

优化数据丢失问题

Signed-off-by: Nchengjinsong2 <chengjinsong2@huawei.com>
Change-Id: Icfe7a8b1fe3dea9d3df125be9d1c2e6ab845bd4d
上级 02b3b872
......@@ -108,6 +108,8 @@ static void BatchSavePersistParamEnd(PERSIST_SAVE_HANDLE handle)
{
int ret;
FILE *fp = (FILE *)handle;
(void)fflush(fp);
(void)fsync(fileno(fp));
(void)fclose(fp);
if (InUpdaterMode() == 0) {
unlink(PARAM_PERSIST_SAVE_PATH);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册