From: deraadt Date: Fri, 15 Dec 1995 15:39:16 +0000 (+0000) Subject: from ghudson; system now provides cookies, no need to fake them X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c0d1b659ce5ca6f33c3871ced7fec46837a9be0b;p=openbsd from ghudson; system now provides cookies, no need to fake them --- 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);