summaryrefslogtreecommitdiff
path: root/device/cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'device/cons.c')
-rw-r--r--device/cons.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/device/cons.c b/device/cons.c
index f26f22c5..b04621ae 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -30,9 +30,9 @@
#ifdef MACH_KMSG
#include <device/io_req.h>
#include <device/kmsg.h>
-#endif
+#endif /* MACH_KMSG */
-static int cn_inited = 0;
+static boolean_t cn_inited = FALSE;
static struct consdev *cn_tab = 0; /* physical console device info */
/*
@@ -42,8 +42,8 @@ static struct consdev *cn_tab = 0; /* physical console device info */
* is enabled. This can be useful to debug (or catch panics from) code early
* in the bootstrap procedure.
*/
-int (*romgetc)() = 0;
-void (*romputc)() = 0;
+int (*romgetc)(char c) = 0;
+void (*romputc)(char c) = 0;
#if CONSBUFSIZE > 0
/*
@@ -54,11 +54,11 @@ void (*romputc)() = 0;
*/
static char consbuf[CONSBUFSIZE] = { 0 };
static char *consbp = consbuf;
-static int consbufused = 0;
-#endif
+static boolean_t consbufused = FALSE;
+#endif /* CONSBUFSIZE > 0 */
void
-cninit()
+cninit(void)
{
struct consdev *cp;
dev_ops_t cn_ops;
@@ -106,10 +106,10 @@ cninit()
if (++cbp == &consbuf[CONSBUFSIZE])
cbp = consbuf;
} while (cbp != consbp);
- consbufused = 0;
+ consbufused = FALSE;
}
-#endif
- cn_inited = 1;
+#endif /* CONSBUFSIZE > 0 */
+ cn_inited = TRUE;
return;
}
/*
@@ -120,7 +120,7 @@ cninit()
int
-cngetc()
+cngetc(void)
{
if (cn_tab)
return ((*cn_tab->cn_getc)(cn_tab->cn_dev, 1));
@@ -130,7 +130,7 @@ cngetc()
}
int
-cnmaygetc()
+cnmaygetc(void)
{
if (cn_tab)
return((*cn_tab->cn_getc)(cn_tab->cn_dev, 0));
@@ -171,14 +171,14 @@ cnputc(c)
}
#if CONSBUFSIZE > 0
else {
- if (consbufused == 0) {
+ if (consbufused == FALSE) {
consbp = consbuf;
- consbufused = 1;
+ consbufused = TRUE;
memset(consbuf, 0, CONSBUFSIZE);
}
*consbp++ = c;
if (consbp >= &consbuf[CONSBUFSIZE])
consbp = consbuf;
}
-#endif
+#endif /* CONSBUFSIZE > 0 */
}