summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-09 10:35:05 +0000
committerphk <phk@FreeBSD.org>1999-08-09 10:35:05 +0000
commitee871b6440719fbe58a0cb8e994ad543265f4e1a (patch)
tree5e644fe7bdaf6b601abb674aac52092ad3fd8b45 /sys/kern
parentf0f8bd1b55697613d6f80eb5c65838ecc4b246e6 (diff)
downloadFreeBSD-src-ee871b6440719fbe58a0cb8e994ad543265f4e1a.zip
FreeBSD-src-ee871b6440719fbe58a0cb8e994ad543265f4e1a.tar.gz
Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_shutdown.c4
-rw-r--r--sys/kern/subr_prf.c4
-rw-r--r--sys/kern/subr_smp.c5
-rw-r--r--sys/kern/tty_cons.c16
4 files changed, 11 insertions, 18 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 8cc58ca..5b18718 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_shutdown.c,v 1.56 1999/07/20 20:55:50 green Exp $
+ * $Id: kern_shutdown.c,v 1.57 1999/07/20 21:29:13 green Exp $
*/
#include "opt_ddb.h"
@@ -57,10 +57,10 @@
#include <sys/sysctl.h>
#include <sys/conf.h>
#include <sys/sysproto.h>
+#include <sys/cons.h>
#include <machine/pcb.h>
#include <machine/clock.h>
-#include <machine/cons.h>
#include <machine/md_var.h>
#ifdef SMP
#include <machine/smp.h> /* smp_active, cpuid */
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 69bd3a8..932b6e5 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.58 1999/07/24 09:34:12 dfr Exp $
+ * $Id: subr_prf.c,v 1.59 1999/08/07 20:13:32 green Exp $
*/
#include <sys/param.h>
@@ -48,7 +48,7 @@
#include <sys/tty.h>
#include <sys/tprintf.h>
#include <sys/syslog.h>
-#include <machine/cons.h>
+#include <sys/cons.h>
/*
* Note that stdarg.h and the ANSI style va_start macro is used for both
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index e81efef..969cd08 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.105 1999/06/23 23:02:38 msmith Exp $
+ * $Id: mp_machdep.c,v 1.106 1999/07/20 06:52:26 msmith Exp $
*/
#include "opt_smp.h"
@@ -45,6 +45,7 @@
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
+#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -73,8 +74,6 @@
#include <machine/cputypes.h>
#include <machine/globaldata.h>
-#include <i386/i386/cons.h> /* cngetc() */
-
#if defined(APIC_IO)
#include <machine/md_var.h> /* setidt() */
#include <i386/isa/icu.h> /* IPIs */
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 92544f8..5d57712 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.69 1999/06/26 12:19:03 peter Exp $
+ * $Id: tty_cons.c,v 1.70 1999/07/24 09:41:06 yokota Exp $
*/
#include "opt_devfs.h"
@@ -53,9 +53,9 @@
#include <sys/proc.h>
#include <sys/tty.h>
#include <sys/uio.h>
+#include <sys/cons.h>
#include <machine/cpu.h>
-#include <machine/cons.h>
static d_open_t cnopen;
static d_close_t cnclose;
@@ -435,21 +435,15 @@ cnputc(c)
}
}
-static int cn_devsw_installed;
-
static void
cn_drvinit(void *unused)
{
- if( ! cn_devsw_installed ) {
- cdevsw_add(&cn_cdevsw);
- cn_devsw_installed = 1;
+ cdevsw_add(&cn_cdevsw);
#ifdef DEVFS
- cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600,
- "console");
+ cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR,
+ UID_ROOT, GID_WHEEL, 0600, "console");
#endif
- }
}
SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)
OpenPOWER on IntegriCloud