Date: Mon, 21 Jul 1997 17:27:25 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: jpt@msc.edu (Joseph Thomas) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Cloned devices??? Message-ID: <199707220027.RAA12189@phaeton.artisoft.com> In-Reply-To: <199707212319.SAA06830@uh.msc.edu> from "Joseph Thomas" at Jul 21, 97 06:19:49 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I'm looking for a way to do what the 'clone' device in > SunOS/streams allows the driver to do. Any pointers/ideas? This should be easy under devfs. A static (non-devfs) version would be pretty easy as well, but much less general. [ ... ] > /dev has node clone, major M, minor 0. > > application does: > > for ( i = 0; i < 3; i++ ) > fd[i] = open ( "/dev/clone", O_RDWR ); > > where fd[0] would actually point to a device with major M, minor 1, > fd[1] would point to major M, minor 2, > and fd[2] would point to major M, minor 3. > > > what I'd like to avoid is: > > /dev/clone00 major M, minor 0 > /dev/clone01 major M, minor 1 Why? There's really no good reason to not expose the device in the name space; for pty's, you would *definititely* want to expose the slave side in the namespace! The devfs version would not expose the slave until the master had been created via cloning, but the static would want to always export the slave. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707220027.RAA12189>