diff options
author | phk <phk@FreeBSD.org> | 2000-05-09 18:53:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-05-09 18:53:57 +0000 |
commit | bddf42895281c47274c73bdef6919113442fc8c5 (patch) | |
tree | 9ed6efdf333e6c479b5c3636ba01cf39f77af029 | |
parent | 078cc10d670cf71409979b5668870df0d83cbd40 (diff) | |
download | FreeBSD-src-bddf42895281c47274c73bdef6919113442fc8c5.zip FreeBSD-src-bddf42895281c47274c73bdef6919113442fc8c5.tar.gz |
Change the "bdev-whiner" to whine when open is attempted and extend
the deadline a month.
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 9 | ||||
-rw-r--r-- | sys/kern/kern_conf.c | 5 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 9 | ||||
-rw-r--r-- | sys/sys/conf.h | 1 | ||||
-rw-r--r-- | sys/sys/linedisc.h | 1 |
5 files changed, 20 insertions, 5 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 85ffdbd..8fc7909 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -146,6 +146,15 @@ 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 (*dev->si_name != '\0') + printf("Device \"%s\" ", dev->si_name); + else + printf("Device char-major=%d minor=%d ", + 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; + } dsw = devsw(dev); if ( (dsw == NULL) || (dsw->d_open == NULL)) return ENXIO; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index ff7a9d8..d6116f7 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -259,7 +259,6 @@ dev2udev(dev_t x) dev_t udev2dev(udev_t x, int b) { - static int whine; if (x == NOUDEV) return (NODEV); @@ -267,10 +266,6 @@ udev2dev(udev_t x, int b) case 0: return makedev(umajor(x), uminor(x)); case 1: - if (!whine) { - printf("WARNING: run /dev/MAKEDEV before 2000-06-01 to get rid of block devices\n"); - whine++; - } return makebdev(umajor(x), uminor(x)); default: Debugger("udev2dev(...,X)"); diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 85ffdbd..8fc7909 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -146,6 +146,15 @@ 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 (*dev->si_name != '\0') + printf("Device \"%s\" ", dev->si_name); + else + printf("Device char-major=%d minor=%d ", + 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; + } dsw = devsw(dev); if ( (dsw == NULL) || (dsw->d_open == NULL)) return ENXIO; diff --git a/sys/sys/conf.h b/sys/sys/conf.h index c50d225..c13a5ca 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -53,6 +53,7 @@ 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 c50d225..c13a5ca 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -53,6 +53,7 @@ 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; |