diff options
author | phk <phk@FreeBSD.org> | 1999-08-25 12:24:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-25 12:24:39 +0000 |
commit | ea55d634757e3bbadb6525c31e5cb18f4f05ad53 (patch) | |
tree | bf5db0228b3f8aba1534aff880eed69f71082a05 /sys/fs | |
parent | 8bfe025139b1ec3d8cbe77369f343a2dbd6e5702 (diff) | |
download | FreeBSD-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/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 8 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 8 |
3 files changed, 6 insertions, 18 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 2e007db..1dc080d 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.58 1999/08/13 10:29:18 phk Exp $ + * $Id: cd9660_vfsops.c,v 1.59 1999/08/23 21:07:12 bde Exp $ */ #include <sys/param.h> @@ -220,14 +220,10 @@ cd9660_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; - } /* * Verify that user has necessary permissions on the device, diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index f8c7392..adb5b5a 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.47 1999/08/13 10:29:26 phk Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.48 1999/08/23 21:07:13 bde Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -293,14 +293,10 @@ msdosfs_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 * permissions on the device. diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 172460d..44877bd 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ntfs_vfsops.c,v 1.8 1999/08/08 18:42:58 phk Exp $ + * $Id: ntfs_vfsops.c,v 1.9 1999/08/13 10:29:29 phk Exp $ */ @@ -290,14 +290,10 @@ ntfs_mount ( devvp = ndp->ni_vp; - if (devvp->v_type != VBLK) { + if (vn_isdisk(devvp)) { err = ENOTBLK; goto error_2; } - if (devsw(devvp->v_rdev) == NULL) { - err = ENXIO; - goto error_2; - } if (mp->mnt_flag & MNT_UPDATE) { #if 0 /* |