summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--device/cons.c2
-rw-r--r--device/cons.h10
-rw-r--r--i386/i386at/model_dep.c2
-rw-r--r--kern/printf.c6
-rw-r--r--linux/dev/kernel/printk.c2
6 files changed, 29 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index db0b80f..d2e106e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-07-15 Barry deFreese <bddebian@comcast.net>
+
+ * device/cons.c (cnputc): Turn parameter `c' into a char.
+ * device/cons.h (cninit, cngetc, cnmaygetc, cnputc): Add prototypes.
+ * i386/i386at/model_dep.c: Include <device/cons.h>
+ * kern/printf.c: Include <device/cons.h>
+ (cnputc): Remove prototype.
+ (vprintf, iprintf): Explicitely cast cnputc into the type _doprnt
+ expects.
+ * linux/dev/kernel/printk.c: Include <device/cons.h>
+ (cnputc): Remove prototype.
+
2008-07-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* linux/src/drivers/net/rtl8139.c (rtl8129_open): Move IRQ
diff --git a/device/cons.c b/device/cons.c
index 7fdb959..fb96d69 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -250,7 +250,7 @@ cnmaygetc()
void
cnputc(c)
- int c;
+ char c;
{
if (c == 0)
return;
diff --git a/device/cons.h b/device/cons.h
index dbe2993..be33d2b 100644
--- a/device/cons.h
+++ b/device/cons.h
@@ -21,6 +21,8 @@
* Utah $Hdr: cons.h 1.10 94/12/14$
*/
+#include <sys/types.h>
+
struct consdev {
#ifdef MACH_KERNEL
char *cn_name; /* name of device in dev_name_list */
@@ -47,3 +49,11 @@ struct consdev {
#ifdef KERNEL
extern struct consdev constab[];
#endif
+
+extern void cninit();
+
+extern int cngetc();
+
+extern int cnmaygetc();
+
+extern void cnputc(char);
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index d3d9ca6..fca4b94 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -34,6 +34,8 @@
#include <string.h>
+#include <device/cons.h>
+
#include <mach/vm_param.h>
#include <mach/vm_prot.h>
#include <mach/machine.h>
diff --git a/kern/printf.c b/kern/printf.c
index 99dffbd..88a527b 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -114,6 +114,7 @@
*/
#include <string.h>
+#include <device/cons.h>
#include <kern/printf.h>
#include <mach/boolean.h>
#include <kern/lock.h>
@@ -510,11 +511,10 @@ void _doprnt(
/*
* Printing (to console)
*/
-extern void cnputc( char, /*not really*/vm_offset_t);
int vprintf(const char *fmt, va_list listp)
{
- _doprnt(fmt, &listp, cnputc, 16, 0);
+ _doprnt(fmt, &listp, (void (*)( char, vm_offset_t)) cnputc, 16, 0);
return 0;
}
@@ -550,7 +550,7 @@ void iprintf(const char *fmt, ...)
}
}
va_start(listp, fmt);
- _doprnt(fmt, &listp, cnputc, 16, 0);
+ _doprnt(fmt, &listp, (void (*)( char, vm_offset_t)) cnputc, 16, 0);
va_end(listp);
}
diff --git a/linux/dev/kernel/printk.c b/linux/dev/kernel/printk.c
index 9dc86cb..1c45b24 100644
--- a/linux/dev/kernel/printk.c
+++ b/linux/dev/kernel/printk.c
@@ -27,6 +27,7 @@
#include <stdarg.h>
#include <asm/system.h>
#include <kern/assert.h>
+#include <device/cons.h>
static char buf[2048];
@@ -40,7 +41,6 @@ printk (char *fmt, ...)
{
va_list args;
int n, flags;
- extern void cnputc ();
char *p, *msg, *buf_end;
static int msg_level = -1;