From 50591e45d42944457a40a6dc2eb761051dc2054c Mon Sep 17 00:00:00 2001 From: kan Date: Thu, 5 Feb 2004 17:35:28 +0000 Subject: [PATCH] Rename cn_unavailable to cnunavailable for little more consistency. Garbage collect unused cndebug() function. Suggested by: bde --- sys/amd64/amd64/db_interface.c | 4 ++-- sys/i386/i386/db_interface.c | 4 ++-- sys/kern/tty_cons.c | 16 ++-------------- sys/sys/cons.h | 2 +- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index 6a49ef9a9341..cdc3ac33ea2e 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -87,7 +87,7 @@ kdb_trap(int type, int code, struct amd64_saved_state *regs) * our breakpoints by disarming our breakpoints and fixing up * %eip. */ - if (cn_unavailable() != 0 && ddb_mode) { + if (cnunavailable() != 0 && ddb_mode) { if (type == T_TRCTRAP) { regs->tf_rflags &= ~PSL_T; return (1); @@ -327,7 +327,7 @@ Debugger(const char *msg) * OK if the call is for the debugger hotkey but not if the call * is a weak form of panicing. */ - if (cn_unavailable() != 0 && !(boothowto & RB_GDB)) + if (cnunavailable() != 0 && !(boothowto & RB_GDB)) return; if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) { diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c index 6e7b99a58517..79173c77428c 100644 --- a/sys/i386/i386/db_interface.c +++ b/sys/i386/i386/db_interface.c @@ -90,7 +90,7 @@ kdb_trap(int type, int code, struct i386_saved_state *regs) * our breakpoints by disarming our breakpoints and fixing up * %eip. */ - if (cn_unavailable() != 0 && ddb_mode) { + if (cnunavailable() != 0 && ddb_mode) { if (type == T_TRCTRAP) { regs->tf_eflags &= ~PSL_T; return (1); @@ -320,7 +320,7 @@ Debugger(const char *msg) * OK if the call is for the debugger hotkey but not if the call * is a weak form of panicing. */ - if (cn_unavailable() != 0 && !(boothowto & RB_GDB)) + if (cnunavailable() != 0 && !(boothowto & RB_GDB)) return; if (atomic_cmpset_acq_int(&in_Debugger, 0, 1)) { diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index 9a0a12fe698e..835c35a1e49a 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -126,7 +126,6 @@ static char *console_pausestr= ""; struct tty *constty; /* pointer to console "window" tty */ -void cndebug(char *); static void constty_timeout(void *arg); CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -292,23 +291,12 @@ cnavailable(struct consdev *cn, int available) } int -cn_unavailable(void) +cnunavailable(void) { + return (cons_avail_mask == 0); } -void -cndebug(char *str) -{ - int i, len; - - len = strlen(str); - cnputc('>'); cnputc('>'); cnputc('>'); cnputc(' '); - for (i = 0; i < len; i++) - cnputc(str[i]); - cnputc('\n'); -} - /* * XXX: rewrite to use sbufs instead */ diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 3721a39271d4..a8e523a0ef0d 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -104,7 +104,7 @@ int cncheckc(void); int cngetc(void); void cndbctl(int); void cnputc(int); -int cn_unavailable(void); +int cnunavailable(void); #endif /* _KERNEL */