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
This commit is contained in:
parent
9f5ae2b97b
commit
689d68d9c2
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALix.oz.au)
|
||||
*
|
||||
* $Header: /u1/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.10 1995/12/08 11:17:33 julian Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.11 1995/12/09 09:11:01 julian Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -732,10 +732,16 @@ DBPRINT((" vntodn "));
|
||||
Debugger("bad-tag ");
|
||||
return(EINVAL);
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* XXX: This is actually a "normal" case when vclean calls us without
|
||||
* XXX: incrementing the reference count first.
|
||||
*/
|
||||
if(vn_p->v_usecount == 0)
|
||||
{
|
||||
printf("No references! ");
|
||||
}
|
||||
#endif
|
||||
if((vn_p->v_type == VBAD) || (vn_p->v_type == VNON))
|
||||
{
|
||||
printf("bad-type2 ");
|
||||
@ -762,12 +768,18 @@ DBPRINT(("dntovn "));
|
||||
{
|
||||
if(vn_p->v_id != dnp->vn_id)
|
||||
{
|
||||
#if 0
|
||||
/* XXX: This is `normal'... */
|
||||
printf("bad-id ");
|
||||
#endif
|
||||
goto skip;
|
||||
}
|
||||
if(vn_p->v_tag != VT_DEVFS)
|
||||
{
|
||||
#if 0
|
||||
/* XXX: This is `normal'... */
|
||||
printf("bad-tag ");
|
||||
#endif
|
||||
goto skip;
|
||||
}
|
||||
if(vn_p->v_op != *(dnp->ops))
|
||||
|
@ -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*/
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user