dataman: Fixed file permissions on file creation

In Linux the file was being created with incorrect permissions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-05-21 10:37:15 -07:00
parent 05720b5aef
commit cb5db8ec83
1 changed files with 6 additions and 1 deletions

View File

@ -671,7 +671,12 @@ task_main(int argc, char *argv[])
}
/* Open or create the data manager file */
g_task_fd = open(k_data_manager_device_path, O_RDWR | O_CREAT | O_BINARY, 0x0777);
g_task_fd = open(k_data_manager_device_path, O_RDWR | O_CREAT | O_BINARY
#ifdef __PX4_LINUX
// Open with read/write permission for user
, S_IRUSR | S_IWUSR
#endif
);
if (g_task_fd < 0) {
warnx("Could not open data manager file %s", k_data_manager_device_path);