- vap->va_type = nfstov_type(*p++);
- vap->va_mode = nfstov_mode(*p++);
- vap->va_nlink = fxdr_unsigned(u_short, *p++);
- vap->va_uid = fxdr_unsigned(uid_t, *p++);
- vap->va_gid = fxdr_unsigned(gid_t, *p++);
- vap->va_size = fxdr_unsigned(u_long, *p++);
- vap->va_size1 = 0; /* OR -1 ?? */
- vap->va_blocksize = fxdr_unsigned(long, *p++);
- vap->va_rdev = fxdr_unsigned(dev_t, *p++);
- vap->va_bytes = fxdr_unsigned(long, *p++);
- vap->va_bytes1 = -1;
- vap->va_fsid = fxdr_unsigned(long, *p++);
- vap->va_fileid = fxdr_unsigned(long, *p++);
- fxdr_time(p, &(vap->va_atime));
- p += 2;
- fxdr_time(p, &(vap->va_mtime));
- p += 2;
- fxdr_time(p, &(vap->va_ctime));
+ vap->va_type = type;
+ vap->va_mode = nfstov_mode(fp->fa_mode);
+ vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
+ vap->va_uid = fxdr_unsigned(uid_t, fp->fa_uid);
+ vap->va_gid = fxdr_unsigned(gid_t, fp->fa_gid);
+ vap->va_size = fxdr_unsigned(u_long, fp->fa_size);
+ if ((np->n_flag & NMODIFIED) == 0 || vap->va_size > np->n_size)
+ np->n_size = vap->va_size;
+ vap->va_size_rsv = 0;
+ vap->va_blocksize = fxdr_unsigned(long, fp->fa_blocksize);
+ vap->va_rdev = (dev_t)rdev;
+ vap->va_bytes = fxdr_unsigned(long, fp->fa_blocks) * NFS_FABLKSIZE;
+ vap->va_bytes_rsv = 0;
+ vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
+ vap->va_fileid = fxdr_unsigned(long, fp->fa_fileid);
+ vap->va_atime.tv_sec = fxdr_unsigned(long, fp->fa_atime.tv_sec);
+ vap->va_atime.tv_usec = 0;
+ vap->va_flags = fxdr_unsigned(u_long, fp->fa_atime.tv_usec);
+ vap->va_mtime = mtime;
+ vap->va_ctime.tv_sec = fxdr_unsigned(long, fp->fa_ctime.tv_sec);
+ vap->va_ctime.tv_usec = 0;
+ vap->va_gen = fxdr_unsigned(u_long, fp->fa_ctime.tv_usec);