Exemple #1
0
/*
 * Vnode operating to retrieve a named extended attribute.
 */
int
ufs_getextattr(struct vop_getextattr_args *ap)
/*
vop_getextattr {
	IN struct vnode *a_vp;
	IN int a_attrnamespace;
	IN const char *a_name;
	INOUT struct uio *a_uio;
	OUT size_t *a_size;
	IN struct ucred *a_cred;
	IN struct thread *a_td;
};
*/
{
	struct mount *mp = ap->a_vp->v_mount;
	struct ufsmount *ump = VFSTOUFS(mp);
	int error;

	ufs_extattr_uepm_lock(ump);

	error = ufs_extattr_get(ap->a_vp, ap->a_attrnamespace, ap->a_name,
	    ap->a_uio, ap->a_size, ap->a_cred, ap->a_td);

	ufs_extattr_uepm_unlock(ump);

	return (error);
}
Exemple #2
0
/*
 * Vnode operating to retrieve a named extended attribute.
 */
int
ufs_vop_getextattr(void *v)
{
	struct vop_getextattr_args /* {
		IN struct vnode *a_vp;
		IN int a_attrnamespace;
		IN const char *a_name;
		INOUT struct uio *a_uio;
		OUT struct size_t *a_size;
		IN struct ucred *a_cred;
		IN struct proc *a_p;
	} */ *ap = v;
	struct mount	*mp = ap->a_vp->v_mount;
	struct ufsmount	*ump = VFSTOUFS(mp);
	int	error;

	ufs_extattr_uepm_lock(ump, ap->a_p);

	error = ufs_extattr_get(ap->a_vp, ap->a_attrnamespace, ap->a_name,
	    ap->a_uio, ap->a_size, ap->a_cred, ap->a_p);

	ufs_extattr_uepm_unlock(ump, ap->a_p);

	return (error);
}