diff --git a/fs/vfs/fs_dir.c b/fs/vfs/fs_dir.c index 85686284575..d2cb4c5c3c1 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;