From e90d68c69c30ab876edf9b5a847155f0f1fcfbfa Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 2 Jan 2000 15:16:17 +0000 Subject: [PATCH] Return ENXIO if there is no device. --- sys/fs/cd9660/cd9660_vfsops.c | 6 +++++- sys/isofs/cd9660/cd9660_vfsops.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 01690a4abec7..16d51e7a5c64 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -216,9 +216,13 @@ cd9660_mount(mp, path, data, ndp, p) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; + if (devsw(devvp->v_rdev) == NULL) { + vrele(devvp); + return (ENXIO); + } if (!vn_isdisk(devvp)) { vrele(devvp); - return ENOTBLK; + return (ENOTBLK); } /* diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 01690a4abec7..16d51e7a5c64 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -216,9 +216,13 @@ cd9660_mount(mp, path, data, ndp, p) NDFREE(ndp, NDF_ONLY_PNBUF); devvp = ndp->ni_vp; + if (devsw(devvp->v_rdev) == NULL) { + vrele(devvp); + return (ENXIO); + } if (!vn_isdisk(devvp)) { vrele(devvp); - return ENOTBLK; + return (ENOTBLK); } /*