diff options
author | phk <phk@FreeBSD.org> | 2003-03-09 11:03:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-09 11:03:45 +0000 |
commit | 2fe1f6204d38d7d1423802fd525964774dae667c (patch) | |
tree | cfa97a9d4fdebe78406e688b9759ba8119bb7dfc | |
parent | 3a6679ec745949833041f02adfc73f8672717e1e (diff) | |
download | FreeBSD-src-2fe1f6204d38d7d1423802fd525964774dae667c.zip FreeBSD-src-2fe1f6204d38d7d1423802fd525964774dae667c.tar.gz |
Note that MAJOR_AUTO is now the default if d_maj is not initialized. This
is more robust and prevents the hijacking of /dev/console for the typical
mistake.
Remove unneeded MAJOR_AUTO uses, it is only needed explicitly now if the
driver source has cross-branch compatibility to old releases.
-rw-r--r-- | sys/conf/majors | 5 | ||||
-rw-r--r-- | sys/dev/sab/sab.c | 1 | ||||
-rw-r--r-- | sys/dev/zs/zs.c | 1 | ||||
-rw-r--r-- | sys/i386/isa/loran.c | 1 | ||||
-rw-r--r-- | sys/kern/subr_devstat.c | 1 | ||||
-rw-r--r-- | sys/net/if.c | 1 | ||||
-rw-r--r-- | sys/netncp/ncp_mod.c | 1 |
7 files changed, 3 insertions, 8 deletions
diff --git a/sys/conf/majors b/sys/conf/majors index 7c87547..2d2f562 100644 --- a/sys/conf/majors +++ b/sys/conf/majors @@ -4,8 +4,9 @@ # the current allocation of device major numbers. # # Unless very special circumstants demand otherwise, all device drivers -# are able to use the "MAJOR_AUTO" facility for auto-allocating major -# numbers at runtime. +# are able to use a dynamically allocated major number. If the d_maj +# element of the cdevsw is uninitialized (preferred) or initialized to +# MAJOR_AUTO, this dynamic allocation will happen. # # NOTICE: FreeBSD does not use block major numbers anymore, you neither # need to assign nor use a block major number for any device driver any diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index 362e8b7..0944637 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -167,7 +167,6 @@ static struct cdevsw sabtty_cdevsw = { .d_ioctl = sabttyioctl, .d_poll = ttypoll, .d_name = "sabtty", - .d_maj = MAJOR_AUTO, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index d901e10..5a04a0e 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -157,7 +157,6 @@ static struct cdevsw zstty_cdevsw = { .d_ioctl = zsttyioctl, .d_poll = ttypoll, .d_name = "zstty", - .d_maj = MAJOR_AUTO, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/loran.c b/sys/i386/isa/loran.c index 47b8b7d..a2fa8ea 100644 --- a/sys/i386/isa/loran.c +++ b/sys/i386/isa/loran.c @@ -627,7 +627,6 @@ static struct cdevsw loran_cdevsw = { .d_read = loranread, .d_write = loranwrite, .d_name = "loran", - .d_maj = MAJOR_AUTO, }; #endif /* _KERNEL */ diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 1804b42..eab9a4f 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -345,7 +345,6 @@ static struct cdevsw devstat_cdevsw = { .d_close = nullclose, .d_mmap = devstat_mmap, .d_name = "devstat", - .d_maj = MAJOR_AUTO, }; struct statspage { diff --git a/sys/net/if.c b/sys/net/if.c index 3e91661..774b29f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -135,7 +135,6 @@ static struct cdevsw net_cdevsw = { .d_close = netclose, .d_ioctl = netioctl, .d_name = "net", - .d_maj = MAJOR_AUTO, .d_kqfilter = netkqfilter, }; diff --git a/sys/netncp/ncp_mod.c b/sys/netncp/ncp_mod.c index 889d620..4ef96e8 100644 --- a/sys/netncp/ncp_mod.c +++ b/sys/netncp/ncp_mod.c @@ -68,7 +68,6 @@ static struct cdevsw ncp_cdevsw = { .d_close = nullclose, .d_ioctl = ncp_ioctl, .d_name = "ncp", - .d_maj = MAJOR_AUTO, }; static int ncp_conn_frag_rq(struct ncp_conn *, struct thread *, |