summaryrefslogtreecommitdiff
path: root/fs/fat
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-09-11 15:59:01 +0900
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:29 +0200
commit881042ef021c58421ca2b5deca67634810d283ad (patch)
tree71f872d698a768cb56c3b72314a6cb200574d3c9 /fs/fat
parentf528c140c8019609c92c3fcd89a0fde8d306332f (diff)
downloadu-boot-881042ef021c58421ca2b5deca67634810d283ad.tar.gz
u-boot-881042ef021c58421ca2b5deca67634810d283ad.tar.bz2
u-boot-881042ef021c58421ca2b5deca67634810d283ad.zip
Revert "fs: fat: cannot write to subdirectories"
This reverts commit 0dc1bfb7302d220a48364263d5632d6d572b069b. The succeeding patch series will supersede it. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/fat_write.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 27e0ff6696..3b77557b3e 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -909,11 +909,9 @@ static int do_fat_write(const char *filename, void *buffer, loff_t size,
volume_info volinfo;
fsdata datablock;
fsdata *mydata = &datablock;
- int cursect, i;
+ int cursect;
int ret = -1, name_len;
char l_filename[VFAT_MAXLEN_BYTES];
- char bad[2] = " ";
- const char illegal[] = "<>:\"/\\|?*";
*actwrite = size;
dir_curclust = 0;
@@ -973,18 +971,6 @@ static int do_fat_write(const char *filename, void *buffer, loff_t size,
}
dentptr = (dir_entry *) do_fat_read_at_block;
- /* Strip leading (back-)slashes */
- while ISDIRDELIM(*filename)
- ++filename;
- /* Check that the filename is valid */
- for (i = 0; i < strlen(illegal); ++i) {
- *bad = illegal[i];
- if (strstr(filename, bad)) {
- printf("FAT: illegal filename (%s)\n", filename);
- return -1;
- }
- }
-
name_len = strlen(filename);
if (name_len >= VFAT_MAXLEN_BYTES)
name_len = VFAT_MAXLEN_BYTES - 1;