Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Introduce null console. This pseudo device acts as a nor...
details: https://anonhg.NetBSD.org/src/rev/aad8de0cb4b2
branches: trunk
changeset: 553478:aad8de0cb4b2
user: cdi <cdi%NetBSD.org@localhost>
date: Fri Oct 17 18:16:42 2003 +0000
description:
Introduce null console. This pseudo device acts as a normal console with the
exception that it discards any output, and is useful for booting the kernel
on headless boxes.
diffstat:
sys/conf/files | 4 +++-
sys/dev/cons.c | 6 +++---
sys/dev/cons.h | 12 ++++++++----
3 files changed, 14 insertions(+), 8 deletions(-)
diffs (86 lines):
diff -r 8b76a1dbe812 -r aad8de0cb4b2 sys/conf/files
--- a/sys/conf/files Fri Oct 17 18:15:52 2003 +0000
+++ b/sys/conf/files Fri Oct 17 18:16:42 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.641 2003/10/13 08:34:15 dyoung Exp $
+# $NetBSD: files,v 1.642 2003/10/17 18:16:42 cdi Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -984,6 +984,7 @@
defpseudo tb: tty
defpseudo rnd
defpseudo ksyms
+defpseudo nullcons
defpseudo loop: ifnet
defpseudo sl: ifnet
@@ -1084,6 +1085,7 @@
file dev/midisyn.c midisyn
file dev/mm.c
file dev/mulaw.c mulaw
+file dev/nullcons_subr.c nullcons needs-flag
file dev/radio.c radio needs-flag
file dev/rnd.c rnd needs-flag
file dev/rndpool.c rnd needs-flag
diff -r 8b76a1dbe812 -r aad8de0cb4b2 sys/dev/cons.c
--- a/sys/dev/cons.c Fri Oct 17 18:15:52 2003 +0000
+++ b/sys/dev/cons.c Fri Oct 17 18:16:42 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cons.c,v 1.50 2003/10/03 13:15:52 dsl Exp $ */
+/* $NetBSD: cons.c,v 1.51 2003/10/17 18:16:43 cdi Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.50 2003/10/03 13:15:52 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.51 2003/10/17 18:16:43 cdi Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -109,7 +109,7 @@
};
struct tty *constty = NULL; /* virtual console output device */
-struct consdev *cn_tab; /* physical console device info */
+struct consdev *cn_tab = NULL; /* physical console device info */
struct vnode *cn_devvp[2]; /* vnode for underlying device. */
int
diff -r 8b76a1dbe812 -r aad8de0cb4b2 sys/dev/cons.h
--- a/sys/dev/cons.h Fri Oct 17 18:15:52 2003 +0000
+++ b/sys/dev/cons.h Fri Oct 17 18:16:42 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cons.h,v 1.21 2003/08/07 16:30:51 agc Exp $ */
+/* $NetBSD: cons.h,v 1.22 2003/10/17 18:16:43 cdi Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -103,9 +103,10 @@
/* values for cn_pri - reflect our policy for console selection */
#define CN_DEAD 0 /* device doesn't exist */
-#define CN_NORMAL 1 /* device exists but is nothing special */
-#define CN_INTERNAL 2 /* "internal" bit-mapped display */
-#define CN_REMOTE 3 /* serial interface with remote bit set */
+#define CN_NULL 1 /* noop console */
+#define CN_NORMAL 2 /* device exists but is nothing special */
+#define CN_INTERNAL 3 /* "internal" bit-mapped display */
+#define CN_REMOTE 4 /* serial interface with remote bit set */
#ifdef _KERNEL
@@ -121,7 +122,10 @@
void cnflush __P((void));
void cnhalt __P((void));
void cnrint __P((void));
+void nullcnprobe __P((struct consdev *));
+void nullcninit __P((struct consdev *));
void nullcnpollc __P((dev_t, int));
+void nullconsattach __P((int));
/* console-specific types */
#define dev_type_cnprobe(n) void n __P((struct consdev *))
Home |
Main Index |
Thread Index |
Old Index