Subject: Re: CVS commit: src
To: Iain Hibbert <plunky@rya-online.net>
From: Quentin Garnier <cube@cubidou.net>
List: source-changes
Date: 08/20/2006 16:02:27
--g4ijzYYnO54BMjRg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 20, 2006 at 02:36:26PM +0100, Iain Hibbert wrote:
> On Sun, 20 Aug 2006, Quentin Garnier wrote:
>=20
> > On Sun, Aug 20, 2006 at 07:06:58AM +0000, Iain Hibbert wrote:
> > > Log Message:
> > > Make btdev default count explicit
> >
> > Hard-coded limits are ugly.
>=20
> Sometimes people want to apply limits though :)
>=20
> With the current possibilities 4 should be enough for most needs (1 user,
> 1 keyboard, 1 mouse, 1 headset, 1 spare) and its fairly easy to change if
> need be.

You know, you just made a very good point why we'd want to get rid of
hard-coded limits.

> > Why don't you simply do the config_attach_pseudo in btdevopen?
>=20
> > That way, you don't need sc_busy anymore;  the mere fact that there is
> > a softc indicates that it's being used, and then you config_detach in
> > btdevclose. The next step is to have a cloning char device, so that
> > you only have one device node so you don't have to create btdev0,
> > btdev1, etc.  You'd only have /dev/btdev and userland wouldn't have to
> > know before hand which unit is used.
>=20
> This wont work exactly - btdevctl(8) is used to configure the device but
> its not a daemon and does not keep the device file open so you need to
> know which device to interact with (may already exist). I used the minor
> number as the device index because different devices use different
> protocols and matching on the address alone will be difficult.

Not sure I follow your point.  Someone or something has to keep the
information anyway.  Reading the code, it's completely beyond me why
you'd need more than one btdev device anyway.  All children should
attach to one you create in btdevattach(), and then you can use the name
of the attached device as the identifier.  You just have to keep a list
of the children.

Maybe I'm missing something in the picture, but I don't think removing
the limit would make anything more complicated.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--g4ijzYYnO54BMjRg
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBROhrc9goQloHrPnoAQI08QgArHcb9SxkI8UR1cXVuwzTJkRVM9FL93lk
NbmSviiYCficbSUDTx3Jr8Fq5WU/VZ1iddqS+tCcdG3h7EzF39bK/Mfe43ak40IE
0gHkVbGe7oAL/04zD7B+ABglo2DsFAsYDqqei8eCnJw//pSaKsIKyZYsKIBwMudM
QzxA+5vYpcO2jc0p8PjLmlybQEsqMab6HymL5kxJjzjA0W+5HZmARa5KQoMp5AXJ
bEW1jQniH7WdW17WGBfh+x2CQO9d8cZo5BqA0k1341edwQ0ipCWLOM0K4U7fD7Wy
ZVGjtJjP5Y0CEAKt1Q4ASaxy+i8+Rzk20mZypmVvmtT3SDL+EUVGTg==
=umDb
-----END PGP SIGNATURE-----

--g4ijzYYnO54BMjRg--