diff options
author | phk <phk@FreeBSD.org> | 2003-03-09 10:28:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-09 10:28:05 +0000 |
commit | 0d99ca7a9d9771b5911ab3230fe241c3711c17f5 (patch) | |
tree | 08f4afd4e1839a32d9d9e45af4ad738ade44a594 /sys/kern/kern_conf.c | |
parent | 707244e8a93de0a5d6a61944cbdbfaf82ec4d056 (diff) | |
download | FreeBSD-src-0d99ca7a9d9771b5911ab3230fe241c3711c17f5.zip FreeBSD-src-0d99ca7a9d9771b5911ab3230fe241c3711c17f5.tar.gz |
Add one little hack to allow us to make MAJOR_AUTO be zero:
Let the console driver ask for major 256 and magically change this to
mean zero.
Diffstat (limited to 'sys/kern/kern_conf.c')
-rw-r--r-- | sys/kern/kern_conf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 4606fd6..2f06fa6 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -295,6 +295,8 @@ make_dev(struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int perms, const devsw->d_maj = i; reserved_majors[i] = i; } else { + if (devsw->d_maj == 256) /* XXX: tty_cons.c is magic */ + devsw->d_maj = 0; 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) { |