summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 6be2eba396..2d90df3f5f 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -356,6 +356,11 @@ int unlink(const char *pathname)
goto out;
fsdrv = (struct fs_driver_d *)dev->driver->type_data;
+ if (!fsdrv->unlink) {
+ errno = -ENOSYS;
+ goto out;
+ }
+
errno = fsdrv->unlink(dev, p);
out:
free(freep);