nuttx/pty:pty FIONBIO pass to pipe control

1. pass FIONBIO ioctl to pipe
2. resolve the return value error

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
This commit is contained in:
fangzhenwei 2021-11-05 14:46:39 +08:00 committed by Xiang Xiao
parent 2d6774536e
commit 1afdb06981
1 changed files with 7 additions and 1 deletions

View File

@ -874,6 +874,12 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
} }
break; break;
case FIONBIO:
{
ret = file_ioctl(&dev->pd_sink, cmd, arg);
}
break;
/* Any unrecognized IOCTL commands will be passed to the contained /* Any unrecognized IOCTL commands will be passed to the contained
* pipe driver. * pipe driver.
* *
@ -892,7 +898,7 @@ 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);
} }
#else #else
ret = ENOTTY; ret = -ENOTTY;
#endif #endif
} }
break; break;