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

Function dfs_register

components/dfs/dfs_v2/src/dfs_fs.c:81–98  ·  view source on GitHub ↗

* @brief Register a filesystem type * * This function registers a new filesystem type with the global filesystem type list. * * @param[in] fs Pointer to the filesystem type to register * @return int 0 on success, or a negative error code on failure */

Source from the content-addressed store, hash-verified

79 * @return int 0 on success, or a negative error code on failure
80 */
81int dfs_register(struct dfs_filesystem_type *fs)
82{
83 int ret = 0;
84 struct dfs_filesystem_type **type = _find_filesystem(fs->fs_ops->name);
85
86 LOG_D("register %s file system.", fs->fs_ops->name);
87
88 if (*type)
89 {
90 ret = -EBUSY;
91 }
92 else
93 {
94 *type = fs;
95 }
96
97 return ret;
98}
99
100/**
101 * @brief Unregister a filesystem type

Callers 10

_ptyfs_initFunction · 0.50
dfs_tmpfs_initFunction · 0.50
dfs_devtmpfs_initFunction · 0.50
dfs_cromfs_initFunction · 0.50
dfs_procfs_initFunction · 0.50
dfs_ramfs_initFunction · 0.50
dfs_skt_initFunction · 0.50
dfs_romfs_initFunction · 0.50
elm_initFunction · 0.50
dfs_mqueue_initFunction · 0.50

Calls 1

_find_filesystemFunction · 0.85

Tested by

no test coverage detected