From 2ec117b3caa68db175a76ba3b33d6abfd9d0db34 Mon Sep 17 00:00:00 2001 From: crafcat7 Date: Mon, 16 Jan 2023 23:59:41 +0800 Subject: [PATCH] fs/fs_fsync:Fix the expected error of socket,fifo and pipe returning error in fsync case --- drivers/pipes/pipe_common.c | 4 ++++ net/local/local_sockif.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index d68896dd1f..dbc90d2ff2 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -877,6 +877,10 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + case BIOC_FLUSH: + ret = -EINVAL; + break; + default: ret = -ENOTTY; break; diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c index fa556734ad..ff6fd18c9e 100644 --- a/net/local/local_sockif.c +++ b/net/local/local_sockif.c @@ -847,6 +847,9 @@ static int local_ioctl(FAR struct socket *psock, int cmd, unsigned long arg) ret = -ENOTCONN; } break; + case BIOC_FLUSH: + ret = -EINVAL; + break; default: ret = -ENOTTY; break;