summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/devfs/devfs_vfsops.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-01-02 09:14:49 +0000
committerpeter <peter@FreeBSD.org>1996-01-02 09:14:49 +0000
commite30ce9b2f85207ec00965eaa0110195781f82f7c (patch)
treecc267b6485e8f605d0445f92928048cce897e025 /sys/miscfs/devfs/devfs_vfsops.c
parenteed534da47fa86c2a5e52c33f24456168de1d065 (diff)
downloadFreeBSD-src-e30ce9b2f85207ec00965eaa0110195781f82f7c.zip
FreeBSD-src-e30ce9b2f85207ec00965eaa0110195781f82f7c.tar.gz
Remove unnecessary debug printf's ("no references", "bad-id") - these
were development aids :-) and normal events. Initialise the "hidden" blueprint mount "mnt_op" and "mnt_vfc" fields so that a statfs() on a devfs file would not panic anymore. Fixes PR#911. Head-scratching by: Julian and Peter
Diffstat (limited to 'sys/miscfs/devfs/devfs_vfsops.c')
-rw-r--r--sys/miscfs/devfs/devfs_vfsops.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/miscfs/devfs/devfs_vfsops.c b/sys/miscfs/devfs/devfs_vfsops.c
index 2da4567..f520cd3 100644
--- a/sys/miscfs/devfs/devfs_vfsops.c
+++ b/sys/miscfs/devfs/devfs_vfsops.c
@@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
- * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.7 1995/12/14 09:52:55 phk Exp $
+ * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.8 1995/12/14 19:04:08 bde Exp $
*
*
*/
@@ -25,6 +25,15 @@ static int mountdevfs( struct mount *mp, struct proc *p);
static int
devfs_init(void)
{
+ /*
+ * fill in the missing members on the "hidden" mount
+ */
+ dev_root->dnp->dvm->mount->mnt_op = vfssw[MOUNT_DEVFS];
+ dev_root->dnp->dvm->mount->mnt_vfc = vfsconf[MOUNT_DEVFS];
+
+ /* Mark a reference for the "invisible" blueprint mount */
+ dev_root->dnp->dvm->mount->mnt_vfc->vfc_refcount++;
+
printf("devfs ready to run\n");
return 0; /*XXX*/
}
OpenPOWER on IntegriCloud