From 3e01cdc2fb4d15a5bd8a0675450ba943bc9a0059 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Wed, 10 Feb 1999 00:16:13 +0000 Subject: Correct directory entry reads, big directories lost entries as it were. Also, fix the NCR SVR4 rdebug syscall emulation. --- sys/compat/sunos/sunos_misc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/compat/sunos/sunos_misc.c') diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index 8d1cfb82e8c..c7afdbe8b4d 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_misc.c,v 1.20 1998/03/23 07:12:39 millert Exp $ */ +/* $OpenBSD: sunos_misc.c,v 1.21 1999/02/10 00:16:12 niklas Exp $ */ /* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */ /* @@ -447,10 +447,10 @@ again: bdp = (struct dirent *)inp; reclen = bdp->d_reclen; if (reclen & 3) - panic("sunos_getdents"); - off = *cookie++; /* each entry points to next */ + panic("sunos_getdents: bad reclen"); if (bdp->d_fileno == 0) { inp += reclen; /* it is a hole; squish it out */ + off = *cookie++; continue; } sunos_reclen = SUNOS_RECLEN(&idb, bdp->d_namlen); @@ -459,6 +459,7 @@ again: outp++; break; } + off = *cookie++; /* each entry points to next */ /* * Massage in place to make a Sun-shaped dirent (otherwise * we have to worry about touching user memory outside of -- cgit v1.2.3