Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/common change a hard-coded 0xf to _DIRENT_ALIGN (...



details:   https://anonhg.NetBSD.org/src/rev/c58b35fedf42
branches:  trunk
changeset: 583689:c58b35fedf42
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 19 06:01:00 2005 +0000

description:
change a hard-coded 0xf to _DIRENT_ALIGN (thanks yamt)

diffstat:

 sys/compat/common/vfs_syscalls_30.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e913c310372e -r c58b35fedf42 sys/compat/common/vfs_syscalls_30.c
--- a/sys/compat/common/vfs_syscalls_30.c       Fri Aug 19 05:28:48 2005 +0000
+++ b/sys/compat/common/vfs_syscalls_30.c       Fri Aug 19 06:01:00 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls_30.c,v 1.1 2005/08/19 02:03:57 christos Exp $     */
+/*     $NetBSD: vfs_syscalls_30.c,v 1.2 2005/08/19 06:01:00 christos Exp $     */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.1 2005/08/19 02:03:57 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_30.c,v 1.2 2005/08/19 06:01:00 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -253,7 +253,7 @@
        for (cookie = cookiebuf; len > 0; len -= reclen) {
                bdp = (struct dirent *)inp;
                reclen = bdp->d_reclen;
-               if (reclen & 0xf)
+               if (reclen & _DIRENT_ALIGN(bdp))
                        panic("netbsd30_getdents: bad reclen %d", reclen);
                if (cookie)
                        off = *cookie++; /* each entry points to the next */



Home | Main Index | Thread Index | Old Index