diff options
author | phk <phk@FreeBSD.org> | 2000-07-03 13:48:37 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-07-03 13:48:37 +0000 |
commit | f101401a90858364a8f5b6900c1740c3a5af54c5 (patch) | |
tree | 2522e7f11eff7fd9884ea1cc41f4acca55d5701b | |
parent | aec15566c7a9b50127fb40fbf5ae9c66b1bbf018 (diff) | |
download | FreeBSD-src-f101401a90858364a8f5b6900c1740c3a5af54c5.zip FreeBSD-src-f101401a90858364a8f5b6900c1740c3a5af54c5.tar.gz |
Pull the rug under block mode devices. they return ENXIO on open(2) now.
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 6 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 6 | ||||
-rw-r--r-- | sys/sys/conf.h | 1 | ||||
-rw-r--r-- | sys/sys/linedisc.h | 1 |
4 files changed, 6 insertions, 8 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index d3aa1d8..cbe52f4 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -146,14 +146,14 @@ spec_open(ap) if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV)) return (ENXIO); - if (vp->v_type == VBLK && !(dev->si_flags & SI_WHINED)) { + 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("opened in block mode, convert to char mode with /dev/MAKEDEV before 2000-07-01\n"); - dev->si_flags |= SI_WHINED; + printf("failed attempt to open in block mode\n"); + return ENXIO; } dsw = devsw(dev); if ( (dsw == NULL) || (dsw->d_open == NULL)) diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index d3aa1d8..cbe52f4 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -146,14 +146,14 @@ spec_open(ap) if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV)) return (ENXIO); - if (vp->v_type == VBLK && !(dev->si_flags & SI_WHINED)) { + 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("opened in block mode, convert to char mode with /dev/MAKEDEV before 2000-07-01\n"); - dev->si_flags |= SI_WHINED; + printf("failed attempt to open in block mode\n"); + return ENXIO; } dsw = devsw(dev); if ( (dsw == NULL) || (dsw->d_open == NULL)) diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 0a97e53..affc646 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -53,7 +53,6 @@ struct vnode; struct specinfo { u_int si_flags; #define SI_STASHED 0x0001 /* created in stashed storage */ -#define SI_WHINED 0x0002 /* whined about already */ udev_t si_udev; LIST_ENTRY(specinfo) si_hash; SLIST_HEAD(, vnode) si_hlist; diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index 0a97e53..affc646 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -53,7 +53,6 @@ struct vnode; struct specinfo { u_int si_flags; #define SI_STASHED 0x0001 /* created in stashed storage */ -#define SI_WHINED 0x0002 /* whined about already */ udev_t si_udev; LIST_ENTRY(specinfo) si_hash; SLIST_HEAD(, vnode) si_hlist; |