From f8240ce95d64dbe3a1eb6d5001ba23107c7e7cfe Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Tue, 11 Sep 2018 15:59:14 +0900 Subject: 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 Signed-off-by: Alexander Graf --- include/fat.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/fat.h') 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_ */ -- cgit v1.2.1