summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-25 12:24:39 +0000
committerphk <phk@FreeBSD.org>1999-08-25 12:24:39 +0000
commitea55d634757e3bbadb6525c31e5cb18f4f05ad53 (patch)
treebf5db0228b3f8aba1534aff880eed69f71082a05 /sys/gnu
parent8bfe025139b1ec3d8cbe77369f343a2dbd6e5702 (diff)
downloadFreeBSD-src-ea55d634757e3bbadb6525c31e5cb18f4f05ad53.zip
FreeBSD-src-ea55d634757e3bbadb6525c31e5cb18f4f05ad53.tar.gz
Introduce vn_isdisk(struct vnode *vp) function, and use it to test for diskness.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c6
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c6
2 files changed, 2 insertions, 10 deletions
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index ed772f6..1bf97d5 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -270,14 +270,10 @@ ext2_mount(mp, path, data, ndp, p)
return (error);
devvp = ndp->ni_vp;
- if (devvp->v_type != VBLK) {
+ if (!vn_isdisk(devvp)) {
vrele(devvp);
return (ENOTBLK);
}
- if (devsw(devvp->v_rdev) == NULL) {
- vrele(devvp);
- return (ENXIO);
- }
/*
* If mount by non-root, then verify that user has necessary
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index ed772f6..1bf97d5 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -270,14 +270,10 @@ ext2_mount(mp, path, data, ndp, p)
return (error);
devvp = ndp->ni_vp;
- if (devvp->v_type != VBLK) {
+ if (!vn_isdisk(devvp)) {
vrele(devvp);
return (ENOTBLK);
}
- if (devsw(devvp->v_rdev) == NULL) {
- vrele(devvp);
- return (ENXIO);
- }
/*
* If mount by non-root, then verify that user has necessary
OpenPOWER on IntegriCloud