diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-04 12:33:05 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-04 12:33:05 +0000 |
| commit | adab70d67ae781dd1842aaf0cc0ae396e8e38107 (patch) | |
| tree | 64a299c928865a7fba2d8ee3298022886a2081c6 /sys/miscfs | |
| parent | 03bf3ccb9c96a3f0c01a2ce25f2348a919bd5e6d (diff) | |
Notes
Diffstat (limited to 'sys/miscfs')
| -rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 3ee0f0b3d3d3..0384da1ae44a 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/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); } |
