Date: Sat, 14 Aug 1999 21:14:35 +0100 From: Brian Somers <brian@Awfulhak.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Brian Somers <brian@Awfulhak.org>, Julian Elischer <julian@whistle.com>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys conf.h Message-ID: <199908142014.VAA07985@keep.lan.Awfulhak.org> In-Reply-To: Your message of "Sat, 14 Aug 1999 07:17:15 %2B0200." <9343.934607835@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> >One possibility would be to support generic devices - /dev/tun for
> >example rather than /dev/tun*. It'd be amazing to have /dev/pty too
> >:-)
>
> This is different and unrelated. I have already fixed pty so that
> there is no "NPTY" anymore, you can just open any random pty and the
> kernel will create it on the fly. The same stunt can be done with
> tun, it is really easy.
Not being limited by magic numbers in your kernel config file is
definitely a win, but the real win is to be able to open /dev/tun (or
/dev/pty) and ``just get one''. I really don't care which one I get
- I just want any one.
The objective here is to not require a boat-load of entries in /dev/,
and to not need to attempt N open()s just because there's already N
similar devices open.
From what I can tell, this requires that the driver ignores the minor
number ('cos it's the same for all accesses) but keeps a track of of
the process id in the device structure. The driver would need to
know about fork()s and *all* close()s, and would probably need to
use something faster than `sequential' to find the device structure
from the pid (some sort of hash).
I thought about doing this myself, but didn't because the close() bit
was too scary - think of all the 3rd party stuff that'd break.
> --
> Poul-Henning Kamp FreeBSD coreteam member
> phk@FreeBSD.ORG "Real hackers run -current on their laptop."
> FreeBSD -- It will take a long time before progress goes too far!
--
Brian <brian@Awfulhak.org> <brian@FreeBSD.org>
<http://www.Awfulhak.org> <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour ! <brian@FreeBSD.org.uk>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908142014.VAA07985>
