| 4618 | } |
| 4619 | |
| 4620 | static int |
| 4621 | export_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. |
no test coverage detected