sort the dependencies between terminal devices a bit and add consistency

checks to catch conflicting devices at compile time
This commit is contained in:
drochner 1999-02-06 18:46:21 +00:00
parent 96a46ed7b1
commit bce7f71843
4 changed files with 36 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.336 1999/01/28 20:06:31 christos Exp $ */
/* $NetBSD: machdep.c,v 1.337 1999/02/06 18:46:21 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -184,16 +184,6 @@
extern struct proc *npxproc;
#endif
#include "pc.h"
#if (NPC > 0)
#include <machine/pccons.h>
#endif
#include "vt.h"
#if (NVT > 0)
#include <i386/isa/pcvt/pcvt_cons.h>
#endif
#include "vga.h"
#include "pcdisplay.h"
#if (NVGA > 0) || (NPCDISPLAY > 0)
@ -213,6 +203,16 @@ extern struct proc *npxproc;
#include <dev/isa/pckbcvar.h>
#endif
#include "pc.h"
#if (NPC > 0)
#include <machine/pccons.h>
#endif
#include "vt.h"
#if (NVT > 0)
#include <i386/isa/pcvt/pcvt_cons.h>
#endif
#include "com.h"
#if (NCOM > 0)
#include <sys/termios.h>
@ -2223,7 +2223,7 @@ pckbc_machdep_cnattach(kbctag, kbcslot)
pckbc_tag_t kbctag;
pckbc_slot_t kbcslot;
{
#if (NPC > 0)
#if (NPC > 0) && (NPCCONSKBD > 0)
return (pcconskbd_cnattach(kbctag, kbcslot));
#else
return (ENXIO);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccons.h,v 1.7 1998/03/22 17:49:00 drochner Exp $ */
/* $NetBSD: pccons.h,v 1.8 1999/02/06 18:46:21 drochner Exp $ */
/*
* pccons.h -- pccons ioctl definitions
@ -17,9 +17,7 @@
#ifdef _KERNEL
int pccnattach __P((void));
#include "pckbc.h"
#if (NPCKBC > 0)
#include <dev/isa/pckbcvar.h>
#if (NPCCONSKBD > 0)
int pcconskbd_cnattach __P((pckbc_tag_t, pckbc_slot_t));
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccons.c,v 1.133 1998/11/05 15:59:00 mellon Exp $ */
/* $NetBSD: pccons.c,v 1.134 1999/02/06 18:46:21 drochner Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -106,6 +106,19 @@
#if (NPCCONSKBD > 0)
#include <machine/bus.h>
#include <dev/isa/pckbcvar.h>
#else
/* consistency check: plain pccons can't coexist with pckbc */
#include "pckbc.h"
#if (NPCKBC > 0)
#error "(pc without pcconskbd) and pckbc can't coexist"
#endif
#endif /* NPCCONSKBD */
/* consistency check: pccons can't coexist with vga or pcdisplay */
#include "vga.h"
#include "pcdisplay.h"
#if (NVGA > 0) || (NPCDISPLAY > 0)
#error "pc and (vga or pcdisplay) can't coexist"
#endif
#include <machine/cpu.h>

View File

@ -88,6 +88,14 @@
#include "pcvt_hdr.h" /* global include */
#include "pcvt_cons.h" /* NetBSD only */
/* consistency check: pcvt can't coexist with pckbc, vga or pcdisplay */
#include "pckbc.h"
#include "vga.h"
#include "pcdisplay.h"
#if (NPCKBC > 0) || (NVGA > 0) || (NPCDISPLAY > 0)
#error "pcvt and (pckbc or vga or pcdisplay) can't coexist"
#endif
#ifdef NOTDEF
unsigned __debug = 0; /*0xffe */;
static __color;