Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Make this compile with __HAVE_MINIMAL_EMUL.



details:   https://anonhg.NetBSD.org/src/rev/a83bf0ec97fd
branches:  trunk
changeset: 537687:a83bf0ec97fd
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Fri Oct 04 18:34:10 2002 +0000

description:
Make this compile with __HAVE_MINIMAL_EMUL.

diffstat:

 sys/kern/kern_xxx.c |  30 ++++++++++++++++++++++--------
 1 files changed, 22 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r 7519b6ec0840 -r a83bf0ec97fd sys/kern/kern_xxx.c
--- a/sys/kern/kern_xxx.c       Fri Oct 04 18:33:03 2002 +0000
+++ b/sys/kern/kern_xxx.c       Fri Oct 04 18:34:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_xxx.c,v 1.49 2002/06/19 23:35:35 eeh Exp $        */
+/*     $NetBSD: kern_xxx.c,v 1.50 2002/10/04 18:34:10 junyoung Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_xxx.c,v 1.49 2002/06/19 23:35:35 eeh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_xxx.c,v 1.50 2002/10/04 18:34:10 junyoung Exp $");
 
 #include "opt_syscall_debug.h"
 
@@ -107,12 +107,19 @@
 
        em = p->p_emul;
        sy = &em->e_sysent[code];
-       if (!(scdebug & SCDEBUG_ALL || code < 0 || code >= em->e_nsysent ||
-            sy->sy_call == sys_nosys))
+       if (!(scdebug & SCDEBUG_ALL || code < 0
+#ifndef __HAVE_MINIMAL_EMUL
+           || code >= em->e_nsysent
+#endif
+           || sy->sy_call == sys_nosys))
                return;
                
        printf("proc %d (%s): %s num ", p->p_pid, p->p_comm, em->e_name);
-       if (code < 0 || code >= em->e_nsysent)
+       if (code < 0
+#ifndef __HAVE_MINIMAL_EMUL
+           || code >= em->e_nsysent
+#endif
+           )
                printf("OUT OF RANGE (%ld)", (long)code);
        else {
                printf("%ld call: %s", (long)code, em->e_syscallnames[code]);
@@ -142,12 +149,19 @@
 
        em = p->p_emul;
        sy = &em->e_sysent[code];
-       if (!(scdebug & SCDEBUG_ALL || code < 0 || code >= em->e_nsysent ||
-           sy->sy_call == sys_nosys))
+       if (!(scdebug & SCDEBUG_ALL || code < 0 
+#ifndef __HAVE_MINIMAL_EMUL
+           || code >= em->e_nsysent
+#endif
+           || sy->sy_call == sys_nosys))
                return;
                
        printf("proc %d (%s): %s num ", p->p_pid, p->p_comm, em->e_name);
-       if (code < 0 || code >= em->e_nsysent)
+       if (code < 0
+#ifndef __HAVE_MINIMAL_EMUL
+           || code >= em->e_nsysent
+#endif
+           )
                printf("OUT OF RANGE (%ld)", (long)code);
        else
                printf("%ld ret: err = %d, rv = 0x%lx,0x%lx", (long)code,



Home | Main Index | Thread Index | Old Index