Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/sys_procdesc.c
| Show First 20 Lines • Show All 530 Lines • ▼ Show 20 Lines | procdesc_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, | ||||
| } else | } else | ||||
| sb->st_mode = S_IFREG; | sb->st_mode = S_IFREG; | ||||
| sx_sunlock(&proctree_lock); | sx_sunlock(&proctree_lock); | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| static int | static int | ||||
| procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, | procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, | ||||
| struct filedesc *fdp) | struct filedesc *fdp, int lkflags) | ||||
| { | { | ||||
| struct procdesc *pdp; | struct procdesc *pdp; | ||||
| kif->kf_type = KF_TYPE_PROCDESC; | kif->kf_type = KF_TYPE_PROCDESC; | ||||
| pdp = fp->f_data; | pdp = fp->f_data; | ||||
| kif->kf_un.kf_proc.kf_pid = pdp->pd_pid; | kif->kf_un.kf_proc.kf_pid = pdp->pd_pid; | ||||
| return (0); | return (0); | ||||
| } | } | ||||