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

Function fd_get

components/dfs/dfs_v2/src/dfs.c:487–494  ·  view source on GitHub ↗

* @brief Get file structure by file descriptor from current process's fd table * * @param[in] fd The file descriptor to lookup * * @return struct dfs_file* Pointer to the file structure if found, * NULL if invalid fd or file not found */

Source from the content-addressed store, hash-verified

485 * NULL if invalid fd or file not found
486 */
487struct dfs_file *fd_get(int fd)
488{
489 struct dfs_fdtable *fdt;
490
491 fdt = dfs_fdtable_get();
492
493 return fdt_get_file(fdt, fd);
494}
495
496/**
497 * This function will get the file descriptor table of current process.

Callers 15

openFunction · 0.70
openatFunction · 0.70
utimensatFunction · 0.70
closeFunction · 0.70
readFunction · 0.70
writeFunction · 0.70
lseekFunction · 0.70
fstatFunction · 0.70
fsyncFunction · 0.70
fcntlFunction · 0.70
ftruncateFunction · 0.70
fstatfsFunction · 0.70

Calls 2

fdt_get_fileFunction · 0.85
dfs_fdtable_getFunction · 0.70

Tested by

no test coverage detected