Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen cleanup debugging code



details:   https://anonhg.NetBSD.org/src/rev/7fbd5d6d14b0
branches:  trunk
changeset: 566378:7fbd5d6d14b0
user:      cl <cl%NetBSD.org@localhost>
date:      Fri May 07 13:56:48 2004 +0000

description:
cleanup debugging code

diffstat:

 sys/arch/xen/include/xen.h   |   4 ++--
 sys/arch/xen/xen/xen_debug.c |  24 +++++++++++++++++-------
 2 files changed, 19 insertions(+), 9 deletions(-)

diffs (94 lines):

diff -r 2966f95aeb52 -r 7fbd5d6d14b0 sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h        Fri May 07 13:52:37 2004 +0000
+++ b/sys/arch/xen/include/xen.h        Fri May 07 13:56:48 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen.h,v 1.5 2004/04/26 23:54:42 cl Exp $       */
+/*     $NetBSD: xen.h,v 1.6 2004/05/07 13:56:48 cl Exp $       */
 
 /*
  *
@@ -56,6 +56,7 @@
 
 #ifdef XENDEBUG
 void printk(const char *, ...);
+void vprintk(const char *, va_list);
 #endif
 
 #endif
@@ -109,7 +110,6 @@
 
 /* some function prototypes */
 void trap_init(void);
-void dump_regs(struct trapframe *regs);
 
 
 /*
diff -r 2966f95aeb52 -r 7fbd5d6d14b0 sys/arch/xen/xen/xen_debug.c
--- a/sys/arch/xen/xen/xen_debug.c      Fri May 07 13:52:37 2004 +0000
+++ b/sys/arch/xen/xen/xen_debug.c      Fri May 07 13:56:48 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_debug.c,v 1.1 2004/03/11 21:44:08 cl Exp $ */
+/*     $NetBSD: xen_debug.c,v 1.2 2004/05/07 13:56:48 cl Exp $ */
 
 /*
  *
@@ -56,7 +56,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_debug.c,v 1.1 2004/03/11 21:44:08 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_debug.c,v 1.2 2004/05/07 13:56:48 cl Exp $");
 
 #define XENDEBUG
 
@@ -84,6 +84,17 @@
        (void)HYPERVISOR_console_write(buf, ret);
 }
 
+void
+vprintk(const char *fmt, va_list ap)
+{
+       int ret;
+       static char buf[PRINTK_BUFSIZE];
+
+       ret = vsnprintf(buf, PRINTK_BUFSIZE - 1, fmt, ap);
+       buf[ret] = 0;
+       (void)HYPERVISOR_console_write(buf, ret);
+}
+
 #endif
 
 #ifdef XENDEBUG_LOW
@@ -198,7 +209,7 @@
 
 
 
-void do_exit(void);
+static void do_exit(void);
 
 /*
  * These are assembler stubs in vector.S.
@@ -224,7 +235,7 @@
 void spurious_interrupt_bug(void);
 void machine_check(void);
 
-void
+static void
 dump_regs(struct pt_regs *regs)
 {
        int in_kernel = 1;
@@ -388,12 +399,11 @@
 {
 }
 
-void
+static void
 do_exit(void)
 {
 
-       printk("xen_exit_handler called!\n");
-       for (;;);
+       HYPERVISOR_exit();
 }
 
 /*



Home | Main Index | Thread Index | Old Index