diff --git a/kernel/common/blackbox/los_blackbox_common.c b/kernel/common/blackbox/los_blackbox_common.c index c7ae0795..813ab8d9 100644 --- a/kernel/common/blackbox/los_blackbox_common.c +++ b/kernel/common/blackbox/los_blackbox_common.c @@ -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