summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-07-13 21:04:30 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-07-13 21:04:30 +0000
commit808ea3c6ef13210b97a953d1af60f18af8fedade (patch)
tree76e658442d20a298bbbec645963b0ef98fe8a653 /sys/nfs
parent79acdfbd39f0127e25ba7aad63839b6455171e08 (diff)
Change mode_t and nlink_t from 16bit to 32bit. This allows us to
use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_subs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index a4fb7ee4a23..a6b97bfc216 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.45 2004/06/21 23:50:38 tholo Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.46 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1124,7 +1124,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
int32_t rdev;
struct mbuf *md;
enum vtype vtyp;
- u_short vmode;
+ mode_t vmode;
struct timespec mtime;
struct vnode *nvp;
int v3 = NFS_ISV3(vp);
@@ -1137,13 +1137,13 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
fp = (struct nfs_fattr *)cp2;
if (v3) {
vtyp = nfsv3tov_type(fp->fa_type);
- vmode = fxdr_unsigned(u_short, fp->fa_mode);
+ vmode = fxdr_unsigned(mode_t, fp->fa_mode);
rdev = makedev(fxdr_unsigned(u_char, fp->fa3_rdev.specdata1),
fxdr_unsigned(u_char, fp->fa3_rdev.specdata2));
fxdr_nfsv3time(&fp->fa3_mtime, &mtime);
} else {
vtyp = nfsv2tov_type(fp->fa_type);
- vmode = fxdr_unsigned(u_short, fp->fa_mode);
+ vmode = fxdr_unsigned(mode_t, fp->fa_mode);
if (vtyp == VNON || vtyp == VREG)
vtyp = IFTOVT(vmode);
rdev = fxdr_unsigned(int32_t, fp->fa2_rdev);
@@ -1207,7 +1207,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
vap->va_mtime = mtime;
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
if (v3) {
- vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
+ vap->va_nlink = fxdr_unsigned(nlink_t, 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_hyper(&fp->fa3_size);
@@ -1220,7 +1220,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
vap->va_flags = 0;
vap->va_filerev = 0;
} else {
- vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
+ vap->va_nlink = fxdr_unsigned(nlink_t, 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_int32_t, fp->fa2_size);