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

Function dfs_dentry_dump

components/dfs/dfs_v2/src/dfs_dentry.c:498–514  ·  view source on GitHub ↗

* @brief Dump all directory entries in the hash table for debugging * * @param[in] argc Number of command line arguments (unused) * @param[in] argv Array of command line arguments (unused) * * @return int Always returns 0 indicating success * * @note Prints each dentry's full path, memory address and reference count */

Source from the content-addressed store, hash-verified

496 * @note Prints each dentry's full path, memory address and reference count
497 */
498int dfs_dentry_dump(int argc, char** argv)
499{
500 int index = 0;
501 struct dfs_dentry *entry = RT_NULL;
502
503 dfs_lock();
504 for (index = 0; index < DFS_DENTRY_HASH_NR; index ++)
505 {
506 rt_list_for_each_entry(entry, &hash_head.head[index], hashlist)
507 {
508 printf("dentry: %s%s @ %p, ref_count = %zd\n", entry->mnt->fullpath, entry->pathname, entry, (size_t)rt_atomic_load(&entry->ref_count));
509 }
510 }
511 dfs_unlock();
512
513 return 0;
514}
515MSH_CMD_EXPORT_ALIAS(dfs_dentry_dump, dentry_dump, dump dentry in the system);

Callers

nothing calls this directly

Calls 3

dfs_lockFunction · 0.70
dfs_unlockFunction · 0.70
printfFunction · 0.50

Tested by

no test coverage detected