Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f8fb28e authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

DO NOT MERGE ANYWHERE Sync filesystem after saving a backup of the config file.

Bug: 27292025
Change-Id: Ied3f84157f491dcdf416de211ffbdb45b2abd529
parent f6bdfe31
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

#include "osi/include/alarm.h"
#include "osi/include/allocator.h"
@@ -398,6 +399,7 @@ static void btif_config_write(void) {

  pthread_mutex_lock(&lock);
  rename(CONFIG_FILE_PATH, CONFIG_BACKUP_PATH);
  sync();
  config_save(config, CONFIG_FILE_PATH);
  pthread_mutex_unlock(&lock);
}