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

Function finstall

freebsd/kern/kern_descrip.c:2102–2117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100}
2101
2102int
2103finstall(struct thread *td, struct file *fp, int *fd, int flags,
2104 struct filecaps *fcaps)
2105{
2106 int error;
2107
2108 MPASS(fd != NULL);
2109
2110 if (!fhold(fp))
2111 return (EBADF);
2112 error = finstall_refed(td, fp, fd, flags, fcaps);
2113 if (__predict_false(error != 0)) {
2114 fdrop(fp, td);
2115 }
2116 return (error);
2117}
2118
2119/*
2120 * Build a new filedesc structure from another.

Callers 2

kern_specialfdFunction · 0.85
kern_fhopenFunction · 0.85

Calls 2

fholdFunction · 0.85
finstall_refedFunction · 0.85

Tested by

no test coverage detected