diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-05-09 18:53:57 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-05-09 18:53:57 +0000 |
| commit | 192c06ea1be0030f69571ef79967af760e30495b (patch) | |
| tree | 395a5f8f1d9e1243ff65d4a1ec87562c1ca824c5 | |
| parent | b68d89eb4ca37343e65ae34029400455825a4b06 (diff) | |
Notes
| -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 85ffdbd36393..8fc79092d16d 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 ff7a9d8b2eb0..d6116f75513f 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 85ffdbd36393..8fc79092d16d 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 c50d2251d6e1..c13a5ca17eb6 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 c50d2251d6e1..c13a5ca17eb6 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; |
