diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-02-10 10:06:49 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-02-10 10:06:49 +0000 |
commit | 3173c27d2e8308fe5b249684fca9fd9b7c4e177a (patch) | |
tree | 038a0fd5b3044588d5be669d64be2febf1a8a288 /sys/arch/mvme88k/dev/bugtty.c | |
parent | 877e106aa199d66a24388b46599c39a439dc4568 (diff) |
Fix cnprobe() and cninit() prototypes.
Also, provide a better test for bugtty attachment.
Diffstat (limited to 'sys/arch/mvme88k/dev/bugtty.c')
-rw-r--r-- | sys/arch/mvme88k/dev/bugtty.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/sys/arch/mvme88k/dev/bugtty.c b/sys/arch/mvme88k/dev/bugtty.c index dc22f0c894d..8f11dd81ddf 100644 --- a/sys/arch/mvme88k/dev/bugtty.c +++ b/sys/arch/mvme88k/dev/bugtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugtty.c,v 1.20 2004/01/14 20:50:48 miod Exp $ */ +/* $OpenBSD: bugtty.c,v 1.21 2004/02/10 10:06:48 miod Exp $ */ /* Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -45,8 +45,6 @@ #include <mvme88k/dev/bugttyfunc.h> #include "bugtty.h" -#include "cl.h" -#include "dart.h" int bugttymatch(struct device *parent, void *self, void *aux); void bugttyattach(struct device *parent, struct device *self, void *aux); @@ -60,10 +58,7 @@ struct cfdriver bugtty_cd = { }; /* prototypes */ -int bugttycnprobe(struct consdev *cp); -int bugttycninit(struct consdev *cp); -int bugttycngetc(dev_t dev); -void bugttycnputc(dev_t dev, char c); +cons_decl(bugtty); struct tty *bugttytty(dev_t dev); int bugttymctl(dev_t dev, int bits, int how); @@ -91,22 +86,8 @@ bugttymatch(parent, self, aux) /* * Do not attach if a suitable console driver has been attached. */ -#if NCL > 0 - { - extern struct cfdriver cl_cd; - - if (cl_cd.cd_ndevs != 0) - return (0); - } -#endif -#if NDART > 0 - { - extern struct cfdriver dart_cd; - - if (dart_cd.cd_ndevs != 0) - return (0); - } -#endif + if (cn_tab != NULL && cn_tab->cn_probe != bugttycnprobe) + return (0); ca->ca_ipl = IPL_TTY; return (1); @@ -456,7 +437,7 @@ bugttystop(tp, flag) /* * bugtty is the last possible choice for a console device. */ -int +void bugttycnprobe(cp) struct consdev *cp; { @@ -469,15 +450,13 @@ bugttycnprobe(cp) cp->cn_dev = makedev(maj, 0); cp->cn_pri = CN_NORMAL; - return (1); } -int +void bugttycninit(cp) struct consdev *cp; { /* Nothing to do */ - return 0; } int |