Source-Changes-HG archive

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

[src/trunk]: src/sys Change struct emul's "char e_name[8]" field to "const ch...



details:   https://anonhg.NetBSD.org/src/rev/885ef14ff0c2
branches:  trunk
changeset: 500873:885ef14ff0c2
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Dec 19 22:08:36 2000 +0000

description:
Change struct emul's "char e_name[8]" field to "const char *e_name"
to allow for emulation names >= 8 characters.

diffstat:

 sys/kern/kern_ktrace.c |  6 +++---
 sys/sys/proc.h         |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 46f7c73fdfc3 -r 885ef14ff0c2 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c    Tue Dec 19 21:34:24 2000 +0000
+++ b/sys/kern/kern_ktrace.c    Tue Dec 19 22:08:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ktrace.c,v 1.49 2000/12/11 19:53:06 martin Exp $  */
+/*     $NetBSD: kern_ktrace.c,v 1.50 2000/12/19 22:08:36 scw Exp $     */
 
 /*
  * Copyright (c) 1989, 1993
@@ -172,12 +172,12 @@
 ktremul(struct proc *p)
 {
        struct ktr_header kth;
-       char *emul = p->p_emul->e_name;
+       const char *emul = p->p_emul->e_name;
 
        p->p_traceflag |= KTRFAC_ACTIVE;
        ktrinitheader(&kth, p, KTR_EMUL);
        kth.ktr_len = strlen(emul);
-       kth.ktr_buf = emul;
+       kth.ktr_buf = (caddr_t)emul;
 
        (void) ktrwrite(p, &kth);
        p->p_traceflag &= ~KTRFAC_ACTIVE;
diff -r 46f7c73fdfc3 -r 885ef14ff0c2 sys/sys/proc.h
--- a/sys/sys/proc.h    Tue Dec 19 21:34:24 2000 +0000
+++ b/sys/sys/proc.h    Tue Dec 19 22:08:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.116 2000/12/11 05:29:03 mycroft Exp $       */
+/*     $NetBSD: proc.h,v 1.117 2000/12/19 22:08:36 scw Exp $   */
 
 /*-
  * Copyright (c) 1986, 1989, 1991, 1993
@@ -85,7 +85,7 @@
 struct ps_strings;
 
 struct emul {
-       char    e_name[8];              /* Symbolic name */
+       const char *e_name;             /* Symbolic name */
        const char *e_path;             /* Extra emulation path (NULL if none)*/
 #ifndef __HAVE_MINIMAL_EMUL
        int     e_flags;                /* Miscellaneous flags */



Home | Main Index | Thread Index | Old Index