src/sys/fs/ext2fs/ext2_vnops.c
/*
 * Return target name of a symbolic link
 */
Return target name of a symbolic link
Return target name of a symbolic link
static int
ext2_readlink(struct vop_readlink_args *ap)
{
	struct vnode *vp = ap->a_vp;
	struct inode *ip = VTOI(vp);
	int isize;
	isize = ip->i_size;
	if (isize < vp->v_mount->mnt_maxsymlinklen) {
		uiomove((char *)ip->i_shortlink, isize, ap->a_uio);
		return (0);
	}
	return (VOP_READ(vp, ap->a_uio, 0, ap->a_cred));
}
static int ext2_readlink ( struct vop_readlink_args * ap ) { struct vnode * vp = ap -> a_vp ; struct inode * ip = VTOI ( vp ) ; int isize ; isize = ip -> i_size ; if ( isize < vp -> v_mount -> mnt_maxsymlinklen ) { uiomove ( ( char * ) ip -> i_shortlink , isize , ap -> a_uio ) ; return ( 0 ) ; } return ( VOP_READ ( vp , ap -> a_uio , 0 , ap -> a_cred ) ) ; }
Return target name of a symbolic link
Return target name of a symbolic link