diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-13 05:52:28 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-08-13 05:52:28 +0000 |
commit | f2b95a621a9fd41d222844eda237f607eb14d49c (patch) | |
tree | 38d62981cd1caedc3a6a01713c2e4266107b7220 /sys/ufs/ext2fs | |
parent | bee789b12305f3c5e594fe03c965e0786969eeb7 (diff) |
Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
Diffstat (limited to 'sys/ufs/ext2fs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_lookup.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c index 79c3729fc72..b8c9837a902 100644 --- a/sys/ufs/ext2fs/ext2fs_lookup.c +++ b/sys/ufs/ext2fs/ext2fs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_lookup.c,v 1.28 2013/05/30 19:19:09 guenther Exp $ */ +/* $OpenBSD: ext2fs_lookup.c,v 1.29 2013/08/13 05:52:27 guenther Exp $ */ /* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */ /* @@ -139,8 +139,6 @@ ext2fs_readdir(void *v) struct iovec aiov; caddr_t dirbuf; off_t off = uio->uio_offset; - u_long *cookies = NULL; - int nc = 0, ncookies = 0; int e2d_reclen; if (vp->v_type != VDIR) @@ -161,11 +159,6 @@ ext2fs_readdir(void *v) aiov.iov_len = e2fs_count; auio.uio_resid = e2fs_count; dirbuf = malloc(e2fs_count, M_TEMP, M_WAITOK | M_ZERO); - if (ap->a_ncookies) { - nc = ncookies = e2fs_count / 16; - cookies = malloc(sizeof(*cookies) * ncookies, M_TEMP, M_WAITOK); - *ap->a_cookies = cookies; - } aiov.iov_base = dirbuf; error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred); @@ -182,16 +175,11 @@ ext2fs_readdir(void *v) if(dstd.d_reclen > uio->uio_resid) { break; } + dstd.d_off = off + e2d_reclen; if ((error = uiomove((caddr_t)&dstd, dstd.d_reclen, uio)) != 0) { break; } off = off + e2d_reclen; - if (cookies != NULL) { - *cookies++ = off; - if (--ncookies <= 0){ - break; /* out of cookies */ - } - } /* advance dp */ dp = (struct ext2fs_direct *) ((char *)dp + e2d_reclen); } @@ -200,14 +188,6 @@ ext2fs_readdir(void *v) } free(dirbuf, M_TEMP); *ap->a_eofflag = ext2fs_size(VTOI(ap->a_vp)) <= uio->uio_offset; - if (ap->a_ncookies) { - if (error) { - free(*ap->a_cookies, M_TEMP); - *ap->a_ncookies = 0; - *ap->a_cookies = NULL; - } else - *ap->a_ncookies = nc - ncookies; - } return (error); } |