net/local: add FIONSPACE support

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-08-12 14:48:05 +08:00 committed by Xiang Xiao
parent df06b30f2c
commit b991b75e87

View File

@ -726,6 +726,16 @@ static int local_ioctl(FAR struct socket *psock, int cmd,
ret = -ENOTCONN;
}
break;
case FIONSPACE:
if (conn->lc_outfile.f_inode != NULL)
{
ret = file_ioctl(&conn->lc_outfile, cmd, arg);
}
else
{
ret = -ENOTCONN;
}
break;
default:
ret = -ENOTTY;
break;