Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/gehenna-devsw]: src/sys Use devsw API for checking validity of major num...
details: https://anonhg.NetBSD.org/src/rev/ca047b2c4142
branches: gehenna-devsw
changeset: 527043:ca047b2c4142
user: gehenna <gehenna%NetBSD.org@localhost>
date: Thu May 16 04:14:48 2002 +0000
description:
Use devsw API for checking validity of major number.
diffstat:
sys/filecorefs/filecore_vfsops.c | 7 ++++---
sys/isofs/cd9660/cd9660_vfsops.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
diffs (70 lines):
diff -r 6fd4f44b3d4d -r ca047b2c4142 sys/filecorefs/filecore_vfsops.c
--- a/sys/filecorefs/filecore_vfsops.c Thu May 16 04:13:51 2002 +0000
+++ b/sys/filecorefs/filecore_vfsops.c Thu May 16 04:14:48 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filecore_vfsops.c,v 1.18 2001/11/12 23:04:11 lukem Exp $ */
+/* $NetBSD: filecore_vfsops.c,v 1.18.8.1 2002/05/16 04:16:11 gehenna Exp $ */
/*-
* Copyright (c) 1998 Andrew McMurry
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.18 2001/11/12 23:04:11 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.18.8.1 2002/05/16 04:16:11 gehenna Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -56,6 +56,7 @@
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/pool.h>
+#include <sys/conf.h>
#include <filecorefs/filecore.h>
#include <filecorefs/filecore_extern.h>
@@ -189,7 +190,7 @@
vrele(devvp);
return ENOTBLK;
}
- if (major(devvp->v_rdev) >= nblkdev) {
+ if (bdevsw_lookup(devvp->v_rdev) == NULL) {
vrele(devvp);
return ENXIO;
}
diff -r 6fd4f44b3d4d -r ca047b2c4142 sys/isofs/cd9660/cd9660_vfsops.c
--- a/sys/isofs/cd9660/cd9660_vfsops.c Thu May 16 04:13:51 2002 +0000
+++ b/sys/isofs/cd9660/cd9660_vfsops.c Thu May 16 04:14:48 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.60 2002/03/26 19:04:23 drochner Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.60.2.1 2002/05/16 04:14:48 gehenna Exp $ */
/*-
* Copyright (c) 1994
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.60 2002/03/26 19:04:23 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.60.2.1 2002/05/16 04:14:48 gehenna Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -65,6 +65,7 @@
#include <sys/malloc.h>
#include <sys/pool.h>
#include <sys/stat.h>
+#include <sys/conf.h>
#include <isofs/cd9660/iso.h>
#include <isofs/cd9660/cd9660_extern.h>
@@ -207,7 +208,7 @@
vrele(devvp);
return ENOTBLK;
}
- if (major(devvp->v_rdev) >= nblkdev) {
+ if (bdevsw_lookup(devvp->v_rdev) == NULL) {
vrele(devvp);
return ENXIO;
}
Home |
Main Index |
Thread Index |
Old Index