summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-10-04 12:33:05 +0000
committerphk <phk@FreeBSD.org>1999-10-04 12:33:05 +0000
commita8e22c41f54af176056ab89124555e2194ea8dce (patch)
tree51b90a0ed943bead5eb658d96146fdbbbcf2a003 /sys/fs
parent1c8b44f4ceddc4a56f5ed02a22b10dbd3e39d7b0 (diff)
downloadFreeBSD-src-a8e22c41f54af176056ab89124555e2194ea8dce.zip
FreeBSD-src-a8e22c41f54af176056ab89124555e2194ea8dce.tar.gz
Warn once per driver about dev_t's not registered with make_dev().
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/specfs/spec_vnops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 3ee0f0b..0384da1 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -166,6 +166,7 @@ spec_open(ap)
dev_t bdev, dev = vp->v_rdev;
int error;
struct cdevsw *dsw;
+ const char *cp;
/*
* Don't allow open if fs is mounted -nodev.
@@ -256,6 +257,14 @@ spec_open(ap)
if (!dev->si_bsize_phys)
dev->si_bsize_phys = DEV_BSIZE;
}
+ if ((dsw->d_flags & D_DISK) == 0) {
+ cp = devtoname(dev);
+ if (*cp == '#' && (dsw->d_flags & D_NAGGED) == 0) {
+ printf("WARNING: driver %s should register devices with make_dev() (dev_t = \"%s\")\n",
+ dsw->d_name, cp);
+ dsw->d_flags |= D_NAGGED;
+ }
+ }
return (error);
}
OpenPOWER on IntegriCloud