Skip to content

Commit

Permalink
fs/vfs: Fix bug that O_NONBLOCK flag was not set in fcntl
Browse files Browse the repository at this point in the history
Fix bug that O_NONBLOCK flag was not set in fcntl.
  • Loading branch information
SPRESENSE committed Mar 7, 2023
1 parent 4ba64f3 commit ecd1bb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/vfs/fs_fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ static int file_vfcntl(FAR struct file *filep, int cmd, va_list ap)
ret = file_ioctl(filep, FIONBIO, &nonblock);
if (ret == OK)
{
oflags &= (FFCNTL & ~O_NONBLOCK);
filep->f_oflags &= ~(FFCNTL & ~O_NONBLOCK);
oflags &= FFCNTL;
filep->f_oflags &= ~FFCNTL;
filep->f_oflags |= oflags;

if ((filep->f_oflags & O_APPEND) != 0)
Expand Down

0 comments on commit ecd1bb6

Please sign in to comment.