patch-2.3.47 linux/fs/nfsd/nfs3xdr.c
Next file: linux/fs/nfsd/nfsfh.c
Previous file: linux/fs/nfsd/lockd.c
Back to the patch index
Back to the overall index
- Lines: 106
- Date:
Thu Feb 17 17:23:30 2000
- Orig file:
v2.3.46/linux/fs/nfsd/nfs3xdr.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.46/linux/fs/nfsd/nfs3xdr.c linux/fs/nfsd/nfs3xdr.c
@@ -177,15 +177,15 @@
*p++ = htonl((u32) nfsd_ruid(rqstp, inode->i_uid));
*p++ = htonl((u32) nfsd_rgid(rqstp, inode->i_gid));
if (S_ISLNK(inode->i_mode) && inode->i_size > NFS3_MAXPATHLEN) {
- p = enc64(p, (u64) NFS3_MAXPATHLEN);
+ p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN);
} else {
- p = enc64(p, (u64) inode->i_size);
+ p = xdr_encode_hyper(p, (u64) inode->i_size);
}
- p = enc64(p, ((u64)inode->i_blocks) << 9);
+ p = xdr_encode_hyper(p, ((u64)inode->i_blocks) << 9);
*p++ = htonl((u32) MAJOR(inode->i_rdev));
*p++ = htonl((u32) MINOR(inode->i_rdev));
- p = enc64(p, (u64) inode->i_dev);
- p = enc64(p, (u64) inode->i_ino);
+ p = xdr_encode_hyper(p, (u64) inode->i_dev);
+ p = xdr_encode_hyper(p, (u64) inode->i_ino);
p = encode_time3(p, inode->i_atime);
p = encode_time3(p, inode->i_mtime);
p = encode_time3(p, inode->i_ctime);
@@ -207,15 +207,15 @@
*p++ = htonl((u32) nfsd_ruid(rqstp, fhp->fh_post_uid));
*p++ = htonl((u32) nfsd_rgid(rqstp, fhp->fh_post_gid));
if (S_ISLNK(fhp->fh_post_mode) && fhp->fh_post_size > NFS3_MAXPATHLEN) {
- p = enc64(p, (u64) NFS3_MAXPATHLEN);
+ p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN);
} else {
- p = enc64(p, (u64) fhp->fh_post_size);
+ p = xdr_encode_hyper(p, (u64) fhp->fh_post_size);
}
- p = enc64(p, ((u64)fhp->fh_post_blocks) << 9);
+ p = xdr_encode_hyper(p, ((u64)fhp->fh_post_blocks) << 9);
*p++ = htonl((u32) MAJOR(fhp->fh_post_rdev));
*p++ = htonl((u32) MINOR(fhp->fh_post_rdev));
- p = enc64(p, (u64) inode->i_dev);
- p = enc64(p, (u64) inode->i_ino);
+ p = xdr_encode_hyper(p, (u64) inode->i_dev);
+ p = xdr_encode_hyper(p, (u64) inode->i_ino);
p = encode_time3(p, fhp->fh_post_atime);
p = encode_time3(p, fhp->fh_post_mtime);
p = encode_time3(p, fhp->fh_post_ctime);
@@ -250,7 +250,7 @@
if (dentry && dentry->d_inode && fhp->fh_post_saved) {
if (fhp->fh_pre_saved) {
*p++ = xdr_one;
- p = enc64(p, (u64) fhp->fh_pre_size);
+ p = xdr_encode_hyper(p, (u64) fhp->fh_pre_size);
p = encode_time3(p, fhp->fh_pre_mtime);
p = encode_time3(p, fhp->fh_pre_ctime);
} else {
@@ -669,7 +669,7 @@
int buflen, slen, elen;
if (cd->offset)
- enc64(cd->offset, (u64) offset);
+ xdr_encode_hyper(cd->offset, (u64) offset);
/* nfsd_readdir calls us with name == 0 when it wants us to
* set the last offset entry. */
@@ -693,7 +693,7 @@
return -EINVAL;
}
*p++ = xdr_one; /* mark entry present */
- p = enc64(p, ino); /* file id */
+ p = xdr_encode_hyper(p, ino); /* file id */
#ifdef XDR_ENCODE_STRING_TAKES_LENGTH
p = xdr_encode_string(p, name, namlen); /* name length & name */
#else
@@ -705,7 +705,7 @@
p[slen - 1] = 0; /* don't leak kernel data */
cd->offset = p; /* remember pointer */
- p = enc64(p, NFS_OFFSET_MAX); /* offset of next entry */
+ p = xdr_encode_hyper(p, NFS_OFFSET_MAX); /* offset of next entry */
/* throw in readdirplus baggage */
if (plus) {
@@ -756,12 +756,12 @@
*p++ = xdr_zero; /* no post_op_attr */
if (resp->status == 0) {
- p = enc64(p, bs * s->f_blocks); /* total bytes */
- p = enc64(p, bs * s->f_bfree); /* free bytes */
- p = enc64(p, bs * s->f_bavail); /* user available bytes */
- p = enc64(p, s->f_files); /* total inodes */
- p = enc64(p, s->f_ffree); /* free inodes */
- p = enc64(p, s->f_ffree); /* user available inodes */
+ p = xdr_encode_hyper(p, bs * s->f_blocks); /* total bytes */
+ p = xdr_encode_hyper(p, bs * s->f_bfree); /* free bytes */
+ p = xdr_encode_hyper(p, bs * s->f_bavail); /* user available bytes */
+ p = xdr_encode_hyper(p, s->f_files); /* total inodes */
+ p = xdr_encode_hyper(p, s->f_ffree); /* free inodes */
+ p = xdr_encode_hyper(p, s->f_ffree); /* user available inodes */
*p++ = htonl(resp->invarsec); /* mean unchanged time */
}
return xdr_ressize_check(rqstp, p);
@@ -782,7 +782,7 @@
*p++ = htonl(resp->f_wtpref);
*p++ = htonl(resp->f_wtmult);
*p++ = htonl(resp->f_dtpref);
- p = enc64(p, resp->f_maxfilesize);
+ p = xdr_encode_hyper(p, resp->f_maxfilesize);
*p++ = xdr_one;
*p++ = xdr_zero;
*p++ = htonl(resp->f_properties);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)