From f2844a2e3cb9fbeb20b5bb1fa66c12ec2690adc2 Mon Sep 17 00:00:00 2001 From: yangyalei Date: Tue, 13 Jun 2023 11:11:08 +0800 Subject: [PATCH] vfs: return OK when fsync dir Signed-off-by: yangyalei --- fs/vfs/fs_dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/vfs/fs_dir.c b/fs/vfs/fs_dir.c index 8568628457..d2cb4c5c3c 100644 --- a/fs/vfs/fs_dir.c +++ b/fs/vfs/fs_dir.c @@ -546,12 +546,15 @@ static off_t dir_seek(FAR struct file *filep, off_t offset, int whence) static int dir_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct fs_dirent_s *dir = filep->f_priv; - int ret = -ENOTTY; + int ret = OK; if (cmd == FIOC_FILEPATH) { strlcpy((FAR char *)(uintptr_t)arg, dir->fd_path, PATH_MAX); - ret = OK; + } + else if (cmd != BIOC_FLUSH) + { + ret = -ENOTTY; } return ret;