summaryrefslogtreecommitdiff
path: root/sys/compat/sunos/sunos_misc.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-10 00:16:13 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-10 00:16:13 +0000
commit3e01cdc2fb4d15a5bd8a0675450ba943bc9a0059 (patch)
treef8ae8011cd8a05047f8e60574cf4e7fe7d5050c6 /sys/compat/sunos/sunos_misc.c
parent89bb5cf80c913788c0ea306ae547b6e180496f15 (diff)
Correct directory entry reads, big directories lost entries as it were.
Also, fix the NCR SVR4 rdebug syscall emulation.
Diffstat (limited to 'sys/compat/sunos/sunos_misc.c')
-rw-r--r--sys/compat/sunos/sunos_misc.c7
1 files changed, 4 insertions, 3 deletions
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