summaryrefslogtreecommitdiff
path: root/fs/fs.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-09-11 15:59:14 +0900
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:30 +0200
commitf8240ce95d64dbe3a1eb6d5001ba23107c7e7cfe (patch)
tree52baacf53a486ac302d6f26eca8b222b3b8a06ea /fs/fs.c
parente2519daf5cef63c19ed16ead74e3525f951c24e0 (diff)
fs: fat: support unlink
In this patch, unlink support is added to FAT file system. A directory can be deleted only if it is empty. In this implementation, only a directory entry for a short file name will be removed. So entries for a long file name can and should be reclaimed with fsck. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index ba9a65166c..adae98d021 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -170,16 +170,17 @@ static struct fstype_info fstypes[] = {
.read = fat_read_file,
#ifdef CONFIG_FAT_WRITE
.write = file_fat_write,
+ .unlink = fat_unlink,
.mkdir = fat_mkdir,
#else
.write = fs_write_unsupported,
+ .unlink = fs_unlink_unsupported,
.mkdir = fs_mkdir_unsupported,
#endif
.uuid = fs_uuid_unsupported,
.opendir = fat_opendir,
.readdir = fat_readdir,
.closedir = fat_closedir,
- .unlink = fs_unlink_unsupported,
},
#endif
#ifdef CONFIG_FS_EXT4