From owner-freebsd-hackers Mon Jul 21 17:29:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA22602 for hackers-outgoing; Mon, 21 Jul 1997 17:29:59 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id RAA22596 for ; Mon, 21 Jul 1997 17:29:57 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA12189; Mon, 21 Jul 1997 17:27:25 -0700 From: Terry Lambert Message-Id: <199707220027.RAA12189@phaeton.artisoft.com> Subject: Re: Cloned devices??? To: jpt@msc.edu (Joseph Thomas) Date: Mon, 21 Jul 1997 17:27:25 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199707212319.SAA06830@uh.msc.edu> from "Joseph Thomas" at Jul 21, 97 06:19:49 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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.