由于fsync是阻塞的会丢失log,删除fsync调用

This commit is contained in:
huanfeng.wang 2023-11-16 17:44:14 +08:00
parent 8733e5bae9
commit 44b614e333

View File

@ -513,7 +513,7 @@ OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t
int32_t ret = 0;
static FILE *file = NULL;
uint32_t fd;
/*uint32_t fd;*/
if (NULL == g_OspLogSem)
{
@ -564,6 +564,7 @@ OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t
g_ucFflushEnable = 0;
}
#if 0 /*feature enhancement1300*/
fd = fileno(file);
ret = fsync(fd);
if(OSP_OK != ret)
@ -573,6 +574,7 @@ OSP_STATUS osp_write_diaglog(char *pbuf, uint32_t len ,uint32_t logid, uint32_t
osp_sem_give(g_OspLogSem);
return OSP_ERROR;
}
#endif
osp_sem_give(g_OspLogSem);