summaryrefslogtreecommitdiffstats
path: root/sys/fs/specfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-11-02 21:14:13 +0000
committerphk <phk@FreeBSD.org>2000-11-02 21:14:13 +0000
commit4e063f553471c4c75d185894232cce516553505b (patch)
tree7e09ffe66c44c6ab6baccfc2be5f38006ed8e681 /sys/fs/specfs
parent5fe3f7f833039a13236d7334808f02132b2d5255 (diff)
downloadFreeBSD-src-4e063f553471c4c75d185894232cce516553505b.zip
FreeBSD-src-4e063f553471c4c75d185894232cce516553505b.tar.gz
Take VBLK devices further out of their missery.
This should fix the panic I introduced in my previous commit on this topic.
Diffstat (limited to 'sys/fs/specfs')
-rw-r--r--sys/fs/specfs/spec_vnops.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index ae8e11a..582bece 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -139,21 +139,14 @@ spec_open(ap)
struct cdevsw *dsw;
const char *cp;
+ if (vp->v_type == VBLK)
+ return ENXIO;
/*
* Don't allow open if fs is mounted -nodev.
*/
if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV))
return (ENXIO);
- if (vp->v_type == VBLK) {
- if (*dev->si_name != '\0')
- printf("Device \"%s\" ", dev->si_name);
- else
- printf("Device char-major=%d minor=0x%x ",
- major(dev), minor(dev));
- printf("failed attempt to open in block mode\n");
- return ENXIO;
- }
dsw = devsw(dev);
if ( (dsw == NULL) || (dsw->d_open == NULL))
return ENXIO;
OpenPOWER on IntegriCloud