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

Function dfs_device_fs_unlink

components/dfs/dfs_v1/filesystems/devfs/devfs.c:268–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268int dfs_device_fs_unlink(struct dfs_filesystem *fs, const char *path)
269{
270#ifdef RT_USING_DEV_BUS
271 rt_device_t dev_id;
272
273 dev_id = rt_device_find(&path[1]);
274 if (dev_id == RT_NULL)
275 {
276 return -1;
277 }
278 if (dev_id->type != RT_Device_Class_Bus)
279 {
280 return -1;
281 }
282 rt_device_bus_destroy(dev_id);
283#endif
284 return RT_EOK;
285}
286
287int dfs_device_fs_stat(struct dfs_filesystem *fs, const char *path, struct stat *st)
288{

Callers

nothing calls this directly

Calls 2

rt_device_findFunction · 0.85
rt_device_bus_destroyFunction · 0.85

Tested by

no test coverage detected