mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-11 16:00:19 +00:00
nxrecorder: mode is required when oflags include O_CREAT or O_WRONLY
Refer -- fs_open.c:
/* If the file is opened for creation, then get the mode bits */
if ((oflags & (O_WRONLY | O_CREAT)) != 0)
{
mode = va_arg(ap, mode_t);
}
Signed-off-by: huxiandong <huxiandong@xiaomi.com>
This commit is contained in:
parent
e501f784c3
commit
5a4e9e4389
1 changed files with 2 additions and 1 deletions
|
|
@ -1034,7 +1034,8 @@ int nxrecorder_recordinternal(FAR struct nxrecorder_s *precorder,
|
|||
|
||||
/* Test that the specified file exists */
|
||||
|
||||
if ((precorder->fd = open(pfilename, O_WRONLY | O_CREAT | O_TRUNC)) == -1)
|
||||
if ((precorder->fd = open(pfilename, O_WRONLY | O_CREAT | O_TRUNC,
|
||||
0666)) == -1)
|
||||
{
|
||||
/* File not found. Test if its in the mediadir */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue