SCCS-vsn: sys/nfs/nfs_serv.c 7.46
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)nfs_serv.c 7.45 (Berkeley) %G%
+ * @(#)nfs_serv.c 7.46 (Berkeley) %G%
#include "vnode.h"
#include "mount.h"
#include "mbuf.h"
#include "vnode.h"
#include "mount.h"
#include "mbuf.h"
-#include "ufs/ufs/quota.h"
-#include "ufs/ufs/inode.h"
-#include "ufs/ufs/dir.h"
+#include "ufs/ufs/quota.h" /* XXX - for ufid */
+#include "ufs/ufs/inode.h" /* XXX - for ufid */
#include "nfsv2.h"
#include "rpcv2.h"
#include "nfsv2.h"
#include "rpcv2.h"
* reads nothing
* - as such one readdir rpc will return eof false although you are there
* and then the next will return eof
* reads nothing
* - as such one readdir rpc will return eof false although you are there
* and then the next will return eof
- * - it trims out records with d_ino == 0
+ * - it trims out records with d_fileno == 0
* this doesn't matter for Unix clients, but they might confuse clients
* for other os'.
* NB: It is tempting to set eof to true if the VOP_READDIR() reads less
* this doesn't matter for Unix clients, but they might confuse clients
* for other os'.
* NB: It is tempting to set eof to true if the VOP_READDIR() reads less
{
register char *bp, *be;
register struct mbuf *mp;
{
register char *bp, *be;
register struct mbuf *mp;
- register struct direct *dp;
+ register struct dirent *dp;
register caddr_t cp;
register u_long *tl;
register long t1;
register caddr_t cp;
register u_long *tl;
register long t1;
*/
cpos = rbuf + on;
cend = rbuf + siz;
*/
cpos = rbuf + on;
cend = rbuf + siz;
- dp = (struct direct *)cpos;
- while (cpos < cend && dp->d_ino == 0) {
+ dp = (struct dirent *)cpos;
+ while (cpos < cend && dp->d_fileno == 0) {
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;
}
if (cpos >= cend) {
toff = off;
}
if (cpos >= cend) {
toff = off;
cpos = rbuf + on;
cend = rbuf + siz;
cpos = rbuf + on;
cend = rbuf + siz;
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;
len = 3*NFSX_UNSIGNED; /* paranoia, probably can be 0 */
nfsm_reply(siz);
mp = mp2 = mb;
len = 3*NFSX_UNSIGNED; /* paranoia, probably can be 0 */
nfsm_reply(siz);
mp = mp2 = mb;
/* Loop through the records and build reply */
while (cpos < cend) {
/* Loop through the records and build reply */
while (cpos < cend) {
+ if (dp->d_fileno != 0) {
nlen = dp->d_namlen;
rem = nfsm_rndup(nlen)-nlen;
len += (4*NFSX_UNSIGNED + nlen + rem);
nlen = dp->d_namlen;
rem = nfsm_rndup(nlen)-nlen;
len += (4*NFSX_UNSIGNED + nlen + rem);
-
- /* Build the directory record xdr from the direct entry */
+ /*
+ * Build the directory record xdr from
+ * the dirent entry.
+ */
nfsm_clget;
*tl = nfs_true;
bp += NFSX_UNSIGNED;
nfsm_clget;
nfsm_clget;
*tl = nfs_true;
bp += NFSX_UNSIGNED;
nfsm_clget;
- *tl = txdr_unsigned(dp->d_ino);
+ *tl = txdr_unsigned(dp->d_fileno);
bp += NFSX_UNSIGNED;
nfsm_clget;
*tl = txdr_unsigned(nlen);
bp += NFSX_UNSIGNED;
nfsm_clget;
*tl = txdr_unsigned(nlen);
} else
toff += dp->d_reclen;
cpos += dp->d_reclen;
} else
toff += dp->d_reclen;
cpos += dp->d_reclen;
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;
{
register char *bp, *be;
register struct mbuf *mp;
{
register char *bp, *be;
register struct mbuf *mp;
- register struct direct *dp;
+ register struct dirent *dp;
register caddr_t cp;
register u_long *tl;
register long t1;
register caddr_t cp;
register u_long *tl;
register long t1;
*/
cpos = rbuf + on;
cend = rbuf + siz;
*/
cpos = rbuf + on;
cend = rbuf + siz;
- dp = (struct direct *)cpos;
- while (cpos < cend && dp->d_ino == 0) {
+ dp = (struct dirent *)cpos;
+ while (cpos < cend && dp->d_fileno == 0) {
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;
}
if (cpos >= cend) {
toff = off;
}
if (cpos >= cend) {
toff = off;
cpos = rbuf + on;
cend = rbuf + siz;
cpos = rbuf + on;
cend = rbuf + siz;
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;
len = 3*NFSX_UNSIGNED; /* paranoia, probably can be 0 */
nfsm_reply(siz);
mp = mp2 = mb;
len = 3*NFSX_UNSIGNED; /* paranoia, probably can be 0 */
nfsm_reply(siz);
mp = mp2 = mb;
/* Loop through the records and build reply */
while (cpos < cend) {
/* Loop through the records and build reply */
while (cpos < cend) {
+ if (dp->d_fileno != 0) {
nlen = dp->d_namlen;
rem = nfsm_rndup(nlen)-nlen;
nlen = dp->d_namlen;
rem = nfsm_rndup(nlen)-nlen;
*/
bzero((caddr_t)&fl.fl_nfh, sizeof (nfsv2fh_t));
ufp->ufid_len = sizeof (struct ufid);
*/
bzero((caddr_t)&fl.fl_nfh, sizeof (nfsv2fh_t));
ufp->ufid_len = sizeof (struct ufid);
- ufp->ufid_ino = dp->d_ino;
+ ufp->ufid_ino = dp->d_fileno;
fl.fl_nfh.fh_generic.fh_fsid = mntp->mnt_stat.f_fsid;
if (VFS_FHTOVP(mntp, (struct fid *)ufp, 1, &nvp))
goto invalid;
fl.fl_nfh.fh_generic.fh_fsid = mntp->mnt_stat.f_fsid;
if (VFS_FHTOVP(mntp, (struct fid *)ufp, 1, &nvp))
goto invalid;
-
- /* Build the directory record xdr from the direct entry */
+ /*
+ * Build the directory record xdr from
+ * the dirent entry.
+ */
nfsm_clget;
*tl = nfs_true;
bp += NFSX_UNSIGNED;
nfsm_clget;
*tl = nfs_true;
bp += NFSX_UNSIGNED;
cp += tsiz;
}
nfsm_clget;
cp += tsiz;
}
nfsm_clget;
- *tl = txdr_unsigned(dp->d_ino);
+ *tl = txdr_unsigned(dp->d_fileno);
bp += NFSX_UNSIGNED;
nfsm_clget;
*tl = txdr_unsigned(nlen);
bp += NFSX_UNSIGNED;
nfsm_clget;
*tl = txdr_unsigned(nlen);
invalid:
toff += dp->d_reclen;
cpos += dp->d_reclen;
invalid:
toff += dp->d_reclen;
cpos += dp->d_reclen;
- dp = (struct direct *)cpos;
+ dp = (struct dirent *)cpos;