Merge pull request #1049 from TanekLiang/romfs_open_fixed

[DFS] fix ROMFS get root directory bug
This commit is contained in:
Bernard Xiong 2017-11-28 23:20:09 +08:00 committed by GitHub
commit 4d854ba5a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -191,8 +191,10 @@ int dfs_romfs_open(struct dfs_fd *file)
rt_size_t size;
struct romfs_dirent *dirent;
struct romfs_dirent *root_dirent;
struct dfs_filesystem *fs;
root_dirent = (struct romfs_dirent *)file->data;
fs = (struct dfs_filesystem *)file->data;
root_dirent = (struct romfs_dirent *)fs->data;
if (check_dirent(root_dirent) != 0)
return -EIO;