Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/gehenna-devsw]: src/sys/coda Replace the direct-access to devsw table wi...
details: https://anonhg.NetBSD.org/src/rev/12552e60afb4
branches: gehenna-devsw
changeset: 527045:12552e60afb4
user: gehenna <gehenna%NetBSD.org@localhost>
date: Thu May 16 04:19:18 2002 +0000
description:
Replace the direct-access to devsw table with calling devsw API.
diffstat:
sys/coda/coda_vfsops.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r efe97bb95258 -r 12552e60afb4 sys/coda/coda_vfsops.c
--- a/sys/coda/coda_vfsops.c Thu May 16 04:18:02 2002 +0000
+++ b/sys/coda/coda_vfsops.c Thu May 16 04:19:18 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coda_vfsops.c,v 1.16 2002/03/27 05:10:41 phil Exp $ */
+/* $NetBSD: coda_vfsops.c,v 1.16.2.1 2002/05/16 04:19:18 gehenna Exp $ */
/*
*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.16 2002/03/27 05:10:41 phil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.16.2.1 2002/05/16 04:19:18 gehenna Exp $");
#ifdef _LKM
#define NVCODA 4
@@ -89,8 +89,7 @@
#define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
extern int coda_nc_initialized; /* Set if cache has been initialized */
-extern int vc_nb_open __P((dev_t, int, int, struct proc *));
-extern struct cdevsw cdevsw[]; /* For sanity check in coda_mount */
+extern const struct cdevsw vcoda_cdevsw;
extern const struct vnodeopv_desc coda_vnodeop_opv_desc;
const struct vnodeopv_desc * const coda_vnodeopv_descs[] = {
@@ -156,6 +155,7 @@
dev_t dev;
struct coda_mntinfo *mi;
struct vnode *rootvp;
+ const struct cdevsw *cdev;
ViceFid rootfid;
ViceFid ctlfid;
int error;
@@ -188,7 +188,8 @@
}
dev = dvp->v_specinfo->si_rdev;
vrele(dvp);
- if (major(dev) >= nchrdev || major(dev) < 0) {
+ cdev = cdevsw_lookup(dev);
+ if (cdev == NULL) {
MARK_INT_FAIL(CODA_MOUNT_STATS);
return(ENXIO);
}
@@ -196,7 +197,7 @@
/*
* See if the device table matches our expectations.
*/
- if (cdevsw[major(dev)].d_open != vc_nb_open)
+ if (cdev != &vcoda_cdevsw)
{
MARK_INT_FAIL(CODA_MOUNT_STATS);
return(ENXIO);
Home |
Main Index |
Thread Index |
Old Index