* @brief Traverse all mount points in the mount tree and apply a callback function. * * @param[in] func Pointer to the callback function to be applied to each mount point. * The callback function takes a pointer to a `dfs_mnt` structure and a generic parameter, * and returns a pointer to a `dfs_mnt` structure or `RT_NULL`. * @param[in] parameter Generic pointer
| 675 | * @return Always returns 0. |
| 676 | */ |
| 677 | int dfs_mnt_foreach(struct dfs_mnt* (*func)(struct dfs_mnt *mnt, void *parameter), void *parameter) |
| 678 | { |
| 679 | /* lock file system */ |
| 680 | dfs_lock(); |
| 681 | _dfs_mnt_foreach(_root_mnt, func, parameter); |
| 682 | /* unlock file system */ |
| 683 | dfs_unlock(); |
| 684 | |
| 685 | return 0; |
| 686 | } |
no test coverage detected