Subject: Re: Fixing {get,put}wschar functions
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Michael <macallan18@earthlink.net>
List: tech-kern
Date: 04/12/2006 11:44:35
--Signature_Wed__12_Apr_2006_11_44_35_-0400_65iMqqqDQ=X_hvmO
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> This feels wrong although the problem might not be really serious.=20
> Any ideas on how to fix it?
>=20
> Assuming that there is no way to know if the opened device corresponds
> to the active screen, the only solution I can come up with is to move
> these ioctls to another device such as ttyEstat because it does not
> change ownership. This'd certainly simplify wsmoused's code.  But the
> name is not very appropriate and the user loses the ability to call
> these ioctls on his own screen, if he wanted
> to.

I don't like the patch. A proper fix would be to pass the minor device
number or a pointer to the screen to both the ioctl() and mmap()
methods, then nobody would have to guess which screen to read from or
write to. Always accessing the screen in front may be right most of the
time but effectively it's also just guesswork. It should always work on
the screen that corresponds to the tty the ioctl() as issued on, no
matter if it's active / visible or not.

have fun
Michael

--Signature_Wed__12_Apr_2006_11_44_35_-0400_65iMqqqDQ=X_hvmO
Content-Type: application/pgp-signature

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

iQEVAwUBRD0gY8pnzkX8Yg2nAQL1sQgAgltI2EwqRxqYMFAFc4Zh/U2NTWSmC8ym
dJNM6awm+lQClhppbO1xO/rvQSXi2J4Tm26J5Vxrf2DCYOpUQ96A4XahVnMyxwiw
AsUClNRvrcz0Ry/0ozymA8LA5nlF/YiClJTS14KFiskjpFRtBN1MptbsxqlCPV1I
mzWeJL1l22NbjJ1vn+r27QbTCvMs+lNFdM5EzOiemxIYFvr5yDcyl2LvML+2ErJk
tzIkVBaUL5CLZAKboPwVKwE4noCjOsiq8hnwOabw+VkHybA6l1JKuDJRRG2+QxKh
gv6rxvCrPfhXK5MYDQoVsf/KuXom+OOZdaBAvn5OyXNvooWCLPuh1A==
=y/Vn
-----END PGP SIGNATURE-----

--Signature_Wed__12_Apr_2006_11_44_35_-0400_65iMqqqDQ=X_hvmO--