From owner-freebsd-hackers Thu Oct 5 15:22: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 47DC737B502 for ; Thu, 5 Oct 2000 15:21:56 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e95MLk308685; Thu, 5 Oct 2000 15:21:46 -0700 (PDT) Date: Thu, 5 Oct 2000 15:21:46 -0700 From: Alfred Perlstein To: void Cc: Chris Costello , hackers@FreeBSD.ORG Subject: Re: "find /proc" Message-ID: <20001005152146.L27736@fw.wintelcom.net> References: <20001005215918.A24987@firedrake.org> <20001005165749.D26550@holly.calldei.com> <20001005231053.A28010@firedrake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20001005231053.A28010@firedrake.org>; from float@firedrake.org on Thu, Oct 05, 2000 at 11:10:53PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * void [001005 15:11] wrote: > On Thu, Oct 05, 2000 at 04:57:50PM -0500, Chris Costello wrote: > > On Thursday, October 05, 2000, void wrote: > > > Why does find(1) operate non-recursively in /proc? > > > > Because the procfs_readdir() code does not report directories > > as the correct type (DT_REG as opposed to the proper DT_DIR). > > Sounds like a bug, do you think I should submit a PR? No, try this: Index: procfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/miscfs/procfs/procfs_vnops.c,v retrieving revision 1.76.2.1 diff -u -u -r1.76.2.1 procfs_vnops.c --- procfs_vnops.c 2000/06/21 09:33:43 1.76.2.1 +++ procfs_vnops.c 2000/10/05 22:19:41 @@ -901,7 +901,7 @@ dp->d_fileno = PROCFS_FILENO(p->p_pid, Pproc); dp->d_namlen = sprintf(dp->d_name, "%ld", (long)p->p_pid); - dp->d_type = DT_REG; + dp->d_type = DT_DIR; p = p->p_list.le_next; break; } Thanks Chris. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message