summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 3f0f1345fb..32fd802208 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -462,9 +462,10 @@ int ioctl(int fd, int request, void *buf)
fsdrv = (struct fs_driver_d *)dev->driver->type_data;
if (fsdrv->ioctl)
- return fsdrv->ioctl(dev, f, request, buf);
-
- return -ENOSYS;
+ errno = fsdrv->ioctl(dev, f, request, buf);
+ else
+ errno = -ENOSYS;
+ return errno;
}
int read(int fd, void *buf, size_t count)