Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 Fix build as crash(8); Protect db_m...



details:   https://anonhg.NetBSD.org/src/rev/884f334cb5d2
branches:  trunk
changeset: 949842:884f334cb5d2
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Jan 18 01:38:44 2021 +0000

description:
Fix build as crash(8); Protect db_md_meminfo_cmd() by defined(_KERNEL).

diffstat:

 sys/arch/aarch64/aarch64/db_machdep.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 52b2b076c9f3 -r 884f334cb5d2 sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c     Mon Jan 18 00:32:38 2021 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c     Mon Jan 18 01:38:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.31 2021/01/17 00:23:59 mrg Exp $ */
+/* $NetBSD: db_machdep.c,v 1.32 2021/01/18 01:38:44 rin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.31 2021/01/17 00:23:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.32 2021/01/18 01:38:44 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -79,7 +79,9 @@
 #if defined(_KERNEL) && defined(MULTIPROCESSOR)
 void db_md_switch_cpu_cmd(db_expr_t, bool, db_expr_t, const char *);
 #endif
+#if defined(_KERNEL)
 static void db_md_meminfo_cmd(db_expr_t, bool, db_expr_t, const char *);
+#endif
 
 const struct db_command db_machine_command_table[] = {
 #if defined(_KERNEL) && defined(MULTIPROCESSOR)
@@ -1083,6 +1085,7 @@
 }
 #endif
 
+#if defined(_KERNEL)
 static void
 db_md_meminfo_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
     const char *modif)
@@ -1097,3 +1100,4 @@
                    bootconfig.dram[blk].pages);
        }
 }
+#endif



Home | Main Index | Thread Index | Old Index