Tim Waugh (tim@cyberelk.demon.co.uk)
Thu, 16 Jul 1998 23:00:09 +0100 (BST)
Hi guys,
I've just been looking a bit harder at the ppuser code. While hunting for
that linked list bug, it occurred to me that it's quite crap if only one
person can have /dev/parport0 open at once, which is the case at the
moment.
The trouble is that I can't think of a way round it. The ppuser driver
maintains state in the form of a 'struct pardevice *' handle to the
registered device, of which there will be one for each 'open' performed on
a parport device node.
I can't think of a way of knowing which handle to use if more than one
person is allowed to have /dev/parport0 open at once -- I can't even use
the inode number in case some bozo created a parport0 device node on
another filesystem!
So, my plan is to change from having /dev/parport0..9 to having
/dev/pardevice0..9, the idea being that all the pardevices are equal apart
from the name (and minor). That way, in order to talk to a random parport
device, a user points you at a /dev/pardevicex (chosen so as not to clash
with any other user-space drivers) and away you go.
Does this sound good/bad? (Has anyone actually _used_ ppuser other than
me?)
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:18:00 EST