From 90106ad38b048d3ed1966dd93449a7ccd081ab12 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sat, 8 Mar 1997 16:06:34 +0000 Subject: [PATCH] Fixed missing initialisation of vp->v_type for types Pfile and Pmem in procfs_allocvp(). This fixes at least stat() of /proc/*/mem. stat() of /proc/*/file already worked. I think procfs_allocvp() isn't actually called for type Pfile. --- sys/fs/procfs/procfs_subr.c | 3 ++- sys/miscfs/procfs/procfs_subr.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/fs/procfs/procfs_subr.c b/sys/fs/procfs/procfs_subr.c index e6e8ada04fa..8c5224b7363 100644 --- a/sys/fs/procfs/procfs_subr.c +++ b/sys/fs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id$ + * $Id: procfs_subr.c,v 1.13 1997/02/22 09:40:30 peter Exp $ */ #include @@ -164,6 +164,7 @@ loop: case Pmem: pfs->pfs_mode = (VREAD|VWRITE) | (VREAD) >> 3;; + vp->v_type = VREG; break; case Pregs: diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index e6e8ada04fa..8c5224b7363 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id$ + * $Id: procfs_subr.c,v 1.13 1997/02/22 09:40:30 peter Exp $ */ #include @@ -164,6 +164,7 @@ loop: case Pmem: pfs->pfs_mode = (VREAD|VWRITE) | (VREAD) >> 3;; + vp->v_type = VREG; break; case Pregs: