* void <[EMAIL PROTECTED]> [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 - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message