mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 09:00:34 +08:00
fix param: need to use fsync() and not px4_fsync()
It's used with real OS FD's.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user