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

Function fdopen

freebsd/kern/kern_descrip.c:5152–5166  ·  view source on GitHub ↗

ARGSUSED */

Source from the content-addressed store, hash-verified

5150
5151/* ARGSUSED */
5152static int
5153fdopen(struct cdev *dev, int mode, int type, struct thread *td)
5154{
5155
5156 /*
5157 * XXX Kludge: set curthread->td_dupfd to contain the value of the
5158 * the file descriptor being sought for duplication. The error
5159 * return ensures that the vnode for this device will be released
5160 * by vn_open. Open will detect this special error and take the
5161 * actions in dupfdopen below. Other callers of vn_open or VOP_OPEN
5162 * will simply report the error.
5163 */
5164 td->td_dupfd = dev2unit(dev);
5165 return (ENODEV);
5166}
5167
5168static struct cdevsw fildesc_cdevsw = {
5169 .d_version = D_VERSION,

Callers 9

main.cFile · 0.85
differFunction · 0.85
zfs_redup_streamFunction · 0.85
gz_openFunction · 0.85
gz_openFunction · 0.85
mlx5_pmd_socket_handleFunction · 0.85
fs_read_fdFunction · 0.85
create_outputFunction · 0.85

Calls

no outgoing calls

Tested by 1

gz_openFunction · 0.68