Merge pull request #348 from KY-zhang-X/pr
Fix bug for VFS & FatFS component
This commit is contained in:
15
.gitignore
vendored
15
.gitignore
vendored
@@ -24,12 +24,13 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
board/**/build
|
board/**/build
|
||||||
board/**/.settings
|
board/**/.settings
|
||||||
board/*/MDK-ARM/DebugConfig/
|
board/*/KEIL/*/DebugConfig/
|
||||||
board/*/obj/
|
board/*/obj/
|
||||||
board/*/MDK-ARM/Obj/
|
board/*/KEIL/*/Obj/
|
||||||
board/*/MDK-ARM/RTE/
|
board/*/KEIL/*/RTE/
|
||||||
board/*/MDK-ARM/*.uvguix.*
|
board/*/KEIL/*/*.uvguix.*
|
||||||
board/*/MDK-ARM/EventRecorderStub.scvd
|
board/*/KEIL/*/EventRecorderStub.scvd
|
||||||
board/*/MDK-ARM/*/*.htm
|
board/*/KEIL/*/*/*.htm
|
||||||
board/*/MDK-ARM/*/*.build_log.htm
|
board/*/KEIL/*/*/*.build_log.htm
|
||||||
board/**/settings/*
|
board/**/settings/*
|
||||||
|
.vscode
|
||||||
|
@@ -220,7 +220,7 @@ static int fatfs_readdir(vfs_dir_t *dir, vfs_dirent_t *dirent)
|
|||||||
|
|
||||||
dp = (DIR *)dir->private;
|
dp = (DIR *)dir->private;
|
||||||
res = tos_f_readdir(dp, &info);
|
res = tos_f_readdir(dp, &info);
|
||||||
if (res != FR_OK) {
|
if (res != FR_OK || info.fname[0] == 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4397,6 +4397,7 @@ FRESULT tos_f_stat (
|
|||||||
|
|
||||||
/* Get logical drive */
|
/* Get logical drive */
|
||||||
res = find_volume(fs, 0);
|
res = find_volume(fs, 0);
|
||||||
|
dj.obj.fs = fs;
|
||||||
if (res == FR_OK) {
|
if (res == FR_OK) {
|
||||||
INIT_NAMBUF(dj.obj.fs);
|
INIT_NAMBUF(dj.obj.fs);
|
||||||
res = follow_path(&dj, path); /* Follow the file path */
|
res = follow_path(&dj, path); /* Follow the file path */
|
||||||
|
@@ -430,7 +430,7 @@ __API__ vfs_dirent_t *tos_vfs_readdir(VFS_DIR *dirp)
|
|||||||
vfs_dir_t *dir = K_NULL;
|
vfs_dir_t *dir = K_NULL;
|
||||||
vfs_inode_t *inode = K_NULL;
|
vfs_inode_t *inode = K_NULL;
|
||||||
|
|
||||||
if (!dir) {
|
if (!dirp) {
|
||||||
return K_NULL;
|
return K_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user