FreeBSD/sys/fs/procfs/procfs.c
/*
 * Filler function for proc/pid/self
 */
Filler function for proc/pid/self
Filler function for proc / pid / self
int
procfs_doprocfile(PFS_FILL_ARGS)
{
	char *fullpath;
	char *freepath;
	struct vnode *textvp;
	int error;
	freepath = NULL;
	PROC_LOCK(p);
	textvp = p->p_textvp;
	vhold(textvp);
	PROC_UNLOCK(p);
	error = vn_fullpath(td, textvp, &fullpath, &freepath);
	vdrop(textvp);
	if (error == 0)
		sbuf_printf(sb, "%s", fullpath);
	if (freepath != NULL)
		free(freepath, M_TEMP);
	return (error);
}
int procfs_doprocfile ( PFS_FILL_ARGS ) { char * fullpath ; char * freepath ; struct vnode * textvp ; int error ; freepath = NULL ; PROC_LOCK ( p ) ; textvp = p -> p_textvp ; vhold ( textvp ) ; PROC_UNLOCK ( p ) ; error = vn_fullpath ( td , textvp , & fullpath , & freepath ) ; vdrop ( textvp ) ; if ( error == 0 ) sbuf_printf ( sb , " " , fullpath ) ; if ( freepath != NULL ) free ( freepath , M_TEMP ) ; return ( error ) ; }
Filler function for proc/pid/self
Filler function for proc / pid / self