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>
diff --git a/fs/fs.c b/fs/fs.c
index ba9a651..adae98d 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -170,16 +170,17 @@
 		.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