From f24f5eff41968dda6f97333c9b4c09ec4c5a8597 Mon Sep 17 00:00:00 2001 From: Ajay Panicker Date: Thu, 12 May 2016 15:52:01 -0700 Subject: [PATCH] Add sync to write the backup file to the filesystem Bug: 27354612 Change-Id: I5a7751b6f08831d43647391774501f211336e9eb --- btif/src/btif_config.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/btif/src/btif_config.cc b/btif/src/btif_config.cc index 2703372bc..722d6a6c7 100644 --- a/btif/src/btif_config.cc +++ b/btif/src/btif_config.cc @@ -480,6 +480,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); -- 2.11.0