diff options
author | phk <phk@FreeBSD.org> | 1996-10-28 11:36:06 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-10-28 11:36:06 +0000 |
commit | dda935f02496a29a92caeb8b0ecc665195bc2a8d (patch) | |
tree | 862c64a5b7c856a625bbd9c9b295732ba1fd2967 | |
parent | ef2dec217079d631a2fded33581214156db4ec7f (diff) | |
download | FreeBSD-src-dda935f02496a29a92caeb8b0ecc665195bc2a8d.zip FreeBSD-src-dda935f02496a29a92caeb8b0ecc665195bc2a8d.tar.gz |
devfs_tree.c: improve our bdevvp() function.
devfs_vnops.c: move a debug printf to be consistent.
-rw-r--r-- | sys/miscfs/devfs/devfs_tree.c | 8 | ||||
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/miscfs/devfs/devfs_tree.c b/sys/miscfs/devfs/devfs_tree.c index f4110f9..9b7859e 100644 --- a/sys/miscfs/devfs/devfs_tree.c +++ b/sys/miscfs/devfs/devfs_tree.c @@ -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 */ diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index aba42ce..5ed7281 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -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); |