mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 00:03:34 +08:00
only call fsync in NUTTX builds
This commit is contained in:
committed by
Lorenz Meier
parent
6f20b9e1df
commit
1a5040b9d2
@@ -441,7 +441,9 @@ protected:
|
||||
PX4_WARN("mavlink logging disabled");
|
||||
} else {
|
||||
(void)fputs("\n", fp);
|
||||
#ifdef __PX4_NUTTX
|
||||
fsync(fp->fs_filedes);
|
||||
#endif
|
||||
}
|
||||
|
||||
} else if (write_err_count < write_err_threshold) {
|
||||
@@ -460,7 +462,9 @@ protected:
|
||||
fputs(": ", fp);
|
||||
fputs(msg.text, fp);
|
||||
fputs("\n", fp);
|
||||
#ifdef __PX4_NUTTX
|
||||
fsync(fp->fs_filedes);
|
||||
#endif
|
||||
} else {
|
||||
PX4_WARN("Failed to open MAVLink log: %s", log_file_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user