aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2006-05-26 10:58:39 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2006-05-26 10:58:39 +0000
commit56de0c9a17d81d432679e94ad9e6fa456c0cad00 (patch)
tree3a49190c95dd65447e17bacfc510f89e8652a2c9
parent8aed7613bd15276b05834ce6eaea4b676346ec95 (diff)
downloadsrc-56de0c9a17d81d432679e94ad9e6fa456c0cad00.tar.gz
src-56de0c9a17d81d432679e94ad9e6fa456c0cad00.zip
Add new CONSOLE_DRIVER macro which takes just the name of the console
and constructs the member function names with CPPs' ##. Do not include the checkc entry as it is going away.
Notes
Notes: svn path=/head/; revision=158945
-rw-r--r--sys/sys/cons.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index 4f65d723c5cc..116aa15416cb 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -86,6 +86,16 @@ struct consdev {
}; \
DATA_SET(cons_set, name##_consdev)
+#define CONSOLE_DRIVER(name) \
+ static struct consdev name##_consdev = { \
+ .cn_probe = name##_cnprobe, \
+ .cn_init = name##_cninit, \
+ .cn_term = name##_cnterm, \
+ .cn_getc = name##_cngetc, \
+ .cn_putc = name##_cnputc, \
+ }; \
+ DATA_SET(cons_set, name##_consdev)
+
/* Other kernel entry points. */
void cninit(void);
void cninit_finish(void);