From: Ajay Panicker Date: Thu, 12 May 2016 22:52:01 +0000 (-0700) Subject: Add sync to write the backup file to the filesystem X-Git-Tag: android-x86-7.1-r1~92^2~17 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b7e9cb4c35abbacce5313c6f1e2f5a51dc0946bb;p=android-x86%2Fsystem-bt.git Add sync to write the backup file to the filesystem Bug: 27354612 Change-Id: I5a7751b6f08831d43647391774501f211336e9eb --- diff --git a/btif/src/btif_config.c b/btif/src/btif_config.c index eceb964ea..f2a88069a 100644 --- a/btif/src/btif_config.c +++ b/btif/src/btif_config.c @@ -489,6 +489,7 @@ static void btif_config_write(UNUSED_ATTR UINT16 event, UNUSED_ATTR char *p_para pthread_mutex_lock(&lock); rename(CONFIG_FILE_PATH, CONFIG_BACKUP_PATH); + sync(); config_t *config_paired = config_new_clone(config); btif_config_remove_unpaired(config_paired); config_save(config_paired, CONFIG_FILE_PATH);