fix param: need to use fsync() and not px4_fsync()

It's used with real OS FD's.
This commit is contained in:
Beat Küng
2018-01-10 20:41:56 +01:00
parent f962e9826b
commit f8ceee0cf2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1140,14 +1140,14 @@ param_export(int fd, bool only_unsaved)
out:
if (result == 0) {
result = bson_encoder_fini(&encoder); // this will call fsync
result = bson_encoder_fini(&encoder);
// write and finish
if ((result != 0) || write(fd, encoder.buf, encoder.bufpos) != encoder.bufpos) {
PX4_ERR("param write error");
} else {
px4_fsync(fd);
fsync(fd);
}
}