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

Function fd_new

components/dfs/dfs_v2/src/dfs.c:457–464  ·  view source on GitHub ↗

* @brief Allocate a new file descriptor in current process's file descriptor table * * @return int The allocated file descriptor index if successful (>= 0), * -1 if allocation failed */

Source from the content-addressed store, hash-verified

455 * -1 if allocation failed
456 */
457int fd_new(void)
458{
459 struct dfs_fdtable *fdt;
460
461 fdt = dfs_fdtable_get();
462
463 return fdt_fd_new(fdt);
464}
465
466/**
467 * @ingroup group_fs_file_descriptor

Callers 3

openFunction · 0.70
opendirFunction · 0.70
dfs_dup_fromFunction · 0.70

Calls 2

dfs_fdtable_getFunction · 0.70
fdt_fd_newFunction · 0.70

Tested by

no test coverage detected