mirror of
https://github.com/linux-msm/rmtfs.git
synced 2024-11-23 12:14:12 +08:00
storage: Sync changes
Open the storage devices as O_SYNC, to make sure modem writes aren't lingering in the event of power loss or sudden reboot. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
1cc12d3dc1
commit
293ab8babb
@ -122,7 +122,7 @@ found:
|
||||
fspath = alloca(pathlen);
|
||||
snprintf(fspath, pathlen, "%s/%s", storage_dir, file);
|
||||
if (!storage_read_only) {
|
||||
fd = open(fspath, O_RDWR);
|
||||
fd = open(fspath, O_RDWR | O_SYNC);
|
||||
if (fd < 0) {
|
||||
saved_errno = errno;
|
||||
fprintf(stderr, "[storage] failed to open '%s' (requested '%s'): %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user