summaryrefslogtreecommitdiff
path: root/kern/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/debug.c')
-rw-r--r--kern/debug.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/kern/debug.c b/kern/debug.c
index 26c402d..2ba15fe 100644
--- a/kern/debug.c
+++ b/kern/debug.c
@@ -24,15 +24,18 @@
* the rights to redistribute these changes.
*/
+#include <stdarg.h>
+
#include <mach_kdb.h>
#include <norma_ipc.h>
#include <cpus.h>
#include "cpu_number.h"
#include <kern/lock.h>
-#include <sys/varargs.h>
#include <kern/thread.h>
+#warning missing include for panic()
+void panic(const char *s, ...);
extern void cnputc();
@@ -105,7 +108,7 @@ void Debugger(message)
boolean_t panic_lock_initialized = FALSE;
decl_simple_lock_data(, panic_lock)
-char *panicstr;
+const char *panicstr;
int paniccpu;
void
@@ -120,9 +123,7 @@ panic_init()
/*VARARGS1*/
void
-panic(s, va_alist)
- char * s;
- va_dcl
+panic(const char *s, ...)
{
va_list listp;
#if NORMA_IPC
@@ -152,7 +153,7 @@ panic(s, va_alist)
printf("(cpu %U)", paniccpu);
#endif
printf(": ");
- va_start(listp);
+ va_start(listp, s);
_doprnt(s, &listp, cnputc, 0);
va_end(listp);
printf("\n");
@@ -176,17 +177,14 @@ panic(s, va_alist)
*/
/*VARARGS2*/
void
-log(level, fmt, va_alist)
- int level;
- char * fmt;
- va_dcl
+log(int level, const char *fmt, ...)
{
va_list listp;
#ifdef lint
level++;
#endif
- va_start(listp);
+ va_start(listp, fmt);
_doprnt(fmt, &listp, cnputc, 0);
va_end(listp);
}