diff options
author | dfr <dfr@FreeBSD.org> | 1995-08-03 12:17:35 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1995-08-03 12:17:35 +0000 |
commit | 8e921b69e6dc23af2b7eedee6a59827d4bf111cd (patch) | |
tree | 5543e309f186e04644ec5d7353275a1912ce08f6 /sys | |
parent | 5c52c134bf2652fb2ae7ba3735fc75695080ae0b (diff) | |
download | FreeBSD-src-8e921b69e6dc23af2b7eedee6a59827d4bf111cd.zip FreeBSD-src-8e921b69e6dc23af2b7eedee6a59827d4bf111cd.tar.gz |
Make sure that a non-null cookie vector is returned even if there were no
valid entries in the block. Doing otherwise confuses the nfs server.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 10 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 945ca49..1c7e8b8 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.19 1995/08/01 18:50:55 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.20 1995/08/02 12:59:49 dfr Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -1554,6 +1554,14 @@ msdosfs_readdir(ap) if (diff <= 0) { if(ap->a_eofflag) *ap->a_eofflag = 1; + if(ap->a_ncookies != NULL) { + u_int *cookies; + + MALLOC(cookies, u_int *, 1 * sizeof(u_int), + M_TEMP, M_WAITOK); + *ap->a_ncookies = 0; + *ap->a_cookies = cookies; + } return 0; } if (diff < n) diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 945ca49..1c7e8b8 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.19 1995/08/01 18:50:55 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.20 1995/08/02 12:59:49 dfr Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -1554,6 +1554,14 @@ msdosfs_readdir(ap) if (diff <= 0) { if(ap->a_eofflag) *ap->a_eofflag = 1; + if(ap->a_ncookies != NULL) { + u_int *cookies; + + MALLOC(cookies, u_int *, 1 * sizeof(u_int), + M_TEMP, M_WAITOK); + *ap->a_ncookies = 0; + *ap->a_cookies = cookies; + } return 0; } if (diff < n) |