summaryrefslogtreecommitdiff
path: root/sys/compat/sunos/sunos_misc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-15 15:39:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-15 15:39:17 +0000
commitac2cb94ddfd4ff761154f9317bd25b99106df8db (patch)
tree5b0aa53f2ef878d9ac33e61f04e6b624ac6e77a3 /sys/compat/sunos/sunos_misc.c
parentae8c808917ce76fa026a9c37892736e088885597 (diff)
from ghudson; system now provides cookies, no need to fake them
Diffstat (limited to 'sys/compat/sunos/sunos_misc.c')
-rw-r--r--sys/compat/sunos/sunos_misc.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c
index cd87c67d981..706f1132011 100644
--- a/sys/compat/sunos/sunos_misc.c
+++ b/sys/compat/sunos/sunos_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sunos_misc.c,v 1.56.2.1 1995/10/13 19:57:44 pk Exp $ */
+/* $NetBSD: sunos_misc.c,v 1.59 1995/12/14 18:44:44 ghudson Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -372,30 +372,8 @@ again:
*/
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, cookiebuf,
ncookies);
- if (error) {
- off_t coff;
-
- if (error != EINVAL)
- goto out;
- error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, 0, 0);
- if (error)
- goto out;
-
- /* Fake the cookies */
- error = 0;
- inp = buf;
- len = buflen - auio.uio_resid;
- coff = off;
- cookie = cookiebuf;
- for (; len > 0; len -= reclen) {
- reclen = ((struct dirent *)inp)->d_reclen;
- if (reclen & 3)
- panic("sunos_getdents");
- coff += reclen; /* each entry points to next */
- *cookie++ = coff;
- inp += reclen;
- }
- }
+ if (error)
+ goto out;
inp = buf;
outp = SCARG(uap, buf);