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>
Wed, 25 May 2016 21:05:33 +0000 (14:05 -0700)
commit3114ad623ca39bf6cbcee7f4841c00077faafcba
tree0f731a93174eba05af52faa87f981d6ccdb38aec
parent8bbbee165d2c8bb17353b11de1a3e74e089eff73
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.

Bug: 27354612

Change-Id: I3a862ad59c8ae5beb8ea2c727eb5f275a2d5823e
(cherry picked from commit 95dbe03a693f4a920204b8c6acbba5269915a59f)
btif/src/btif_config.c
osi/src/config.c