Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/procfs/procfs.c
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | procfs_doprocfile(PFS_FILL_ARGS) | ||||
| struct vnode *textvp; | struct vnode *textvp; | ||||
| int error; | int error; | ||||
| freepath = NULL; | freepath = NULL; | ||||
| PROC_LOCK(p); | PROC_LOCK(p); | ||||
| textvp = p->p_textvp; | textvp = p->p_textvp; | ||||
| vhold(textvp); | vhold(textvp); | ||||
| PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
| error = vn_fullpath(td, textvp, &fullpath, &freepath); | error = vn_fullpath(td, textvp, 0, &fullpath, &freepath); | ||||
| vdrop(textvp); | vdrop(textvp); | ||||
| if (error == 0) | if (error == 0) | ||||
| sbuf_printf(sb, "%s", fullpath); | sbuf_printf(sb, "%s", fullpath); | ||||
| if (freepath != NULL) | if (freepath != NULL) | ||||
| free(freepath, M_TEMP); | free(freepath, M_TEMP); | ||||
| return (error); | return (error); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines | |||||