Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



On Sun, Aug 20, 2006 at 02:36:26PM +0100, Iain Hibbert wrote:
> On Sun, 20 Aug 2006, Quentin Garnier wrote:
> 
> > 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.
> 
> Sometimes people want to apply limits though :)
> 
> 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?
> 
> > 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.
> 
> 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.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"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.

Attachment: pgpIWmkS2ZqyO.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index