MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ff_dup2

Function ff_dup2

lib/ff_syscall_wrapper.c:1726–1743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1724}
1725
1726int
1727ff_dup2(int oldfd, int newfd)
1728{
1729 int rc;
1730 struct dup2_args da = {
1731 .from = oldfd,
1732 .to = newfd
1733 };
1734 if ((rc = sys_dup2(curthread, &da)))
1735 goto kern_fail;
1736
1737 rc = curthread->td_retval[0];
1738
1739 return (rc);
1740kern_fail:
1741 ff_os_errno(rc);
1742 return (-1);
1743}
1744
1745int
1746ff_route_ctl(enum FF_ROUTE_CTL req, enum FF_ROUTE_FLAG flag,

Callers 1

ff_sys_bindFunction · 0.85

Calls 2

sys_dup2Function · 0.85
ff_os_errnoFunction · 0.85

Tested by

no test coverage detected