From 9004a494313dba3fd71a5a97eed74eadfe0f0a04 Mon Sep 17 00:00:00 2001 From: chao an Date: Fri, 21 Jul 2023 12:02:23 +0800 Subject: [PATCH] net/local: forward threshold ioctl() to pipe Signed-off-by: chao an --- net/local/local_sockif.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c index 2b07921991..98577eb947 100644 --- a/net/local/local_sockif.c +++ b/net/local/local_sockif.c @@ -787,6 +787,26 @@ static int local_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) ret = -ENOTCONN; } break; + case PIPEIOC_POLLINTHRD: + if (conn->lc_infile.f_inode != NULL) + { + ret = file_ioctl(&conn->lc_infile, cmd, arg); + } + else + { + ret = -ENOTCONN; + } + break; + case PIPEIOC_POLLOUTTHRD: + if (conn->lc_outfile.f_inode != NULL) + { + ret = file_ioctl(&conn->lc_outfile, cmd, arg); + } + else + { + ret = -ENOTCONN; + } + break; case BIOC_FLUSH: ret = -EINVAL; break;