open: Use file mode only when O_CREAT is specified.
This commit is contained in:
parent
bace5e9b59
commit
0fcf6f2e41
@ -89,7 +89,7 @@ static int file_vopen(FAR struct file *filep, FAR const char *path,
|
||||
|
||||
/* If the file is opened for creation, then get the mode bits */
|
||||
|
||||
if ((oflags & (O_WRONLY | O_CREAT)) != 0)
|
||||
if ((oflags & O_CREAT) != 0)
|
||||
{
|
||||
mode = va_arg(ap, mode_t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user