1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Change the "bdev-whiner" to whine when open is attempted and extend

the deadline a month.
This commit is contained in:
Poul-Henning Kamp 2000-05-09 18:53:57 +00:00
parent b68d89eb4c
commit 192c06ea1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60281
5 changed files with 20 additions and 5 deletions

View File

@ -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;

View File

@ -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)");

View File

@ -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;

View File

@ -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;

View File

@ -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;