diff options
| author | tangyuxin <[email protected]> | 2020-09-26 09:55:58 +0800 |
|---|---|---|
| committer | tangyuxin <[email protected]> | 2020-09-26 09:55:58 +0800 |
| commit | 50dc41468ef69b6b79979772f9689d8d3099df30 (patch) | |
| tree | 9015ec28c2d8e170b169570c8d4409c91390a79f /components/dfs/filesystems/devfs | |
| parent | 8ffe2422288c67a7ad89e1f3e31495b08bf2f175 (diff) | |
[add] DFS file system supports device types
Diffstat (limited to 'components/dfs/filesystems/devfs')
| -rw-r--r-- | components/dfs/filesystems/devfs/devfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/dfs/filesystems/devfs/devfs.c b/components/dfs/filesystems/devfs/devfs.c index 936b074ce1..7637074dbb 100644 --- a/components/dfs/filesystems/devfs/devfs.c +++ b/components/dfs/filesystems/devfs/devfs.c @@ -186,6 +186,7 @@ int dfs_device_fs_open(struct dfs_fd *file) result = file->fops->open(file); if (result == RT_EOK || result == -RT_ENOSYS) { + file->type = FT_DEVICE; return 0; } } @@ -197,6 +198,7 @@ int dfs_device_fs_open(struct dfs_fd *file) if (result == RT_EOK || result == -RT_ENOSYS) { file->data = device; + file->type = FT_DEVICE; return RT_EOK; } } |
