Lines Matching refs:fs

81     struct dfs_filesystem *fs = NULL;  in dfs_filesystem_lookup()  local
107 fs = iter; in dfs_filesystem_lookup()
113 return fs; in dfs_filesystem_lookup()
222 struct dfs_filesystem *fs = NULL; in dfs_mount() local
296 (fs == NULL) ? (fs = iter) : 0; in dfs_mount()
305 if ((fs == NULL) && (iter == &filesystem_table[DFS_FILESYSTEMS_MAX])) in dfs_mount()
313 fs->path = fullpath; in dfs_mount()
314 fs->ops = *ops; in dfs_mount()
315 fs->dev_id = dev_id; in dfs_mount()
317 fs->data = (void *) filesystemtype; in dfs_mount()
325 if (rt_device_open(fs->dev_id, RT_DEVICE_OFLAG_RDWR) != RT_EOK && in dfs_mount()
326 rt_device_open(fs->dev_id, RT_DEVICE_OFLAG_RDONLY) != RT_EOK) in dfs_mount()
330 rt_memset(fs, 0, sizeof(struct dfs_filesystem)); in dfs_mount()
337 if ((*ops)->mount(fs, rwflag, data) < 0) in dfs_mount()
341 rt_device_close(fs->dev_id); in dfs_mount()
346 rt_memset(fs, 0, sizeof(struct dfs_filesystem)); in dfs_mount()
371 struct dfs_filesystem *fs = NULL; in dfs_unmount() local
390 fs = iter; in dfs_unmount()
395 if (fs == NULL || in dfs_unmount()
396 fs->ops->unmount == NULL || in dfs_unmount()
397 fs->ops->unmount(fs) < 0) in dfs_unmount()
403 if (fs->dev_id != NULL) in dfs_unmount()
404 rt_device_close(fs->dev_id); in dfs_unmount()
406 if (fs->path != NULL) in dfs_unmount()
407 rt_free(fs->path); in dfs_unmount()
410 rt_memset(fs, 0, sizeof(struct dfs_filesystem)); in dfs_unmount()
489 struct dfs_filesystem *fs; in dfs_statfs() local
491 fs = dfs_filesystem_lookup(path); in dfs_statfs()
492 if (fs != NULL) in dfs_statfs()
494 if (fs->ops->statfs != NULL) in dfs_statfs()
495 return fs->ops->statfs(fs, buffer); in dfs_statfs()
570 struct dfs_filesystem *fs = NULL; in dfs_unmount_device() local
581 fs = iter; in dfs_unmount_device()
586 if (fs == NULL || in dfs_unmount_device()
587 fs->ops->unmount == NULL || in dfs_unmount_device()
588 fs->ops->unmount(fs) < 0) in dfs_unmount_device()
594 if (fs->dev_id != NULL) in dfs_unmount_device()
595 rt_device_close(fs->dev_id); in dfs_unmount_device()
597 if (fs->path != NULL) in dfs_unmount_device()
598 rt_free(fs->path); in dfs_unmount_device()
601 rt_memset(fs, 0, sizeof(struct dfs_filesystem)); in dfs_unmount_device()