summaryrefslogtreecommitdiffstats
path: root/sys/dev/vt/vt.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/vt/vt.h')
-rw-r--r--sys/dev/vt/vt.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index caab709..eb0ce1f 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -78,7 +78,13 @@ one 'device sc' or 'device vt'"
#endif /* defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) */
#define SC_DRIVER_NAME "vt"
+#ifdef VT_DEBUG
#define DPRINTF(_l, ...) if (vt_debug > (_l)) printf( __VA_ARGS__ )
+#define VT_CONSOLECTL_DEBUG
+#define VT_SYSMOUSE_DEBUG
+#else
+#define DPRINTF(_l, ...) do {} while (0)
+#endif
#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG)
#define VT_SYSCTL_INT(_name, _default, _descr) \
@@ -277,6 +283,7 @@ struct vt_window {
*/
typedef int vd_init_t(struct vt_device *vd);
+typedef int vd_probe_t(struct vt_device *vd);
typedef void vd_postswitch_t(struct vt_device *vd);
typedef void vd_blank_t(struct vt_device *vd, term_color_t color);
typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src,
@@ -295,7 +302,9 @@ typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int,
typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t);
struct vt_driver {
+ char vd_name[16];
/* Console attachment. */
+ vd_probe_t *vd_probe;
vd_init_t *vd_init;
/* Drawing. */
@@ -391,6 +400,9 @@ TERMINAL_DECLARE_EARLY(driver ## _consterm, vt_termclass, \
SYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, \
vt_upgrade, &driver ## _consdev)
+/* name argument is not used yet. */
+#define VT_DRIVER_DECLARE(name, drv) DATA_SET(vt_drv_set, drv)
+
/*
* Fonts.
*
OpenPOWER on IntegriCloud