devfs_tree.c: improve our bdevvp() function.

devfs_vnops.c:	move a debug printf to be consistent.
This commit is contained in:
Poul-Henning Kamp 1996-10-28 11:36:06 +00:00
parent 19060a3ad9
commit 7f6a56eff7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19230
2 changed files with 8 additions and 4 deletions

View File

@ -2,9 +2,11 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.30 1996/09/10 08:27:33 bde Exp $
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_tree.c,v 1.31 1996/09/29 15:00:37 bde Exp $
*/
#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/types.h>
@ -841,9 +843,11 @@ bdevvp(dev_t dev, struct vnode **vpp)
{
dn_p dnp = 0;
if (dev == NODEV)
return(0);
dnp= findbdev(dev, dev_root->dnp);
if (!dnp)
return (0);
return (ENOENT);
return (devfs_dntovn(dnp, vpp));
}
#endif /* DEVFS_ROOT */

View File

@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.30 1996/10/16 23:14:00 julian Exp $
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.31 1996/10/17 22:47:23 julian Exp $
*
* symlinks can wait 'til later.
*/
@ -781,6 +781,7 @@ devfs_write(struct vop_write_args *ap)
dn_p file_node;
int error;
DBPRINT(("write\n"));
if (error = devfs_vntodn(ap->a_vp,&file_node))
{
printf("devfs_vntodn returned %d ",error);
@ -788,7 +789,6 @@ devfs_write(struct vop_write_args *ap)
}
DBPRINT(("write\n"));
switch (ap->a_vp->v_type) {
case VREG:
return(EINVAL);