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

Function dfs_statfs

components/dfs/dfs_v1/src/dfs_fs.c:487–500  ·  view source on GitHub ↗

* this function will return the information about a mounted file system. * * @param path the path which mounted file system. * @param buffer the buffer to save the returned information. * * @return 0 on successful, others on failed. */

Source from the content-addressed store, hash-verified

485 * @return 0 on successful, others on failed.
486 */
487int dfs_statfs(const char *path, struct statfs *buffer)
488{
489 struct dfs_filesystem *fs;
490
491 fs = dfs_filesystem_lookup(path);
492 if (fs != NULL)
493 {
494 if (fs->ops->statfs != NULL)
495 return fs->ops->statfs(fs, buffer);
496 }
497
498 rt_set_errno(-ENOSYS);
499 return -1;
500}
501
502#ifdef RT_USING_DFS_MNTTABLE
503int dfs_mount_table(void)

Callers 3

statfsFunction · 0.70
dfFunction · 0.70
filesysytem_try_mountFunction · 0.50

Calls 2

dfs_filesystem_lookupFunction · 0.85
rt_set_errnoFunction · 0.85

Tested by

no test coverage detected