Index:
[thread]
[date]
[subject]
[author]
From: James Simmons <jsimmons@edgeglobal.com>
To : andreas.beck@ggi-project.org
Date: Thu, 15 Apr 1999 11:56:06 -0400 (EDT)
Re: current state of kernel input work?
On Thu, 15 Apr 1999 becka@rz.uni-duesseldorf.de wrote:
> > > This avoids many security issues you would have with a multi-devfile
> > > setup, as the getty just needs to chown a single file just like now.
>
> > One aprroach I had to solve that problem was to save the current device
> > state (file ownership, permissions) at the time of a VT switch. Then when
> > you switch back it installs the orginal permissions.
>
> ? That doesn't help. Think of "old handles".
Old handles?
> > Working on this with the linux input development team. Know of a good way
> > to create a unique device id? Maybe something to deal with /dev numbers.
>
> Increase a counter when you instantiate a new device.
The only problem is you don't know what order a device might be
initailized. I need a specific number to represent a specific type of
device. Sort of a device handle.
> Note the term instantiate, as given the probability to have tons of similar
> devices, like a bunch of keyboards on USB or such, I'd vote for having an
> object<->instance type model for the drivers. I.e. _one_ driver, that
> always gets passed a "state" (which makes it an "instance") thus avoiding
> code duplication.
I have something like that. Each head has a device list. The device list
is a link list of devices. Then each device has a pointer to the data that
defines it state and the device driver routines. This enables the ability
to override the drivers. Say for example you have a serial mouse. Then you
unplug it and place a ps/2 mouse. Internal in the kernel it could just
replace the driver routines for say /dev/mouse. Same for console drivers.
You could switch between vgacon and fbcon.
James Simmons Seeing is deceiving. It's
System Admin EdgeNet Inc eating that's believing.
Linux Kernel Developer -- James Thurber
jsimmons@edgeglobal.com
http://www.edgeglobal.com/~jsimmons
Index:
[thread]
[date]
[subject]
[author]