From owner-cvs-src@FreeBSD.ORG Sat Jul 26 13:31:38 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 632C837B401; Sat, 26 Jul 2003 13:31:38 -0700 (PDT) Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.86.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEA2843F93; Sat, 26 Jul 2003 13:31:36 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by phk.freebsd.dk (8.12.8/8.12.8) with ESMTP id h6QKVXV3010743; Sat, 26 Jul 2003 20:31:34 GMT (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h6QKVP5H056217; Sat, 26 Jul 2003 22:31:32 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Alfred Perlstein From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 26 Jul 2003 02:16:51 PDT." <20030726091651.GB42924@elvis.mu.org> Date: Sat, 26 Jul 2003 22:31:25 +0200 Message-ID: <56216.1059251485@critter.freebsd.dk> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/coda coda_fbsd.c coda_vnops.c src/sys/compat/linux linux_misc.c src/sys/dev/raidframe rf_freebsdkintf.c src/sys/fs/hpfs hpfs_vfsops.c src/sys/fs/msdosfs msdosfs_vfsops.c src/sys/fs/ntfs ntfs_vfsops.c src/sys/fs/nwfs ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2003 20:31:38 -0000 In message <20030726091651.GB42924@elvis.mu.org>, Alfred Perlstein writes: >* Poul-Henning Kamp [030726 00:32] wrote: >> phk 2003/07/26 00:32:23 PDT >> >> FreeBSD src repository >> >> Modified files: >> sys/coda coda_fbsd.c coda_vnops.c >> sys/compat/linux linux_misc.c >> sys/dev/raidframe rf_freebsdkintf.c >> Log: >> Add a "int fd" argument to VOP_OPEN() which in the future will >> contain the filedescriptor number on opens from userland. >> >> The index is used rather than a "struct file *" since it conveys a bit >> more information, which may be useful to in particular fdescfs and /dev/fd/* >> >> For now pass -1 all over the place. > >This seems like a mistake, it forces one to have a struct filedesc instead >of merely faking up a struct file. > >What if one wants to have a cookie without a filedesc? > >Am I mistaken? I'm afraid that I totally fail to even understand your question... The objective here is to improve the situation where a vnode open results in a non-vnode method vector on the file, /dev/fd[0-2], /dev/stream etc. The index can be used with the (already) passed thread pointer to access the relevant file entry. BTW: I am not done with this change, the next commit adds the identical argument to vn_open(). -- 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.