nuttx/pty: pty FIONBIO return -ENOTTY when pipe_ioctl return OK

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
This commit is contained in:
fangzhenwei 2021-11-25 13:32:52 +08:00 committed by Xiang Xiao
parent 37730a1fce
commit 88e871b13e
1 changed files with 7 additions and 0 deletions

View File

@ -881,6 +881,13 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{ {
ret = file_ioctl(&dev->pd_sink, cmd, arg); ret = file_ioctl(&dev->pd_sink, cmd, arg);
} }
/* Let the default handler set O_NONBLOCK flags for us. */
if (ret >= 0)
{
ret = -ENOTTY;
}
} }
break; break;