vfs/fatfs: fix stat call failing when called for mount point

FATFS does not support f_stat call for drive root. When handling stat
for drive root, don't call f_stat and just return struct st with S_IFDIR
flag set.

Closes #984
This commit is contained in:
Ivan Grokhotkov
2017-12-08 19:58:39 +08:00
parent bd6ee752fc
commit a63ace15bd
5 changed files with 33 additions and 12 deletions

View File

@@ -43,7 +43,7 @@ void test_fatfs_open_max_files(const char* filename_prefix, size_t files_count);
void test_fatfs_lseek(const char* filename);
void test_fatfs_stat(const char* filename);
void test_fatfs_stat(const char* filename, const char* root_dir);
void test_fatfs_unlink(const char* filename);