OSDN Git Service

Improve config file sync during configuration save.
authorJacky Cheung <jackyc@google.com>
Wed, 18 May 2016 22:41:09 +0000 (15:41 -0700)
committerMarie Janssen <jamuraa@google.com>
Tue, 24 May 2016 18:12:43 +0000 (18:12 +0000)
commit95dbe03a693f4a920204b8c6acbba5269915a59f
treea2f77de1cfd80397ce858928093c6ec84d0b0c40
parent634c2e6f23ccb25696d814161e8a2db686b16728
Improve config file sync during configuration save.

Add fsync() calls to force sync to disk while saving configuration
file.  It is necessary to do a sync on the temp file before rename,
and to sync again on its parent directory to ensure both the
file content and the directory are up-to-date.

Change-Id: I3a862ad59c8ae5beb8ea2c727eb5f275a2d5823e
btif/src/btif_config.cc
osi/src/config.c