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

Function export_vnode_for_osysctl

freebsd/kern/kern_descrip.c:4620–4633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4618}
4619
4620static int
4621export_vnode_for_osysctl(struct vnode *vp, int type, struct kinfo_file *kif,
4622 struct kinfo_ofile *okif, struct pwddesc *pdp, struct sysctl_req *req)
4623{
4624 int error;
4625
4626 vrefact(vp);
4627 PWDDESC_XUNLOCK(pdp);
4628 export_vnode_to_kinfo(vp, type, 0, kif, KERN_FILEDESC_PACK_KINFO);
4629 kinfo_to_okinfo(kif, okif);
4630 error = SYSCTL_OUT(req, okif, sizeof(*okif));
4631 PWDDESC_XLOCK(pdp);
4632 return (error);
4633}
4634
4635/*
4636 * Get per-process file descriptors for use by procstat(1), et al.

Callers 1

Calls 3

export_vnode_to_kinfoFunction · 0.85
kinfo_to_okinfoFunction · 0.85
vrefactFunction · 0.70

Tested by

no test coverage detected