summaryrefslogtreecommitdiff
path: root/include/fat.h
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 /include/fat.h
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 'include/fat.h')
-rw-r--r--include/fat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/fat.h b/include/fat.h
index 0fe3eaa8f7..bc139f8c88 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -203,6 +203,7 @@ int fat_read_file(const char *filename, void *buf, loff_t offset, loff_t len,
int fat_opendir(const char *filename, struct fs_dir_stream **dirsp);
int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp);
void fat_closedir(struct fs_dir_stream *dirs);
+int fat_unlink(const char *filename);
int fat_mkdir(const char *dirname);
void fat_close(void);
#endif /* _FAT_H_ */