This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 92b1f0f287b04f60125c1f243dd9467c72d34c73 Author: Kai Cheng <[email protected]> AuthorDate: Tue Sep 15 21:33:50 2026 +0800 pipes: return OK from a successful PIPEIOC_SETSIZE pipecommon_ioctl() starts with ret = -EINVAL and every case sets it on success. The resize path of PIPEIOC_SETSIZE never does, so a caller that actually grows or shrinks a pipe is told -EINVAL while the new buffer is already in place. Only the shortcut for a size that is already current returns OK, which is why the failure looks like the command is rejected outright. Signed-off-by: Kai Cheng <[email protected]> --- drivers/pipes/pipe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index 56d71f77822..08d89aca912 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -1117,6 +1117,8 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR void *newbuf; FAR void *oldbuf; + ret = OK; + if (size == 0) { ret = -EINVAL; @@ -1127,7 +1129,6 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) if (size == dev->d_bufsize) { - ret = OK; break; }
