patch-2.4.0-test2 linux/fs/nfsd/nfs3xdr.c
Next file: linux/fs/nfsd/nfsctl.c
Previous file: linux/fs/nfsd/nfs3proc.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Fri Jun 23 21:22:12 2000
- Orig file:
v2.4.0-test1/linux/fs/nfsd/nfs3xdr.c
- Orig date:
Wed Apr 26 16:34:09 2000
diff -u --recursive --new-file v2.4.0-test1/linux/fs/nfsd/nfs3xdr.c linux/fs/nfsd/nfs3xdr.c
@@ -698,17 +698,9 @@
cd->eob = 1;
return -EINVAL;
}
- *p++ = xdr_one; /* mark entry present */
- p = xdr_encode_hyper(p, ino); /* file id */
- p[slen - 1] = 0; /* don't leak kernel data */
-#ifdef XDR_ENCODE_STRING_TAKES_LENGTH
- p = xdr_encode_string(p, name, namlen); /* name length & name */
-#else
- /* just like nfsproc.c */
- *p++ = htonl((u32) namlen);
- memcpy(p, name, namlen);
- p += slen;
-#endif
+ *p++ = xdr_one; /* mark entry present */
+ p = xdr_encode_hyper(p, ino); /* file id */
+ p = xdr_encode_array(p, name, namlen);/* name length & name */
cd->offset = p; /* remember pointer */
p = xdr_encode_hyper(p, NFS_OFFSET_MAX); /* offset of next entry */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)