From a408267cd3fdc0d336f882e77901dbbf1205111a Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Mon, 3 Apr 2017 11:36:38 +0900 Subject: [PATCH] fs/vfs: return ERROR when ioctl is not implemented VFS layer should return ERROR when the underlying file system implementation does not provide .ioctl callback. Change-Id: If2043070f2c63b9f560856c56f89b353b343abf7 Signed-off-by: EunBong Song --- os/fs/vfs/fs_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os/fs/vfs/fs_ioctl.c b/os/fs/vfs/fs_ioctl.c index 93597d2..5adab2f 100644 --- a/os/fs/vfs/fs_ioctl.c +++ b/os/fs/vfs/fs_ioctl.c @@ -152,6 +152,9 @@ int ioctl(int fd, int req, unsigned long arg) err = -ret; goto errout; } + } else { + err = ENOTTY; + goto errout; } return ret; -- 2.7.4