summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-02 04:59:23 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-02 04:59:23 +0000
commitcff85ee6e151ec56a32b923ed785d2276a6075be (patch)
tree37b6834ef561d5d7a26c59365f90c0e025ed0df6 /sys/lib/libsa
parent366eaf9a00bba2463786e89d79569e9030ec6eae (diff)
add dumb probe routine
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/cons.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/lib/libsa/cons.c b/sys/lib/libsa/cons.c
index 3dc3a10a3c8..2e38e664f34 100644
--- a/sys/lib/libsa/cons.c
+++ b/sys/lib/libsa/cons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cons.c,v 1.1 1996/10/23 09:02:53 mickey Exp $ */
+/* $OpenBSD: cons.c,v 1.2 1997/04/02 04:59:22 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -36,6 +36,18 @@
struct consw *console = &consw[0];
+int
+cons_probe()
+{
+ int i;
+ for (i = 0; i < ncons; i++) {
+ if ((consw[i].cn_probe)() != 0)
+ printf("%s present\n", consw[i].name);
+ }
+ printf("using %s console\n", console->name);
+ return 1;
+}
+
void
putc(c)
int c;