mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 10:42:45 +00:00
devfs_tree.c: improve our bdevvp() function.
devfs_vnops.c: move a debug printf to be consistent.
This commit is contained in:
parent
19060a3ad9
commit
7f6a56eff7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19230
@ -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 */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user