Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tarfs/tarfs_io.c
Show First 20 Lines • Show All 281 Lines • ▼ Show 20 Lines | tarfs_zgetattr(struct vop_getattr_args *ap) | ||||
struct tarfs_zio *zio = vp->v_data; | struct tarfs_zio *zio = vp->v_data; | ||||
struct tarfs_mount *tmp = zio->tmp; | struct tarfs_mount *tmp = zio->tmp; | ||||
struct vattr *vap = ap->a_vap; | struct vattr *vap = ap->a_vap; | ||||
int error = 0; | int error = 0; | ||||
VATTR_NULL(vap); | VATTR_NULL(vap); | ||||
error = vn_lock(tmp->vp, LK_SHARED); | error = vn_lock(tmp->vp, LK_SHARED); | ||||
if (error == 0) { | if (error == 0) { | ||||
error = VOP_GETATTR(tmp->vp, &va, ap->a_cred); | error = VOP_GETATTR(tmp->vp, 0, &va, ap->a_cred); | ||||
VOP_UNLOCK(tmp->vp); | VOP_UNLOCK(tmp->vp); | ||||
if (error == 0) { | if (error == 0) { | ||||
vap->va_type = VREG; | vap->va_type = VREG; | ||||
vap->va_mode = va.va_mode; | vap->va_mode = va.va_mode; | ||||
vap->va_nlink = 1; | vap->va_nlink = 1; | ||||
vap->va_gid = va.va_gid; | vap->va_gid = va.va_gid; | ||||
vap->va_uid = va.va_uid; | vap->va_uid = va.va_uid; | ||||
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; | vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; | ||||
▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines |