mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
sdlog2: Do not use permission flags on NuttX
This commit is contained in:
parent
55790d0beb
commit
cbada5198d
@ -520,7 +520,11 @@ int open_log_file()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __PX4_NUTTX
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC);
|
||||
#else
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC, PX4_O_MODE_666);
|
||||
#endif
|
||||
|
||||
if (fd < 0) {
|
||||
mavlink_and_console_log_critical(mavlink_fd, "[sdlog2] failed opening: %s", log_file_name);
|
||||
@ -568,7 +572,11 @@ int open_perf_file(const char* str)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __PX4_NUTTX
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC);
|
||||
#else
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC, 0x0777);
|
||||
#endif
|
||||
|
||||
if (fd < 0) {
|
||||
mavlink_and_console_log_critical(mavlink_fd, "[sdlog2] failed opening: %s", log_file_name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user