Subject: Re: Fix for get/putwschar
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Michael <macallan18@earthlink.net>
List: tech-kern
Date: 04/13/2006 20:36:51
--Signature_Thu__13_Apr_2006_20_36_51_-0400_cImldRHMXgyjlZ9N
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

> > > @@ -87,8 +88,8 @@ static void vcons_putchar(void *, int, i
> > >  static void vcons_cursor(void *, int, int, int);
> > >
> > >  /* support for readin/writing text buffers. For wsmoused */
> > > -static int  vcons_putwschar(void *, struct wsdisplay_char *);
> > > -static int  vcons_getwschar(void *, struct wsdisplay_char *);
> > > +static int  vcons_putwschar(struct rasops_info *, struct
> > > wsdisplay_char *); +static int  vcons_getwschar(struct rasops_info
> > > *, struct wsdisplay_char *);
> >
> > Is rasops_info semantically correct way to refer to a vcons screen?
> > Admittedly I haven't checked it thoroughly, but I suspect - no.
> > Michael?
>=20
> I do not know.  This is what the original code used.

And the original vcons_{put|get}char() functions used that to find the
appropriate struct vcons_screen.

> > > @@ -361,6 +366,34 @@ vcons_redraw_screen(struct vcons_screen
> > >  }
> > >
> > >  static int
> > > +vcons_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int
> > > flag, +     struct lwp *l)
> > > +{
> > > +     struct vcons_data *vd =3D v;
> > > +     int error;
> > > +
> > > +     switch (cmd) {
> > > +     case WSDISPLAYIO_GETWSCHAR:
> > > +             error =3D vcons_getwschar(vd->cookie,
> > > +                     (struct wsdisplay_char *)data);
> > > +             break;
> >
> > vd->cookie is driver's cookie to vcons.  It cannot be rasops (see
> > prototype in the previous hunk).  E.g. isgfb passes struct
> > igsfb_devconfig as cookie.
>=20
> So what has it to be?

vs. Or rather (struct vcons_screen *)vs. vd->cookie is a reference to
driver instance-specific data, not the screen-specific stuff we need
here.

have fun
Michael

--Signature_Thu__13_Apr_2006_20_36_51_-0400_cImldRHMXgyjlZ9N
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBRD7uo8pnzkX8Yg2nAQJrjwf+PmYqZKvIXJ2bfLLeSbRa1EAjI7g2Bg/p
0U065PFCCMER6vJ6PubPmDVoKb1OyGD/8NJkfauIH0KUoDHwPYvFk6fw6kwpNQOu
gpq+nVhhn2+amAQNAM+QQT3lJWQuOlAOUr5CLL+2F0ZedQm/NQ7fOkuxNa+FxAaZ
VuGMwOYLtcVIJqZ/E+NuvIDRP4CTydrtOecBrLNRA0fWO2AHakFwD+JkCCPGGTWl
x1thsl/zal2/9oaiEd8nUaxoRyYTvBluTRcZu/RmLWPEBOyxhMkn0iCyO09su0ew
cJrjdu3Bft7kKZpIegnXbj+2YdlxlrIRJzw5wXNK+CE/IXgh+1a0fQ==
=sNeq
-----END PGP SIGNATURE-----

--Signature_Thu__13_Apr_2006_20_36_51_-0400_cImldRHMXgyjlZ9N--