Skip to content
Snippets Groups Projects
Commit 9cfffc97 authored by Julian Oes's avatar Julian Oes
Browse files

param_shmem: do fsync after param write

parent 015d7431
No related branches found
No related tags found
No related merge requests found
......@@ -857,7 +857,16 @@ param_save_default(void)
goto exit;
}
// After writing the file, also do a fsync to prevent loosing params if power is cut.
res = fsync(fd);
if (res != 0) {
PX4_ERR("failed to do fsync: %s", strerror(errno));
goto exit;
}
PARAM_CLOSE(fd);
fd = -1;
exit:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment