MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_mnt_foreach

Function dfs_mnt_foreach

components/dfs/dfs_v2/src/dfs_mnt.c:677–686  ·  view source on GitHub ↗

* @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

Source from the content-addressed store, hash-verified

675 * @return Always returns 0.
676 */
677int 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}

Callers 1

seq_showFunction · 0.85

Calls 3

_dfs_mnt_foreachFunction · 0.85
dfs_lockFunction · 0.70
dfs_unlockFunction · 0.70

Tested by

no test coverage detected