From owner-freebsd-fs@FreeBSD.ORG Wed Jul 21 02:38:46 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E441216A4CF for ; Wed, 21 Jul 2004 02:38:46 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F7D343D54 for ; Wed, 21 Jul 2004 02:38:46 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i6L2bx7U015557; Tue, 20 Jul 2004 22:37:59 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i6L2bqiN015554; Tue, 20 Jul 2004 22:37:59 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 20 Jul 2004 22:37:52 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: ravi In-Reply-To: <1090234005.4730.50.camel@ravin> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-fs@freebsd.org Subject: Re: procfs in FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2004 02:38:47 -0000 On Mon, 19 Jul 2004, ravi wrote: > what is the use of PFS_PROCDEP in the following statement ? > > dir = pfs_create_dir(root, "pid", > procfs_attr, NULL, PFS_PROCDEP); > > And there is no entry under /proc with the name "pid" . > > Why is it so ? I'm not all that familiar with pseudofs, but I believe that the PFS_PROCDEP flag is a "magic" flag that tells procfs to create process-specific directories under the directory in question, and the "pid" is basically place-holder text. I.e., the presence of the directory node created above tells procfs to spit out lots of per-process subdirectories instead. The details here are a bit hazy to me, but perhaps this is enough to point you in the right direction? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research