Source-Changes-HG archive

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

[src/trunk]: src/sys ep_arglen is in units of 'sizeof (char *)', not in units...



details:   https://anonhg.NetBSD.org/src/rev/2b35b93900bc
branches:  trunk
changeset: 472511:2b35b93900bc
user:      cgd <cgd%NetBSD.org@localhost>
date:      Fri Apr 30 23:02:06 1999 +0000

description:
ep_arglen is in units of 'sizeof (char *)', not in units of bytes.  use
howmany(value, sizeof (char *)) to get the right value.

diffstat:

 sys/arch/mips/mips/elf.c    |  4 ++--
 sys/compat/osf1/osf1_exec.c |  6 +++---
 sys/kern/exec_elf32.c       |  4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r dff10d2ee327 -r 2b35b93900bc sys/arch/mips/mips/elf.c
--- a/sys/arch/mips/mips/elf.c  Fri Apr 30 21:40:30 1999 +0000
+++ b/sys/arch/mips/mips/elf.c  Fri Apr 30 23:02:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf.c,v 1.13 1999/04/24 08:10:39 simonb Exp $  */
+/*     $NetBSD: elf.c,v 1.14 1999/04/30 23:02:06 cgd Exp $     */
 /* from: NetBSD: exec_elf.c,v 1.3 1995/09/16 00:28:08 thorpej Exp      */
 
 /*       mips elf shared-library support from Per Fogelstrom's OpenBSD code */
@@ -115,7 +115,7 @@
 #else
        NULL,
 #endif
-       sizeof(Aux32Info) * 8,
+       sizeof(Aux32Info) * 8,                  /* XXX cgd */
        elf_copyargs,
        setregs,
        sigcode,
diff -r dff10d2ee327 -r 2b35b93900bc sys/compat/osf1/osf1_exec.c
--- a/sys/compat/osf1/osf1_exec.c       Fri Apr 30 21:40:30 1999 +0000
+++ b/sys/compat/osf1/osf1_exec.c       Fri Apr 30 23:02:06 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_exec.c,v 1.6 1999/04/30 01:46:09 cgd Exp $ */
+/* $NetBSD: osf1_exec.c,v 1.7 1999/04/30 23:02:06 cgd Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -81,8 +81,8 @@
        OSF1_SYS_MAXSYSCALL,
        osf1_sysent,
        osf1_syscallnames,
-       MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) +
-           2 * (MAXPATHLEN + 1),               /* exec name & loader name */
+       howmany(MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) +
+           2 * (MAXPATHLEN + 1), sizeof (char *)), /* exec & loader names */
        osf1_copyargs,
        cpu_exec_ecoff_setregs,
        osf1_sigcode,
diff -r dff10d2ee327 -r 2b35b93900bc sys/kern/exec_elf32.c
--- a/sys/kern/exec_elf32.c     Fri Apr 30 21:40:30 1999 +0000
+++ b/sys/kern/exec_elf32.c     Fri Apr 30 23:02:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf32.c,v 1.43 1999/02/10 17:03:27 kleink Exp $   */
+/*     $NetBSD: exec_elf32.c,v 1.44 1999/04/30 23:02:06 cgd Exp $      */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -140,7 +140,7 @@
 #else
        NULL,
 #endif
-       ELF_AUX_ENTRIES * sizeof(AuxInfo),
+       howmany(ELF_AUX_ENTRIES * sizeof(AuxInfo), sizeof (char *)),
        ELFNAME(copyargs),
        setregs,
        sigcode,



Home | Main Index | Thread Index | Old Index