From owner-cvs-all Tue May 15 1:27: 1 2001 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 1308F37B423; Tue, 15 May 2001 01:26:56 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f4F8QKp30194; Tue, 15 May 2001 10:26:23 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Peter Wemm Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/devfs devfs_vnops.c In-Reply-To: Your message of "Mon, 14 May 2001 17:21:06 PDT." <20010515002106.EC0F8380E@overcee.netplex.com.au> Date: Tue, 15 May 2001 10:26:20 +0200 Message-ID: <30192.989915180@critter> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010515002106.EC0F8380E@overcee.netplex.com.au>, Peter Wemm writes : >Brian Somers wrote: >> > phk 2001/05/14 01:20:47 PDT >> > >> > Modified files: >> > sys/fs/devfs devfs_vnops.c >> > Log: >> > After a successfull poll of the cloning functions, match on the >> > returned dev_t rather than the original name. >> > >> > This allows cloning from one name to another which is useful for >> > /dev/tty and later for the pty's. >> > >> > Revision Changes Path >> > 1.23 +7 -15 src/sys/fs/devfs/devfs_vnops.c >> >> Does this mean that I can catch ``open("/dev/tun")'' and clone (say) >> /dev/tun100, returning that ? >> >> If so - WOW ! And in no less than -8 lines too ! > >This is how cloning is supposed to work. ie: open /dev/ptymx and it was >as if you had opened /dev/ptyS6, and devname() returns /dev/ptyS6. Right :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message