am e99e5474: Merge "Sync persist property immediately,in case of suddenly remove the battery."
* commit 'e99e5474e101034e2d6e095ebdca011cb62b9386': Sync persist property immediately,in case of suddenly remove the battery.
This commit is contained in:
commit
40d49a0292
1 changed files with 1 additions and 0 deletions
|
|
@ -269,6 +269,7 @@ static void write_persistent_property(const char *name, const char *value)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
write(fd, value, strlen(value));
|
write(fd, value, strlen(value));
|
||||||
|
fsync(fd);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name);
|
snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue