diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-10 00:16:13 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-10 00:16:13 +0000 |
commit | 3e01cdc2fb4d15a5bd8a0675450ba943bc9a0059 (patch) | |
tree | f8ae8011cd8a05047f8e60574cf4e7fe7d5050c6 /sys/compat/linux | |
parent | 89bb5cf80c913788c0ea306ae547b6e180496f15 (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/linux')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 0c55ea08585..b728b758d24 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.18 1998/07/05 20:49:12 downsj Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.19 1999/02/10 00:16:12 niklas Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /* @@ -853,7 +853,7 @@ again: bdp = (struct dirent *)inp; reclen = bdp->d_reclen; if (reclen & 3) - panic("linux_readdir"); + panic("linux_readdir: bad reclen"); if (bdp->d_fileno == 0) { inp += reclen; /* it is a hole; squish it out */ off = *cookie++; @@ -863,15 +863,16 @@ again: if (reclen > len || resid < linux_reclen) { /* entry too big for buffer, so just stop */ outp++; - off = *cookie++; break; } + /* * Massage in place to make a Linux-shaped dirent (otherwise * we have to worry about touching user memory outside of * the copyout() call). */ idb.d_ino = (linux_ino_t)bdp->d_fileno; + /* * The old readdir() call misuses the offset and reclen fields. */ |