diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2006-05-26 18:25:34 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2006-05-26 18:25:34 +0000 |
| commit | 05c3592e13991b031ac8923f30d0cf2792280b28 (patch) | |
| tree | 3f3cd595cd0f70677e1a66f528ea88d2ee17bc09 /sys/dev | |
| parent | af8d1678e17e6c29ca7ac8be722c13358a573d0a (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ofw/ofw_console.c | 39 | ||||
| -rw-r--r-- | sys/dev/zs/zs.c | 14 |
2 files changed, 12 insertions, 41 deletions
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index b74832a3eb143..91ed16565b212 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -73,13 +73,13 @@ static int ofw_tty_param(struct tty *, struct termios *); static void ofw_tty_stop(struct tty *, int); static void ofw_timeout(void *); -static cn_probe_t ofw_cons_probe; -static cn_init_t ofw_cons_init; -static cn_getc_t ofw_cons_getc; -static cn_checkc_t ofw_cons_checkc; -static cn_putc_t ofw_cons_putc; +static cn_probe_t ofw_cnprobe; +static cn_init_t ofw_cninit; +static cn_term_t ofw_cnterm; +static cn_getc_t ofw_cngetc; +static cn_putc_t ofw_cnputc; -CONS_DRIVER(ofw, ofw_cons_probe, ofw_cons_init, NULL, ofw_cons_getc, +CONSOLE_DRIVER(ofw) ofw_cons_checkc, ofw_cons_putc, NULL); static void @@ -260,7 +260,7 @@ ofw_cons_probe(struct consdev *cp) } static void -ofw_cons_init(struct consdev *cp) +ofw_cninit(struct consdev *cp) { /* XXX: This is the alias, but that should be good enough */ @@ -268,30 +268,13 @@ ofw_cons_init(struct consdev *cp) cp->cn_tp = ofw_tp; } -static int -ofw_cons_getc(struct consdev *cp) +static void +ofw_cneterm(struct consdev *cp) { - unsigned char ch; - int l; - - ch = '\0'; - - while ((l = OF_read(stdin, &ch, 1)) != 1) { - if (l != -2 && l != 0) { - return (-1); - } - } - -#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) - if (kdb_alt_break(ch, &alt_break_state)) - kdb_enter("Break sequence on console"); -#endif - - return (ch); } static int -ofw_cons_checkc(struct consdev *cp) +ofw_cngetc(struct consdev *cp) { unsigned char ch; @@ -307,7 +290,7 @@ ofw_cons_checkc(struct consdev *cp) } static void -ofw_cons_putc(struct consdev *cp, int c) +ofw_cnputc(struct consdev *cp, int c) { char cbuf; diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 11d4cca458199..199a26e5ff13f 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -129,7 +129,6 @@ static cn_probe_t zs_cnprobe; static cn_init_t zs_cninit; static cn_term_t zs_cnterm; static cn_getc_t zs_cngetc; -static cn_checkc_t zs_cncheckc; static cn_putc_t zs_cnputc; static int zstty_cngetc(struct zstty_softc *sc); @@ -155,8 +154,7 @@ static struct cdevsw zstty_cdevsw = { static struct zstty_softc *zstty_cons; -CONS_DRIVER(zs, zs_cnprobe, zs_cninit, zs_cnterm, zs_cngetc, zs_cncheckc, - zs_cnputc, NULL); +CONSOLE_DRIVER(zs); int zs_probe(device_t dev) @@ -835,16 +833,6 @@ zs_cngetc(struct consdev *cn) if (sc == NULL) return (-1); - return (zstty_cngetc(sc)); -} - -static int -zs_cncheckc(struct consdev *cn) -{ - struct zstty_softc *sc = zstty_cons; - - if (sc == NULL) - return (-1); return (zstty_cncheckc(sc)); } |
