netdev_file_ioctl: Fix fcntl F_SETFL O_NONBLOCK regression

This fixes a regression caused by the following commit,
which prevents the file flag from being updated.

```
commit 28860b5242
Author: chao.an <anchao@xiaomi.com>
Date:   Sat Mar 19 14:47:37 2022 +0800

    net/netdev: fix switch case missing break

    Signed-off-by: chao.an <anchao@xiaomi.com>
```

Note: some applications like mbedtls uses F_GETFL to confirm
the nonblock-ness of the socket. This is critical for such
applications.
This commit is contained in:
YAMAMOTO Takashi 2022-04-01 14:27:24 +09:00 committed by Xiang Xiao
parent 37ef22b106
commit bc0ca51243
1 changed files with 1 additions and 1 deletions

View File

@ -1522,7 +1522,7 @@ static int netdev_file_ioctl(FAR struct socket *psock, int cmd,
conn->s_flags &= ~_SF_NONBLOCK; conn->s_flags &= ~_SF_NONBLOCK;
} }
ret = OK; ret = -ENOTTY; /* let file_vioctl update f_oflags */
} }
else else
{ {