clean up wscons frame buffer attachment interface slightly. Make

ioctl and mmap routines take a void *, rather than a struct device *,
so that they can be set up to work more easily when using a 'struct device *'
isn't appropriate.  Add a cookie (void *) to be passed to the mmap and
ioctl routines.  Rename a few struct members, and shuffle them into
a more sensible order.
This commit is contained in:
cgd 1996-11-19 05:17:00 +00:00
parent a1476167f8
commit 1c90055b77
1 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsconsvar.h,v 1.3 1996/11/13 21:13:42 cgd Exp $ */
/* $NetBSD: wsconsvar.h,v 1.4 1996/11/19 05:17:00 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -32,9 +32,9 @@
struct device;
typedef int (*wscons_ioctl_t) __P((struct device *dev, u_long cmd,
typedef int (*wscons_ioctl_t) __P((void *v, u_long cmd,
caddr_t data, int flag, struct proc *p));
typedef int (*wscons_mmap_t) __P((struct device *dev, off_t off,
typedef int (*wscons_mmap_t) __P((void *v, off_t off,
int prot));
struct wscons_emulfuncs {
@ -53,14 +53,15 @@ struct wscons_emulfuncs {
};
struct wscons_odev_spec {
const struct wscons_emulfuncs *wo_ef; /* emulation functions */
void *wo_efa; /* emulation function cookie */
int wo_nrows, wo_ncols; /* number of rows & cols */
int wo_crow, wo_ccol; /* current row & col */
const struct wscons_emulfuncs *wo_emulfuncs; /* emulation functions */
void *wo_emulfuncs_cookie;
wscons_ioctl_t wo_ioctl;
wscons_mmap_t wo_mmap;
void *wo_miscfuncs_cookie;
int wo_nrows, wo_ncols; /* number of rows & cols */
int wo_crow, wo_ccol; /* current row & col */
};
struct wsconsio_bell_data;