diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-30 18:00:24 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-30 18:00:24 +0000 |
commit | 73d78bcc40a727f0cae5f4d9c0908246d4d06f46 (patch) | |
tree | 875c43567eac1f36e353dd3789988fab1f86a876 /sys/arch | |
parent | 2f1666bdc94f01cc8dfd259b207b47298e19cf06 (diff) |
Introduce symbolic constants for the magic conscode values.
No functional change.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/dev/dvbox.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/dev/gbox.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/dev/rbox.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/dev/topcat.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/hp300/include/autoconf.h | 4 |
6 files changed, 22 insertions, 20 deletions
diff --git a/sys/arch/hp300/dev/dvbox.c b/sys/arch/hp300/dev/dvbox.c index ea78867a9f1..13d453db90c 100644 --- a/sys/arch/hp300/dev/dvbox.c +++ b/sys/arch/hp300/dev/dvbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvbox.c,v 1.8 2005/01/27 21:24:48 miod Exp $ */ +/* $OpenBSD: dvbox.c,v 1.9 2005/12/30 18:00:20 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -169,7 +169,7 @@ dvbox_intio_attach(struct device *parent, struct device *self, void *aux) struct diofbreg *fbr; fbr = (struct diofbreg *)IIOV(GRFIADDR); - sc->sc_scode = -1; /* XXX internal i/o */ + sc->sc_scode = CONSCODE_INTERNAL; if (sc->sc_scode == conscode) { sc->sc_fb = &diofb_cn; @@ -491,7 +491,7 @@ dvboxcnprobe(struct consdev *cp) cp->cn_pri = CN_INTERNAL; #ifdef CONSCODE - if (CONSCODE == -1) { + if (CONSCODE == CONSCODE_INTERNAL) { force = conforced = 1; } #endif @@ -508,7 +508,7 @@ dvboxcnprobe(struct consdev *cp) cn_tab = cp; if (convasize) iounmap(conaddr, convasize); - conscode = -1; + conscode = CONSCODE_INTERNAL; conaddr = va; convasize = 0; } diff --git a/sys/arch/hp300/dev/gbox.c b/sys/arch/hp300/dev/gbox.c index d67f9ce1356..133acdeffa0 100644 --- a/sys/arch/hp300/dev/gbox.c +++ b/sys/arch/hp300/dev/gbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbox.c,v 1.9 2005/01/27 21:24:48 miod Exp $ */ +/* $OpenBSD: gbox.c,v 1.10 2005/12/30 18:00:20 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -172,7 +172,7 @@ gbox_intio_attach(struct device *parent, struct device *self, void *aux) struct diofbreg *fbr; fbr = (struct diofbreg *)IIOV(GRFIADDR); - sc->sc_scode = -1; /* XXX internal i/o */ + sc->sc_scode = CONSCODE_INTERNAL; if (sc->sc_scode == conscode) { sc->sc_fb = &diofb_cn; @@ -511,7 +511,7 @@ gboxcnprobe(struct consdev *cp) cp->cn_pri = CN_INTERNAL; #ifdef CONSCODE - if (CONSCODE == -1) { + if (CONSCODE == CONSCODE_INTERNAL) { force = conforced = 1; } #endif @@ -528,7 +528,7 @@ gboxcnprobe(struct consdev *cp) cn_tab = cp; if (convasize) iounmap(conaddr, convasize); - conscode = -1; + conscode = CONSCODE_INTERNAL; conaddr = va; convasize = 0; } diff --git a/sys/arch/hp300/dev/rbox.c b/sys/arch/hp300/dev/rbox.c index 2b9602bb8d6..aa8c411b37a 100644 --- a/sys/arch/hp300/dev/rbox.c +++ b/sys/arch/hp300/dev/rbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbox.c,v 1.9 2005/12/28 21:19:27 miod Exp $ */ +/* $OpenBSD: rbox.c,v 1.10 2005/12/30 18:00:21 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -169,7 +169,7 @@ rbox_intio_attach(struct device *parent, struct device *self, void *aux) struct diofbreg *fbr; fbr = (struct diofbreg *)IIOV(GRFIADDR); - sc->sc_scode = -1; /* XXX internal i/o */ + sc->sc_scode = CONSCODE_INTERNAL; if (sc->sc_scode == conscode) { sc->sc_fb = &diofb_cn; @@ -454,7 +454,7 @@ rboxcnprobe(struct consdev *cp) cp->cn_pri = CN_INTERNAL; #ifdef CONSCODE - if (CONSCODE == -1) { + if (CONSCODE == CONSCODE_INTERNAL) { force = conforced = 1; } #endif @@ -471,7 +471,7 @@ rboxcnprobe(struct consdev *cp) cn_tab = cp; if (convasize) iounmap(conaddr, convasize); - conscode = -1; + conscode = CONSCODE_INTERNAL; conaddr = va; convasize = 0; } diff --git a/sys/arch/hp300/dev/topcat.c b/sys/arch/hp300/dev/topcat.c index 57267bfdbbe..e5b289afcc7 100644 --- a/sys/arch/hp300/dev/topcat.c +++ b/sys/arch/hp300/dev/topcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: topcat.c,v 1.10 2005/12/28 21:19:27 miod Exp $ */ +/* $OpenBSD: topcat.c,v 1.11 2005/12/30 18:00:21 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat. @@ -181,7 +181,7 @@ topcat_intio_attach(struct device *parent, struct device *self, void *aux) struct diofbreg *fbr; fbr = (struct diofbreg *)IIOV(GRFIADDR); - sc->sc_scode = -1; /* XXX internal i/o */ + sc->sc_scode = CONSCODE_INTERNAL; if (sc->sc_scode == conscode) { sc->sc_fb = &diofb_cn; @@ -587,7 +587,7 @@ topcatcnprobe(struct consdev *cp) cp->cn_pri = CN_INTERNAL; #ifdef CONSCODE - if (CONSCODE == -1) { + if (CONSCODE == CONSCODE_INTERNAL) { force = conforced = 1; } #endif @@ -604,7 +604,7 @@ topcatcnprobe(struct consdev *cp) cn_tab = cp; if (convasize) iounmap(conaddr, convasize); - conscode = -1; + conscode = CONSCODE_INTERNAL; conaddr = va; convasize = 0; } diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 742c6bcda6a..8053c234d94 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.105 2005/12/22 22:56:28 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.106 2005/12/30 18:00:23 miod Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -162,7 +162,7 @@ void straytrap(int, u_short); void nmihand(struct frame); /* - * Select code of console. Set to -1 if console is on + * Select code of console. Set to CONSCODE_INTERNAL if console is on * "internal" framebuffer. */ int conscode; @@ -215,7 +215,7 @@ consinit() */ convasize = 0; conforced = 0; - conscode = 1024; /* invalid */ + conscode = CONSCODE_INVALID; /* * Initialize the bus resource map. diff --git a/sys/arch/hp300/include/autoconf.h b/sys/arch/hp300/include/autoconf.h index 6df4bfd31d3..e19cb4db75e 100644 --- a/sys/arch/hp300/include/autoconf.h +++ b/sys/arch/hp300/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.11 2005/02/27 22:08:43 miod Exp $ */ +/* $OpenBSD: autoconf.h,v 1.12 2005/12/30 18:00:23 miod Exp $ */ /* $NetBSD: autoconf.h,v 1.4 1997/04/01 03:03:56 scottr Exp $ */ /*- @@ -39,6 +39,8 @@ #ifdef _KERNEL extern int conscode; /* select code of console device */ +#define CONSCODE_INTERNAL (-1) +#define CONSCODE_INVALID (-2) extern caddr_t conaddr; /* KVA of console device */ extern int convasize; /* size of mapping at conaddr */ extern int conforced; /* console has been forced */ |