summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_conf.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-02-27 22:41:07 +0000
committerphk <phk@FreeBSD.org>2005-02-27 22:41:07 +0000
commit2c12f56ebe6f4639339053dd84f3a81eb567f1a6 (patch)
treec18e4ffe192dac13231abde25973efd1c25e0139 /sys/kern/kern_conf.c
parent812caf442220d7b5f339bf25d50bab5e8008d8de (diff)
downloadFreeBSD-src-2c12f56ebe6f4639339053dd84f3a81eb567f1a6.zip
FreeBSD-src-2c12f56ebe6f4639339053dd84f3a81eb567f1a6.tar.gz
Whine about any drivers which hardcode the device major number.
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r--sys/kern/kern_conf.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 1344329..07213b5 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -426,18 +426,12 @@ prep_cdevsw(struct cdevsw *devsw)
devsw->d_flags |= D_INIT;
- if (devsw->d_maj == MAJOR_AUTO) {
- find_major(devsw);
- } else {
- KASSERT(devsw->d_maj >= 0 && devsw->d_maj < 256,
- ("Invalid major (%d) in make_dev", devsw->d_maj));
- if (reserved_majors[devsw->d_maj] != devsw->d_maj) {
- printf("WARNING: driver \"%s\" used %s %d\n",
- devsw->d_name, "unreserved major device number",
- devsw->d_maj);
- reserved_majors[devsw->d_maj] = devsw->d_maj;
- }
+ if (devsw->d_maj != MAJOR_AUTO) {
+ printf("NOTICE: Ignoring d_maj hint from driver \"%s\", %s",
+ devsw->d_name, "driver should be updated/fixed\n");
+ devsw->d_maj = MAJOR_AUTO;
}
+ find_major(devsw);
dev_unlock();
}
OpenPOWER on IntegriCloud